The author of this post was unable to find many good examples of the basic actions required to manipulate graphs using SPARQL, so he pieced together some example code. The following Java code illustrates how to create a graph, insert data, delete data and edit data. It uses Jena; however, the application logic is not dependent on the particular Graph Store implementation that is used.
Keywords: CRUD, SPARQL, Apache Jena, Java
Author: Ringland, John
Date created: 2013-06-02 04:00:00.000
Time required: P15M
Educational use: instruction
Educational audience: professional
Interactivity type: expositive
- Knows the SPARQL 1.1 Update language for updating, creating, and removing RDF graphs in a Graph Store
- Understands how the pattern matching of SPARQL queries can be expressed using functionally equivalent constructs in RDF programming libraries.
- Uses RDF programming libraries to persistently stores triples in memory, on disk, or to interact with triple stores.