Use the Vocabularies to Build RDF Statements
Learn how to build RDF statements and serialize RDF descriptions using the RDF.Turtle module.
We'll cover the following
Let’s put the vocabularies to use and build some RDF statements in Elixir. We’ll use the book graph as our target, specifically the semantic RDF version.
Here we make use of two RDF.ex
features: sigils for RDF terms and variant property function calls that implement a description builder style. To glue it all together, we use the Elixir pipe operator |>
.
The book/0
function
Let’s add this book/0
function to our RDFGraph.Vocab
module:
Get hands-on with 1400+ tech skills courses.