Package com.complexible.stardog.plan.eval.service

# Class LogicalServiceQuery

java.lang.Object
com.complexible.stardog.plan.eval.service.ServiceQuery
com.complexible.stardog.plan.eval.service.PlanNodeBodyServiceQuery
com.complexible.stardog.plan.eval.service.LogicalServiceQuery

public class LogicalServiceQuery extends PlanNodeBodyServiceQuery
Service query which represents a logical service query to be used in the early stages of rewriting and optimization. Can be converted to a `physical query` when rewriting is complete.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `protected static class`
  `LogicalServiceQuery.LogicalServiceQueryBuilder`

  ## Nested classes/interfaces inherited from class com.complexible.stardog.plan.eval.service.PlanNodeBodyServiceQuery

  `PlanNodeBodyServiceQuery.CanonicalizedPlanNodeBodyServiceQuery, PlanNodeBodyServiceQuery.CanonicalizedPlanNodeBodyServiceQueryBuilder, PlanNodeBodyServiceQuery.PlanNodeBodyServiceQueryBuilder`

  ## Nested classes/interfaces inherited from class com.complexible.stardog.plan.eval.service.ServiceQuery

  `ServiceQuery.DistinctValuesEstimationFunction, ServiceQuery.ServiceQueryBuilder`

- ## Field Summary

  ### Fields inherited from class com.complexible.stardog.plan.eval.service.ServiceQuery

  `DEFAULT_CARDINALITY, mCardinality, mOptions`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LogicalServiceQuery(Service theService, IRI theServiceIri, com.complexible.stardog.plan.PlanNode theBody)`
  `LogicalServiceQuery(Service theService, IRI theServiceIri, com.complexible.stardog.plan.PlanNode theBody, com.complexible.stardog.plan.eval.service.ServiceQueryOptions theOptions)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `customTermReplacement()`
  `com.complexible.stardog.plan.eval.operator.SolutionIterator`
  `evaluate(com.complexible.stardog.plan.eval.ExecutionContext theContext, com.complexible.stardog.plan.eval.operator.Operator theArg, com.complexible.stardog.plan.PlanVarInfo theVarInfo)`
  Evaluate the query
  `Service`
  `getService()`
  `boolean`
  `isClosed()`
  Is the service query "closed"? or can we still use it?
  `LogicalServiceQuery`
  `replaceBody(com.complexible.stardog.plan.PlanNode newBody)`
  `com.complexible.stardog.plan.PlanNode`
  `replaceBodyTerms(com.complexible.stardog.plan.util.PlanNodeVarReplacer termReplacer, com.complexible.stardog.plan.ServicePlanNode node)`
  The default implementation of query term replacement in a service body represented as a plan node
  `boolean`
  `supportsConstantReplacement()`
  `PlanNodeBodyServiceQuery.PlanNodeBodyServiceQueryBuilder`
  `toBuilder()`
  `com.complexible.stardog.plan.PlanNode`
  `toPhysicalQuery(com.complexible.stardog.plan.optimizer.OptimizationContext theOptimizationContext, com.complexible.stardog.plan.QueryTerm context, IntFunction<String> varNames, Function<String,Integer> varAllocator, boolean silent)`
  Translate the logical query to a physical plan tree, typically built using service queries as data sources.

  ### Methods inherited from class com.complexible.stardog.plan.eval.service.PlanNodeBodyServiceQuery

  `body, equals, explain, explainVerbose, getAllVars, getAssuredVars, getContextVars, getObjectVars, getPredicateVars, getSubjectVars, getTermPositionPredicate, hashCode, noopBuilder, replaceBodyTerms`

  ### Methods inherited from class com.complexible.stardog.plan.eval.service.ServiceQuery

  `alternativeDistinctValues, canServiceJoin, distinctValues, estimateCardinality, estimateJoinCardinality, evaluate, evaluateSilent, evaluateSilent, generatesValues, get, getCardinality, getNamespaces, getOptions, getRequiredInputBindings, getRequiredUnboundOutputs, getUnsatisfiableConstraintsMessage, hasDuplicates, isBodySparqlQuery, preservesJoinArgumentOrdering, serviceTerm, setCardinality, setNamespaces, supportsJoinArgument`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### LogicalServiceQuery

    public LogicalServiceQuery(@Nullable Service theService, IRI theServiceIri, com.complexible.stardog.plan.PlanNode theBody)
    Parameters:
      `theService` - can be null for variable-service queries and tests

  - ### LogicalServiceQuery

    public LogicalServiceQuery(@Nullable Service theService, IRI theServiceIri, com.complexible.stardog.plan.PlanNode theBody, com.complexible.stardog.plan.eval.service.ServiceQueryOptions theOptions)

- ## Method Details

  - ### getService

    public Service getService()

  - ### evaluate

    public com.complexible.stardog.plan.eval.operator.SolutionIterator evaluate(com.complexible.stardog.plan.eval.ExecutionContext theContext, com.complexible.stardog.plan.eval.operator.Operator theArg, com.complexible.stardog.plan.PlanVarInfo theVarInfo) throws com.complexible.stardog.plan.eval.operator.OperatorException
    Description copied from class: `ServiceQuery`
    Evaluate the query
    Specified by:
      `evaluate` in class `ServiceQuery`
    Parameters:
      `theArg` - a SIP join argument, null if not present. Solutions from the argument which satisfy the join must retain all bindings, including those which are not used in the join. Note that variables in the argument may be unassured.
    Throws:
      `com.complexible.stardog.plan.eval.operator.OperatorException`

  - ### replaceBody

    public LogicalServiceQuery replaceBody(com.complexible.stardog.plan.PlanNode newBody)
    Overrides:
      `replaceBody` in class `PlanNodeBodyServiceQuery`

  - ### replaceBodyTerms

    public com.complexible.stardog.plan.PlanNode replaceBodyTerms(com.complexible.stardog.plan.util.PlanNodeVarReplacer termReplacer, com.complexible.stardog.plan.ServicePlanNode node)
    Description copied from class: `PlanNodeBodyServiceQuery`
    The default implementation of query term replacement in a service body represented as a plan node
    Overrides:
      `replaceBodyTerms` in class `PlanNodeBodyServiceQuery`

  - ### toPhysicalQuery

    public com.complexible.stardog.plan.PlanNode toPhysicalQuery(com.complexible.stardog.plan.optimizer.OptimizationContext theOptimizationContext, com.complexible.stardog.plan.QueryTerm context, IntFunction<String> varNames, Function<String,Integer> varAllocator, boolean silent)
    Translate the logical query to a physical plan tree, typically built using service queries as data sources.

  - ### isClosed

    public boolean isClosed()
    Description copied from class: `ServiceQuery`
    Is the service query "closed"? or can we still use it?
    Overrides:
      `isClosed` in class `ServiceQuery`

  - ### toBuilder

    public PlanNodeBodyServiceQuery.PlanNodeBodyServiceQueryBuilder toBuilder()
    Specified by:
      `toBuilder` in class `PlanNodeBodyServiceQuery`

  - ### customTermReplacement

    public boolean customTermReplacement()

  - ### supportsConstantReplacement

    public boolean supportsConstantReplacement()