Class SPARQLRequestImpl

java.lang.Object
se.liu.ida.hefquin.federation.access.impl.req.SPARQLRequestImpl
All Implemented Interfaces:
DataRetrievalRequest, SPARQLRequest

public class SPARQLRequestImpl extends Object implements SPARQLRequest
  • Field Details

    • pattern

      protected final SPARQLGraphPattern pattern
    • projectionVars

      protected final Set<org.apache.jena.sparql.core.Var> projectionVars
    • distinctRequired

      protected final boolean distinctRequired
    • query

      protected final SPARQLQuery query
    • expectedVars

      protected final ExpectedVariables expectedVars
  • Constructor Details

    • SPARQLRequestImpl

      public SPARQLRequestImpl(SPARQLGraphPattern pattern)
    • SPARQLRequestImpl

      public SPARQLRequestImpl(SPARQLGraphPattern pattern, Set<org.apache.jena.sparql.core.Var> projectionVars, boolean distinctRequired)
    • SPARQLRequestImpl

      public SPARQLRequestImpl(SPARQLQuery query)
  • Method Details

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getQueryPattern

      public SPARQLGraphPattern getQueryPattern()
      Description copied from interface: SPARQLRequest
      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 method SPARQLRequest.getQuery().
      Specified by:
      getQueryPattern in interface SPARQLRequest
    • getProjectionVars

      public Set<org.apache.jena.sparql.core.Var> getProjectionVars()
      Description copied from interface: SPARQLRequest
      Returns the set of variables that should be projected in the result, or null if 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:
      getProjectionVars in interface SPARQLRequest
    • getDistinctRequired

      public boolean getDistinctRequired()
      Description copied from interface: SPARQLRequest
      Returns true if this request explicitly requires that the requested result is duplicate free.
      Specified by:
      getDistinctRequired in interface SPARQLRequest
      Returns:
      true if duplicate elimination is requested; false otherwise
    • getQuery

      public SPARQLQuery getQuery()
      Description copied from interface: SPARQLRequest
      Returns the SPARQL query for which solutions should be requested.
      Specified by:
      getQuery in interface SPARQLRequest
    • getExpectedVariables

      public ExpectedVariables getExpectedVariables()
      Description copied from interface: DataRetrievalRequest
      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'. For the distinction between these two types of variables, refer to ExpectedVariables.getCertainVariables() and to
      invalid @link
      {@link ExpectedVariables#getPossibleVariables())
      }. 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).
      Specified by:
      getExpectedVariables in interface DataRetrievalRequest
    • toString

      public String toString()
      Specified by:
      toString in interface DataRetrievalRequest
      Overrides:
      toString in class Object