public class SparqlBuilder extends Object
Modifier and Type | Method and Description |
---|---|
static Assignment |
as(Assignable exp,
Variable var)
Create a SPARQL assignment
|
static OrderCondition |
asc(Orderable orderOn)
Create an ascending SPARQL order condition
|
static Base |
base(Iri iri)
Create a SPARQL Base declaration
|
static GraphTemplate |
construct(TriplePattern... triples)
Create a SPARQL graph template
|
static Dataset |
dataset(From... graphs)
Create a dataset declaration
|
static OrderCondition |
desc(Orderable orderOn)
Create a descending SPARQL order condition
|
static From |
from(Iri iri)
Create a default graph reference
|
static From |
fromNamed(Iri iri)
Create a named graph reference
|
static GroupBy |
groupBy(Groupable... groupables)
Create a SPARQL Group By clause
|
static Having |
having(Expression<?>... expressions)
Create a SPARQL Having clause
|
static OrderBy |
orderBy(Orderable... conditions)
Create a SPARQL Order clause
|
static Prefix |
prefix(Iri iri)
Create a SPARQL default Prefix declaration
|
static Prefix |
prefix(IRI iri)
Create a SPARQL default Prefix declaration
|
static Prefix |
prefix(Namespace namespace)
Create SPARQL Prefix declaration from the given
Namespace . |
static Prefix |
prefix(String alias,
Iri iri)
Create a SPARQL Prefix declaration
|
static PrefixDeclarations |
prefixes(Prefix... prefixes)
Create a SPARQL Prefix clause
|
static Projection |
select(Projectable... projectables)
Create a SPARQL projection
|
static TriplesTemplate |
triplesTemplate(TriplePattern... triples)
Create a TriplesTemplate instance, for use with Construct and Update queries
|
static Variable |
var(String varName)
Create a SPARQL variable with a specific alias.
|
static QueryPattern |
where(GraphPattern... patterns)
Create a SPARQL query pattern
|
public static Variable var(String varName)
varName
- the alias of the variablepublic static Assignment as(Assignable exp, Variable var)
exp
- the expression to evaluatevar
- the variable to bind the expression value topublic static Base base(Iri iri)
iri
- the base iripublic static Prefix prefix(String alias, Iri iri)
alias
- the alias of the prefixiri
- the iri the alias refers topublic static Prefix prefix(Iri iri)
iri
- the default iri prefixpublic static Prefix prefix(Namespace namespace)
Namespace
.namespace
- the Namespace
to convert to a prefix declaration.public static Prefix prefix(IRI iri)
iri
- the default iri prefix as an IRI
.public static PrefixDeclarations prefixes(Prefix... prefixes)
prefixes
- prefix declarations to add to this Prefix clausepublic static From from(Iri iri)
iri
- the source of the graphpublic static From fromNamed(Iri iri)
iri
- the source of the graphpublic static Dataset dataset(From... graphs)
graphs
- public static Projection select(Projectable... projectables)
projectables
- projectable elements to add to the projectionpublic static GraphTemplate construct(TriplePattern... triples)
triples
- triples to add to the templatepublic static QueryPattern where(GraphPattern... patterns)
patterns
- graph patterns to add to the query patternpublic static GroupBy groupBy(Groupable... groupables)
groupables
- the group conditionspublic static OrderBy orderBy(Orderable... conditions)
conditions
- the order conditionspublic static Having having(Expression<?>... expressions)
expressions
- the having conditionspublic static OrderCondition asc(Orderable orderOn)
orderOn
- the order comparatorpublic static OrderCondition desc(Orderable orderOn)
orderOn
- the order comparatorpublic static TriplesTemplate triplesTemplate(TriplePattern... triples)
triples
- the triples to include in the triples templateCopyright © 2015-2022 Eclipse Foundation. All Rights Reserved.