Class 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.
  • 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

      Specified by:
      toBuilder in class PlanNodeBodyServiceQuery
    • customTermReplacement

      public boolean customTermReplacement()
    • supportsConstantReplacement

      public boolean supportsConstantReplacement()