Class GraphPatterns
java.lang.Object
org.eclipse.rdf4j.sparqlbuilder.graphpattern.GraphPatterns
A class with static methods to create graph patterns.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic GraphPatternNotTriplesand(GraphPattern... patterns) Create a group graph pattern containing the given graph patternsstatic GraphPatternNotTriplesfilterExists(boolean exists, GraphPattern... patterns) static GraphPatternNotTriplesfilterExists(GraphPattern... patterns) static GraphPatternNotTriplesfilterNotExists(GraphPattern... patterns) static GraphPatternNotTriplesminus(GraphPattern... patterns) static GraphPatternNotTriplesoptional(GraphPattern... patterns) Create an optional group graph pattern containing the given graph patterns:static SubSelectselect(Projectable... projectables) Create a SPARQL subquery, including the given elements in its projection.static TriplePatternstatic TriplePatternCreate a triple pattern with the given subject, predicate, and object(s)static TriplePatterntp(Resource subject, RdfPredicate predicate, Value... objects) static TriplePatterntp(Resource subject, RdfPredicate predicate, RdfObject... objects) Create a triple pattern with the given subject, predicate, and object(s)static TriplePatternCreate a triple pattern from a property-list blank nodestatic TriplePatterntp(RdfSubject subject, Consumer<EmptyPropertyPathBuilder> propertyPathConfigurer, RdfObject... objects) Create a triple pattern from a property path and a list of objects.static TriplePatterntp(RdfSubject subject, IRI predicate, Value... objects) static TriplePatterntp(RdfSubject subject, IRI predicate, RdfObject... objects) Create a triple pattern with the given subject, predicate, and object(s)static TriplePatterntp(RdfSubject subject, RdfPredicateObjectList... lists) Create a triple pattern with the given subject and predicate-object list(s)static TriplePatterntp(RdfSubject subject, RdfPredicate predicate, Value... objects) static TriplePatterntp(RdfSubject subject, RdfPredicate predicate, RdfObject... objects) Create a triple pattern with the given subject, predicate, and object(s)static GraphPatternNotTriplesunion(GraphPattern... patterns) Create an alternative graph pattern containing the union of the given graph patterns:
-
Method Details
-
tp
Create a triple pattern with the given subject, predicate, and object(s)- Parameters:
subject-predicate-objects-- Returns:
- a new
TriplePattern - See Also:
-
tp
-
tp
Create a triple pattern with the given subject, predicate, and object(s)- Parameters:
subject- the triple pattern subjectpredicate- the triple pattern predicate as aIRIobjects- the triples pattern object(s)- Returns:
- a new
TriplePattern - See Also:
-
tp
-
tp
Create a triple pattern with the given subject, predicate, and object(s)- Parameters:
subject- the triple pattern subjectpredicate- the triple pattern predicate as aIRIobjects- the triples pattern object(s)- Returns:
- a new
TriplePattern - See Also:
-
tp
-
tp
Create a triple pattern with the given subject, predicate, and object(s)- Parameters:
subject- the triple pattern subject as aResourcepredicate- the triple pattern predicate as aIRIobjects- the triples pattern object(s)- Returns:
- a new
TriplePattern - See Also:
-
tp
-
tp
Create a triple pattern with the given subject and predicate-object list(s)- Parameters:
subject-lists-- Returns:
- a new
TriplePattern - See Also:
-
tp
Create a triple pattern from a property-list blank node- Parameters:
bnode- the PropertiesBlankNode instance to convert to a triple pattern- Returns:
- the triple pattern represented by the expansion of this blank node
- See Also:
-
tp
public static TriplePattern tp(RdfSubject subject, Consumer<EmptyPropertyPathBuilder> propertyPathConfigurer, RdfObject... objects) Create a triple pattern from a property path and a list of objects.- Parameters:
subject- the subjectpropertyPathConfigurer- an object that accepts anEmptyPropertyPathBuilderand uses it to create a property pathobjects- the object(s) of the triple(s)- Returns:
- the triple pattern
-
and
Create a group graph pattern containing the given graph patterns- Parameters:
patterns- the patterns to include in the group graph a pattern- Returns:
- a new group graph pattern
- See Also:
-
union
Create an alternative graph pattern containing the union of the given graph patterns:
{ { pattern1 } UNION { pattern2 } UNION ... UNION { patternN } }- Parameters:
patterns- the patterns to include in the union- Returns:
- a new alternative graph pattern
- See Also:
-
optional
Create an optional group graph pattern containing the given graph patterns:
{ OPTIONAL { pattern1 . pattern2 . ... patternN } }- Parameters:
patterns- the patterns to include in the optional graph pattern- Returns:
- a new optional graph pattern
- See Also:
-
filterExists
-
filterNotExists
-
minus
-
filterExists
-
select
Create a SPARQL subquery, including the given elements in its projection.- Parameters:
projectables- the elements to include in the projection of the subquery- Returns:
- a new subquery
- See Also:
-