Featured wiki pages:
Overview Show all » |
Scardf is an API in Scala providing a DSL for writing, traversing and querying RDF graphs. Implemented as a façade to Jena, an RDF programming framework for Java. So instead of writing something like this:
Model model = ModelFactory.createDefaultModel(); Resource johnSmith = model.createResource( "http://somewhere/JohnSmith" ) .addProperty( N, model.createResource() .addProperty( Given, "John" ) .addProperty( Family, "Smith" ) );
in Scala you can write like this:
implicit val model = new Model withPrefix "http://somewhere/" val johnSmith = Res( "JohnSmith" ) state( N -> Anon( Given -> "John", Family -> "Smith" ) )
For more examples of use, take a look at the Overview and other wiki pages.
New API¶
In the redesigned API, graphs can be written in a shorter and more functional style. Coming soon.
val graph = Graph.build( johnSmith -N-> Branch( Given -> "John", Family -> "Smith" ) ) )