Class GroupGraphPattern
java.lang.Object
org.eclipse.rdf4j.sparqlbuilder.core.QueryElementCollection<GraphPattern>
org.eclipse.rdf4j.sparqlbuilder.graphpattern.GroupGraphPattern
- All Implemented Interfaces:
QueryElement
,GraphPattern
- Direct Known Subclasses:
FilterExistsGraphPattern
,MinusGraphPattern
A SPARQL Group Graph Pattern
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
protected boolean
private static final String
Fields inherited from class org.eclipse.rdf4j.sparqlbuilder.core.QueryElementCollection
elements
-
Constructor Summary
ConstructorsConstructorDescriptionGroupGraphPattern
(boolean isOptional) GroupGraphPattern
(GraphPattern original) -
Method Summary
Modifier and TypeMethodDescriptionand
(GraphPattern... patterns) Convert this graph pattern into a group graph pattern, combining this graph pattern with the given patterns:private boolean
protected void
copy
(GroupGraphPattern original) filter
(Expression<?> constraint) Convert this graph pattern into a group graph pattern and add a filter:Convert this graph pattern into a named group graph pattern:boolean
isEmpty()
private static boolean
isGGP
(GraphPattern pattern) optional
(boolean isOptional) Specify if this graph pattern should be optional.Methods inherited from class org.eclipse.rdf4j.sparqlbuilder.core.QueryElementCollection
addElements, addElements
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.rdf4j.sparqlbuilder.graphpattern.GraphPattern
filterExists, filterExists, filterNotExists, minus, optional, union
-
Field Details
-
OPTIONAL
- See Also:
-
GRAPH
- See Also:
-
from
-
filters
-
isOptional
protected boolean isOptional
-
-
Constructor Details
-
GroupGraphPattern
GroupGraphPattern() -
GroupGraphPattern
GroupGraphPattern(boolean isOptional) -
GroupGraphPattern
GroupGraphPattern(GraphPattern original)
-
-
Method Details
-
copy
-
and
Description copied from interface:GraphPattern
Convert this graph pattern into a group graph pattern, combining this graph pattern with the given patterns:
{ thisPattern . pattern1 . pattern2 . ... patternN }
- Specified by:
and
in interfaceGraphPattern
- Parameters:
patterns
- the patterns to add- Returns:
- the new
GraphPattern
instance - See Also:
-
optional
Description copied from interface:GraphPattern
Specify if this graph pattern should be optional.NOTE: This converts this graph pattern into a group graph pattern.
- Specified by:
optional
in interfaceGraphPattern
- Parameters:
isOptional
- if this graph pattern should be optional or not- Returns:
- the new
GraphPattern
instance - See Also:
-
from
Description copied from interface:GraphPattern
Convert this graph pattern into a named group graph pattern:
GRAPH graphName { thisPattern }
- Specified by:
from
in interfaceGraphPattern
- Parameters:
name
- the name to specify- Returns:
- the new
GraphPattern
instance - See Also:
-
filter
Description copied from interface:GraphPattern
Convert this graph pattern into a group graph pattern and add a filter:
{ thisPattern FILTER { constraint } }
- Specified by:
filter
in interfaceGraphPattern
- Parameters:
constraint
- the filter constraint- Returns:
- the new
GraphPattern
instance - See Also:
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceGraphPattern
- Overrides:
isEmpty
in classQueryElementCollection<GraphPattern>
- Returns:
- if this collection is empty
-
getQueryString
- Specified by:
getQueryString
in interfaceQueryElement
- Overrides:
getQueryString
in classQueryElementCollection<GraphPattern>
- Returns:
- the String representing the SPARQL syntax of this element
-
isGGP
-
bracketInner
private boolean bracketInner()
-