-
Notifications
You must be signed in to change notification settings - Fork 6
Queries
Ankit Prakash edited this page Nov 10, 2014
·
2 revisions
Spanqit currently supports SELECT
and CONSTRUCT
queries. The Queries
class provides static methods to instantiate SelectQuery
and ConstructQuery
objects:
SelectQuery select = Queries.SELECT();
ConstructQuery construct = Queries.CONSTRUCT();
Query objects provide methods to set or add the various elements appropriate for the type of query:
Prefix ex;
Variable product;
TriplePattern personWroteBook, personAuthoredBook;
// ...
select.prefix(ex).select(product).where(product.isA(ex.iri("book"));
construct.prefix(ex).construct(personWroteBook).where(personAuthoredBook);