Class StandardQueryElementCollection<T extends QueryElement>
- java.lang.Object
-
- org.eclipse.rdf4j.sparqlbuilder.core.QueryElementCollection<T>
-
- org.eclipse.rdf4j.sparqlbuilder.core.StandardQueryElementCollection<T>
-
- Type Parameters:
T
- the type ofQueryElement
s in the collection
- All Implemented Interfaces:
QueryElement
- Direct Known Subclasses:
Dataset
,Expression
,GroupBy
,Having
,OrderBy
,PrefixDeclarations
,RdfPredicateObjectList
,TriplesTemplate
public abstract class StandardQueryElementCollection<T extends QueryElement> extends QueryElementCollection<T>
AQueryElementCollection
that follows a more standard way of converting to a query string
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Optional<java.lang.String>
operatorName
private boolean
printBodyIfEmpty
private boolean
printNameIfEmpty
private java.util.function.Function<java.lang.String,java.lang.String>
wrapperMethod
-
Fields inherited from class org.eclipse.rdf4j.sparqlbuilder.core.QueryElementCollection
elements
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
StandardQueryElementCollection()
protected
StandardQueryElementCollection(java.lang.String delimeter)
protected
StandardQueryElementCollection(java.lang.String operatorName, java.lang.String delimeter)
protected
StandardQueryElementCollection(java.lang.String operatorName, java.lang.String delimiter, java.util.Collection<T> collection)
protected
StandardQueryElementCollection(java.lang.String operatorName, java.lang.String delimiter, java.util.function.Function<java.lang.String,java.lang.String> wrapperMethod, java.util.Collection<T> collection)
protected
StandardQueryElementCollection(java.lang.String delimeter, java.util.Collection<T> collection)
protected
StandardQueryElementCollection(java.lang.String operatorName, java.util.function.Function<java.lang.String,java.lang.String> wrapperMethod)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getQueryString()
protected void
printBodyIfEmpty(boolean printBodyIfEmpty)
protected void
printNameIfEmpty(boolean printNameIfEmpty)
protected void
resetWrapperMethod()
protected void
setOperatorName(java.lang.String operatorName)
protected void
setOperatorName(java.lang.String operatorName, boolean pad)
protected void
setWrapperMethod(java.util.function.Function<java.lang.String,java.lang.String> wrapperMethod)
-
Methods inherited from class org.eclipse.rdf4j.sparqlbuilder.core.QueryElementCollection
addElements, addElements, isEmpty
-
-
-
-
Constructor Detail
-
StandardQueryElementCollection
protected StandardQueryElementCollection()
-
StandardQueryElementCollection
protected StandardQueryElementCollection(java.lang.String delimeter)
-
StandardQueryElementCollection
protected StandardQueryElementCollection(java.lang.String operatorName, java.lang.String delimeter)
-
StandardQueryElementCollection
protected StandardQueryElementCollection(java.lang.String delimeter, java.util.Collection<T> collection)
-
StandardQueryElementCollection
protected StandardQueryElementCollection(java.lang.String operatorName, java.util.function.Function<java.lang.String,java.lang.String> wrapperMethod)
-
StandardQueryElementCollection
protected StandardQueryElementCollection(java.lang.String operatorName, java.lang.String delimiter, java.util.Collection<T> collection)
-
StandardQueryElementCollection
protected StandardQueryElementCollection(java.lang.String operatorName, java.lang.String delimiter, java.util.function.Function<java.lang.String,java.lang.String> wrapperMethod, java.util.Collection<T> collection)
-
-
Method Detail
-
setOperatorName
protected void setOperatorName(java.lang.String operatorName)
-
setOperatorName
protected void setOperatorName(java.lang.String operatorName, boolean pad)
-
setWrapperMethod
protected void setWrapperMethod(java.util.function.Function<java.lang.String,java.lang.String> wrapperMethod)
-
resetWrapperMethod
protected void resetWrapperMethod()
-
printBodyIfEmpty
protected void printBodyIfEmpty(boolean printBodyIfEmpty)
-
printNameIfEmpty
protected void printNameIfEmpty(boolean printNameIfEmpty)
-
getQueryString
public java.lang.String getQueryString()
- Specified by:
getQueryString
in interfaceQueryElement
- Overrides:
getQueryString
in classQueryElementCollection<T extends QueryElement>
- Returns:
- the String representing the SPARQL syntax of this element
-
-