public class SparqlRequestGroup extends AbstractSparqlRequest implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
protected ISparqlRequestGroup |
parentRequest
The parent request.
|
additionalVars, askForm, binds, coalesces, deleteForms, insertForms, iris, level, selectForm, variables, whereFormLABEL, SUBCLASS_OF, SUBCLASS_OF_STAR, TYPE, TYPE_SUBCLASS_OFDISTANCE_FT, DISTANCE_KM, DISTANCE_M, DISTANCE_NM| Constructor and Description |
|---|
SparqlRequestGroup(ISparqlRequestGroup parent) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
addAutoVariable(java.lang.String radix)
Add an additional variable in the query with a name chosen automatically.
|
Bind |
addBind()
Add a bind.
|
Bind |
addBind(java.lang.String var)
Add a bind.
|
Coalesce |
addCoalesce()
Add a coalesce.
|
boolean |
addDistance(java.lang.String var,
java.lang.String fromVar,
java.lang.String varDist,
short unit,
boolean isExact)
Add a distance property reference declaration in the WHERE part of the request.
|
Filter |
addFilter()
Add a FILTER clause.
|
boolean |
addGeometry(java.lang.String var,
java.lang.String varLat,
java.lang.String varLon,
boolean isExact)
Add a geometry declaration in the WHERE part of the request.
|
Filter |
addHaving()
Add a HAVING clause.
|
OperationResult<WhereExpression> |
addLabel(java.lang.String var,
TripleElement type)
Add a rdfs:label matching declaration in the WHERE part of the request.
|
OperationResult<? extends SparqlElement> |
addPropertyIndividualRef(java.lang.String var,
TripleElement type,
java.lang.String individual,
boolean optional)
Add an object property individual declaration in the WHERE part of the request.
|
OperationResult<PropertyRef> |
addPropertyRef(java.lang.String var,
TripleElement type,
java.lang.String varRef,
boolean optional)
Add an object property reference declaration in the WHERE part of the request.
|
OperationResult<PropertyRef> |
addPropertyRef(VariableOrIRI varOrIRI,
TripleElement type,
VariableOrIRI varOrIRIRef,
boolean optional)
Add an object property reference declaration in the WHERE part of the request.
|
OperationResult<? extends SparqlElement> |
addPropertyValue(java.lang.String var,
TripleElement type,
java.lang.Object propertyValue,
boolean optional)
Add a property value declaration in the WHERE part of the request.
|
OperationResult<Property> |
addPropertyValues(java.lang.String var,
TripleElement type,
java.util.List<? extends java.lang.Object> propValues,
boolean optional)
Add a property value declaration in the WHERE part of the request, for several values.
|
OperationResult<WhereExpression> |
addSubClassOf(java.lang.String var,
TripleElement type)
Add a rdf:subClassOf matching declaration in the WHERE part of the request.
|
OperationResult<WhereExpression> |
addSubClassOfStar(java.lang.String var,
TripleElement type)
Add a rdfs:subClassOf* matching declaration in the WHERE part of the request.
|
boolean |
addTime(java.lang.String var,
java.lang.String varTime,
boolean isDateTime)
Add a time declaration in the WHERE part of the request.
|
OperationResult<WhereExpression> |
addType(java.lang.String var,
short exprKind,
TripleElement type)
Add a matching declaration in the WHERE part of the request.
|
OperationResult<WhereExpression> |
addType(java.lang.String var,
TripleElement type)
Add a rdf:type matching declaration in the WHERE part of the request.
|
OperationResult<WhereExpression> |
addType(VariableOrIRI varOrIRI,
TripleElement type)
Add a rdf:type matching declaration in the WHERE part of the request.
|
OperationResult<WhereExpression> |
addTypeSubClassOf(java.lang.String var,
TripleElement type)
Add a rdf:type/rdfs:subClassOf matching declaration in the WHERE part of the request.
|
OperationResult<WhereExpression> |
addVariableSubClassOf(java.lang.String var,
TripleElement type)
Add a rdf:subClassOf matching declaration in the WHERE part of the request.
|
OperationResult<WhereExpression> |
addVariableSubClassOfStar(java.lang.String var,
TripleElement type)
Add a rdfs:subClassOf* matching declaration in the WHERE part of the request.
|
OperationResult<WhereExpression> |
addVariableType(java.lang.String var,
short exprKind,
TripleElement type)
Add a matching declaration in the WHERE part of the request.
|
OperationResult<WhereExpression> |
addVariableType(java.lang.String var,
TripleElement type)
Add a rdf:type matching declaration in the WHERE part of the request.
|
OperationResult<WhereExpression> |
addVariableTypeSubClassOf(java.lang.String var,
TripleElement type)
Add a rdf:type/rdfs:subClassOf matching declaration in the WHERE part of the request.
|
boolean |
checkValidity()
Check the validity of the SPARQL expression for the group expression.
|
java.util.Map<java.lang.String,Variable> |
getAdditionalVars()
Return the additional variables.
|
java.lang.String |
getDefaultPrefix()
Return the default prefix.
|
WhereForm |
getEffectiveWhereForm()
Return the WHERE form.
|
int |
getOffset()
Return the OFFSET of the number of results.
|
java.util.List<SparqlRequestGroup> |
getOptionals()
Return the list of optional groups in this request.
|
SparqlRequest |
getRootRequest()
Return the top level request.
|
java.util.List<SelectItem> |
getSelectList()
Return the list of SELECT items.
|
java.util.Map<java.lang.String,SelectItem> |
getSelectMap()
Return the map of SELECT items.
|
java.util.List<Union> |
getUnions()
Return the list of unions in this request.
|
boolean |
hasAdditionalVariable(java.lang.String var)
Return true if there is an additional variable with a specified name.
|
boolean |
hasUnions()
Return true if there are unions in this request.
|
boolean |
isCheckingVariablesExistence()
Return true if the variables existence if checked during the creation of the request.
|
boolean |
isLoggingErrors()
Return true if errors should be logged by the framework.
|
void |
resetSPARQLResult()
Reset the SPARQL result used in serialization.
|
void |
setLevel(int level)
Return the level of the request.
|
void |
writeSPARQLImpl(java.lang.StringBuilder buf) |
void |
writeSPARQLImpl(java.lang.StringBuilder buf,
boolean inUnion) |
void |
writeSPARQLImpl(java.lang.StringBuilder buf,
boolean inUnion,
boolean includeComments) |
addAdditionalVariable, addAdditionalVariable, addAsk, addDelete, addInsert, addInsertData, addIRI, addProperty, addVariable, addVariableOrIRI, appendTypeExpression, checkVariableExistence, createAdditionalVariable, createIRI, createVariable, getAskForm, getBinds, getCoalesces, getDeleteForms, getDistances, getFilters, getGeometries, getGraphPatterns, getInsertForms, getIRI, getIRIs, getLastInsertForm, getLevel, getOwlTimes, getPrefix, getPrefix, getPropertyIndRefs, getPropertyRefs, getPropertyValues, getSelectForm, getVariable, getVariableOrIRI, getVariables, getVariablesIterator, getVariablesOrIRIIterator, getVariableType, getWhereExpressions, getWhereForm, hasAskForm, hasIRI, hasSelectVariable, hasVariable, hasVariableOrIRI, isSelectAllclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddAutoVariable, addLabel, addProperty, addPropertyIndividualRef, addPropertyIndividualRef, addPropertyRef, addPropertyRef, addPropertyRef, addPropertyRef, addPropertyRef, addPropertyValue, addPropertyValue, addPropertyValue, addPropertyValue, addPropertyValues, addPropertyValues, addPropertyValues, addSubClassOf, addSubClassOfStar, addType, addType, addTypeSubClassOf, addVariableSubClassOf, addVariableSubClassOfStar, addVariableType, addVariableType, addVariableTypeSubClassOf, getAllVariables, hasDeleteForms, hasFilters, hasInsertForms, isFlat, removeSelectindent, indentMore, indentParentprotected ISparqlRequestGroup parentRequest
public SparqlRequestGroup(ISparqlRequestGroup parent)
public void setLevel(int level)
level - the level of the requestpublic SparqlRequest getRootRequest()
ISparqlRequestGroupgetRootRequest in interface ISparqlRequestGrouppublic java.util.List<Union> getUnions()
ISparqlRequestGroupgetUnions in interface ISparqlRequestGrouppublic boolean hasUnions()
ISparqlRequestGrouphasUnions in interface ISparqlRequestGrouppublic java.lang.String addAutoVariable(java.lang.String radix)
addAutoVariable in interface ISparqlRequestGroupradix - the variable radixpublic java.lang.String getDefaultPrefix()
getDefaultPrefix in interface ISparqlRequestGrouppublic int getOffset()
getOffset in interface ISparqlRequestGrouppublic boolean isCheckingVariablesExistence()
checkValidity() before the generation.isCheckingVariablesExistence in interface ISparqlRequestGrouppublic boolean isLoggingErrors()
isLoggingErrors in interface ISparqlRequestGrouppublic java.util.List<SparqlRequestGroup> getOptionals()
ISparqlRequestGroupgetOptionals in interface ISparqlRequestGrouppublic java.util.Map<java.lang.String,SelectItem> getSelectMap()
ISparqlRequestGroupgetSelectMap in interface ISparqlRequestGrouppublic java.util.List<SelectItem> getSelectList()
ISparqlRequestGroupgetSelectList in interface ISparqlRequestGrouppublic WhereForm getEffectiveWhereForm()
getEffectiveWhereForm in interface ISparqlRequestGrouppublic java.util.Map<java.lang.String,Variable> getAdditionalVars()
getAdditionalVars in interface ISparqlRequestGroupgetAdditionalVars in class AbstractSparqlRequestpublic boolean hasAdditionalVariable(java.lang.String var)
AbstractSparqlRequesthasAdditionalVariable in interface ISparqlRequestGrouphasAdditionalVariable in class AbstractSparqlRequestvar - the variable namepublic boolean addDistance(java.lang.String var,
java.lang.String fromVar,
java.lang.String varDist,
short unit,
boolean isExact)
addDistance in interface ISparqlRequestGroupvar - the variable namefromVar - the other elment variable namevarDist - the distance variable nameunit - the unitisExact - the name for an exact geometrypublic Filter addFilter()
addFilter in interface ISparqlRequestGrouppublic Filter addHaving()
addHaving in interface ISparqlRequestGrouppublic Bind addBind()
addBind in interface ISparqlRequestGrouppublic Bind addBind(java.lang.String var)
addBind in interface ISparqlRequestGroupvar - the variablepublic Coalesce addCoalesce()
addCoalesce in interface ISparqlRequestGrouppublic boolean addTime(java.lang.String var,
java.lang.String varTime,
boolean isDateTime)
addTime in interface ISparqlRequestGroupvar - the variable namevarTime - the time variable nameisDateTime - true for a dateTime propertypublic boolean addGeometry(java.lang.String var,
java.lang.String varLat,
java.lang.String varLon,
boolean isExact)
addGeometry in interface ISparqlRequestGroupvar - the variable namevarLat - the latitude variable namevarLon - the longitude variable nameisExact - the name for an exact geometrypublic OperationResult<? extends SparqlElement> addPropertyValue(java.lang.String var, TripleElement type, java.lang.Object propertyValue, boolean optional)
addPropertyValue in interface ISparqlRequestGroupvar - the variable nametype - the typepropertyValue - the property valueoptional - true for an optional patternpublic OperationResult<Property> addPropertyValues(java.lang.String var, TripleElement type, java.util.List<? extends java.lang.Object> propValues, boolean optional)
addPropertyValues in interface ISparqlRequestGroupvar - the variable nametype - the typepropValues - the property valuesoptional - true for an optional patternpublic OperationResult<PropertyRef> addPropertyRef(java.lang.String var, TripleElement type, java.lang.String varRef, boolean optional)
addPropertyRef in interface ISparqlRequestGroupvar - the variable nametype - the typevarRef - the variable to use for the referenceoptional - true for an optional patternpublic OperationResult<PropertyRef> addPropertyRef(VariableOrIRI varOrIRI, TripleElement type, VariableOrIRI varOrIRIRef, boolean optional)
addPropertyRef in interface ISparqlRequestGroupvarOrIRI - the variable or IRItype - the typevarOrIRIRef - the variable or IRI to use for the referenceoptional - true for an optional patternpublic OperationResult<? extends SparqlElement> addPropertyIndividualRef(java.lang.String var, TripleElement type, java.lang.String individual, boolean optional)
addPropertyIndividualRef in interface ISparqlRequestGroupvar - the variable nametype - the typeindividual - the individual nameoptional - true for an optional patternpublic OperationResult<WhereExpression> addSubClassOf(java.lang.String var, TripleElement type)
addSubClassOf in interface ISparqlRequestGroupvar - the variable nametype - the typepublic OperationResult<WhereExpression> addLabel(java.lang.String var, TripleElement type)
addLabel in interface ISparqlRequestGroupvar - the variable nametype - the typepublic OperationResult<WhereExpression> addSubClassOfStar(java.lang.String var, TripleElement type)
addSubClassOfStar in interface ISparqlRequestGroupvar - the variable nametype - the typepublic OperationResult<WhereExpression> addType(java.lang.String var, short exprKind, TripleElement type)
ExpressionTypes.TYPE: a rdf:type expressionExpressionTypes.SUBCLASS_OF: a rdfs:subClassOf expressionExpressionTypes.SUBCLASS_OF_STAR: a rdfs:subClassOf* expressionExpressionTypes.TYPE_SUBCLASS_OF: a rdf:type/rdfs:subClassOf expressionaddType in interface ISparqlRequestGroupvar - the variable nameexprKind - the expression kindtype - the typepublic OperationResult<WhereExpression> addTypeSubClassOf(java.lang.String var, TripleElement type)
addTypeSubClassOf in interface ISparqlRequestGroupvar - the variable nametype - the typepublic OperationResult<WhereExpression> addType(java.lang.String var, TripleElement type)
addType in interface ISparqlRequestGroupvar - the variable nametype - the typepublic OperationResult<WhereExpression> addType(VariableOrIRI varOrIRI, TripleElement type)
addType in interface ISparqlRequestGroupvarOrIRI - the variable or IRItype - the typepublic OperationResult<WhereExpression> addVariableSubClassOf(java.lang.String var, TripleElement type)
addVariableSubClassOf in interface ISparqlRequestGroupvar - the variable nametype - the typepublic OperationResult<WhereExpression> addVariableSubClassOfStar(java.lang.String var, TripleElement type)
addVariableSubClassOfStar in interface ISparqlRequestGroupvar - the variable nametype - the typepublic OperationResult<WhereExpression> addVariableType(java.lang.String var, short exprKind, TripleElement type)
ExpressionTypes.TYPE: a rdf:type expressionExpressionTypes.SUBCLASS_OF: a rdfs:subClassOf expressionExpressionTypes.SUBCLASS_OF_STAR: a rdfs:subClassOf* expressionExpressionTypes.TYPE_SUBCLASS_OF: a rdf:type/rdfs:subClassOf expressionaddVariableType in interface ISparqlRequestGroupvar - the variable nameexprKind - the expression kindtype - the typepublic OperationResult<WhereExpression> addVariableTypeSubClassOf(java.lang.String var, TripleElement type)
addVariableTypeSubClassOf in interface ISparqlRequestGroupvar - the variable nametype - the typepublic OperationResult<WhereExpression> addVariableType(java.lang.String var, TripleElement type)
addVariableType in interface ISparqlRequestGroupvar - the variable nametype - the typepublic boolean checkValidity()
public void resetSPARQLResult()
ISparqlRequestGroupresetSPARQLResult in interface ISparqlRequestGrouppublic void writeSPARQLImpl(java.lang.StringBuilder buf)
public void writeSPARQLImpl(java.lang.StringBuilder buf,
boolean inUnion)
public void writeSPARQLImpl(java.lang.StringBuilder buf,
boolean inUnion,
boolean includeComments)
Copyright © 2025, 2026 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence