Class SPARQLRequestImpl
java.lang.Object
se.liu.ida.hefquin.federation.access.impl.req.SPARQLRequestImpl
- All Implemented Interfaces:
DataRetrievalRequest,SPARQLRequest
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final booleanprotected final ExpectedVariablesprotected final SPARQLGraphPatternprotected final Set<org.apache.jena.sparql.core.Var> protected final SPARQLQuery -
Constructor Summary
ConstructorsConstructorDescriptionSPARQLRequestImpl(SPARQLGraphPattern pattern) SPARQLRequestImpl(SPARQLGraphPattern pattern, Set<org.apache.jena.sparql.core.Var> projectionVars, boolean distinctRequired) SPARQLRequestImpl(SPARQLQuery query) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanReturnstrueif this request explicitly requires that the requested result is duplicate free.Returns the query variables for which this data retrieval request aims to fetch data (if any), where some of these variables may be 'certain variables' whereas others are 'possible variables'.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.getQuery()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 methodSPARQLRequest.getQuery().inthashCode()toString()
-
Field Details
-
pattern
-
projectionVars
-
distinctRequired
protected final boolean distinctRequired -
query
-
expectedVars
-
-
Constructor Details
-
SPARQLRequestImpl
-
SPARQLRequestImpl
public SPARQLRequestImpl(SPARQLGraphPattern pattern, Set<org.apache.jena.sparql.core.Var> projectionVars, boolean distinctRequired) -
SPARQLRequestImpl
-
-
Method Details
-
equals
-
hashCode
-
getQueryPattern
Description copied from interface:SPARQLRequestReturns 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 methodSPARQLRequest.getQuery().- Specified by:
getQueryPatternin interfaceSPARQLRequest
-
getProjectionVars
Description copied from interface:SPARQLRequestReturns 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.
- Specified by:
getProjectionVarsin interfaceSPARQLRequest
-
getDistinctRequired
public boolean getDistinctRequired()Description copied from interface:SPARQLRequestReturnstrueif this request explicitly requires that the requested result is duplicate free.- Specified by:
getDistinctRequiredin interfaceSPARQLRequest- Returns:
trueif duplicate elimination is requested;falseotherwise
-
getQuery
Description copied from interface:SPARQLRequestReturns the SPARQL query for which solutions should be requested.- Specified by:
getQueryin interfaceSPARQLRequest
-
getExpectedVariables
Description copied from interface:DataRetrievalRequestReturns the query variables for which this data retrieval request aims to fetch data (if any), where some of these variables may be 'certain variables' whereas others are 'possible variables'. For the distinction between these two types of variables, refer toExpectedVariables.getCertainVariables()and to}. For instance, if this request is about fetching triples that match a given triple pattern, then the variables of that triple pattern would be returned here as certain variables. Note that the method may also return null (which would be the case for types of data retrieval requests for which this method is not applicable in any reasonable way).invalid @link
{@link ExpectedVariables#getPossibleVariables())- Specified by:
getExpectedVariablesin interfaceDataRetrievalRequest
-
toString
- Specified by:
toStringin interfaceDataRetrievalRequest- Overrides:
toStringin classObject
-