Interface SPARQLRequest
- All Superinterfaces:
DataRetrievalRequest
- All Known Subinterfaces:
BGPRequest,TPFRequest,TriplePatternRequest,WrapperRequest
- All Known Implementing Classes:
BGPRequestImpl,SPARQLRequestImpl,TPFRequestImpl,TriplePatternRequestImpl
-
Method Summary
Modifier and TypeMethodDescriptionstatic SPARQLQueryconvertToQuery(SPARQLGraphPattern pattern, Set<org.apache.jena.sparql.core.Var> projectionVars, boolean distinctRequired) booleanReturnstrueif this request explicitly requires that the requested result is duplicate free.Set<org.apache.jena.sparql.core.Var> Returns the set of variables that should be projected in the result, ornullif no projection is specified for this request.default SPARQLQuerygetQuery()Returns the SPARQL query for which solutions should be requested.Returns the graph pattern for which solutions should be requested, or null if this request is based on an actual SPARQL query (to be accessed via the methodgetQuery().Methods inherited from interface se.liu.ida.hefquin.federation.access.DataRetrievalRequest
getExpectedVariables, toString
-
Method Details
-
getQueryPattern
SPARQLGraphPattern getQueryPattern()Returns the graph pattern for which solutions should be requested, or null if this request is based on an actual SPARQL query (to be accessed via the methodgetQuery(). -
getProjectionVars
Set<org.apache.jena.sparql.core.Var> getProjectionVars()Returns the set of variables that should be projected in the result, ornullif no projection is specified for this request.If a non-null set is returned (including the empty set), then projection is considered an explicit part of this request and must be respected by components that can support it.
Deciding whether such a projection can be safely applied or pushed into a request is the responsibility of the query planning and rewriting logic, not of this interface or its implementations.
-
getDistinctRequired
boolean getDistinctRequired()Returnstrueif this request explicitly requires that the requested result is duplicate free.- Returns:
trueif duplicate elimination is requested;falseotherwise
-
getQuery
Returns the SPARQL query for which solutions should be requested. -
convertToQuery
static SPARQLQuery convertToQuery(SPARQLGraphPattern pattern, Set<org.apache.jena.sparql.core.Var> projectionVars, boolean distinctRequired)
-