Class SparqlBuilder
java.lang.Object
org.eclipse.rdf4j.sparqlbuilder.core.SparqlBuilder
A class to with static methods to create SPARQL query elements.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Assignment
as
(Assignable exp, Variable var) Create a SPARQL assignmentstatic OrderCondition
Create an ascending SPARQL order conditionstatic Base
Create a SPARQL Base declarationstatic Base
Create a SPARQL Base declarationstatic GraphTemplate
construct
(TriplePattern... triples) Create a SPARQL graph templatestatic Dataset
Create a dataset declarationstatic OrderCondition
Create a descending SPARQL order conditionstatic From
Create a default graph referencestatic From
Create a default graph referencestatic From
Create a named graph referencestatic From
Create a named graph referencestatic GroupBy
Create a SPARQL Group By clausestatic Having
having
(Expression<?>... expressions) Create a SPARQL Having clausestatic OrderBy
Create a SPARQL Order clausestatic Prefix
Create a SPARQL Prefix declarationstatic Prefix
Create a SPARQL Prefix declarationstatic Prefix
Create a SPARQL default Prefix declarationstatic Prefix
Create SPARQL Prefix declaration from the givenNamespace
.static Prefix
Create a SPARQL default Prefix declarationstatic PrefixDeclarations
Create a SPARQL Prefix clausestatic Projection
select
(Projectable... projectables) Create a SPARQL projectionstatic TriplesTemplate
triplesTemplate
(TriplePattern... triples) Create a TriplesTemplate instance, for use with Construct and Update queriesstatic Variable
Create a SPARQL variable with a specific alias.static QueryPattern
where
(GraphPattern... patterns) Create a SPARQL query pattern
-
Method Details
-
var
-
as
Create a SPARQL assignment- Parameters:
exp
- the expression to evaluatevar
- the variable to bind the expression value to- Returns:
- an Assignment object
-
base
-
base
-
prefix
-
prefix
-
prefix
-
prefix
-
prefix
-
prefixes
Create a SPARQL Prefix clause- Parameters:
prefixes
- prefix declarations to add to this Prefix clause- Returns:
- a new
-
from
-
from
-
fromNamed
-
fromNamed
-
dataset
-
select
Create a SPARQL projection- Parameters:
projectables
- projectable elements to add to the projection- Returns:
- a Projection
-
construct
Create a SPARQL graph template- Parameters:
triples
- triples to add to the template- Returns:
- a new SPARQL graph template
-
where
Create a SPARQL query pattern- Parameters:
patterns
- graph patterns to add to the query pattern- Returns:
- a new Query Pattern
-
groupBy
-
orderBy
-
having
Create a SPARQL Having clause- Parameters:
expressions
- the having conditions- Returns:
- a Having clause
-
asc
Create an ascending SPARQL order condition- Parameters:
orderOn
- the order comparator- Returns:
- an ASC() order condition
-
desc
Create a descending SPARQL order condition- Parameters:
orderOn
- the order comparator- Returns:
- a DESC() order condition
-
triplesTemplate
Create a TriplesTemplate instance, for use with Construct and Update queries- Parameters:
triples
- the triples to include in the triples template- Returns:
- a TriplesTemplate of the given triples
-