-
Notifications
You must be signed in to change notification settings - Fork 6
Home
anqit edited this page Dec 5, 2017
·
6 revisions
An easy to use, open source, fluent Java API to create SPARQL query strings.
Spanqit is a fluent Java API used to programmatically create SPARQL query strings. It is not explicitly dependent on any RDF or SPARQL libraries, and can thus be used with any SPARQL query processor.
Spanqit allows the following SPARQL query:
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?name
WHERE { ?x foaf:name ?name }
ORDER BY ?name
LIMIT 5
OFFSET 10
to be created as simply as:
query.prefix(foaf).select(name)
.where(x.has(foaf.iri("name"), name))
.orderBy(name)
.limit(5)
.offset(10);
Spanqit is based on this version of the SPARQL 1.1 Spec. Almost all features of SPARQL 1.1 are supported, excluding some current known limitations.
Note: This document assumes the user is familiar with the SPARQL query language. Please refer to the above specification if not.