An abstract actor that handles Path operations.

Provides multiple helper functions used by the Path operation actors.

Hierarchy (view full)

Constructors

Properties

Actor that must be registered in the bus before this actor.

The bus this actor subscribes to.

mediatorQueryOperation: MediatorQueryOperation
name: string

The name for this actor.

Default

{<rdf:subject>}
operationName: string
predicateType: string
FACTORY: default = ...

Methods

  • Pushes all terms to iterator it that are a solution of object predicate* ?o.

    Parameters

    • object: Term

      Term of where we start the predicate* search.

    • predicate: PropertyPathSymbol

      Predicate of the *-path.

    • graph: Term

      The graph in which we search for the pattern.

    • context: IActionContext
    • termHashes: Record<string, Term>

      Remembers the objects we've already searched for.

    • it: BufferedIterator<Term>

      Iterator to push terms to.

    • counter: any

      Counts how many searches are in progress to close it when needed (when counter == 0).

    Returns Promise<undefined | (() => Promise<MetadataBindings>)>

    The results metadata.

  • Returns an iterator with Bindings of the query subject predicate* ?o or subject predicate+ ?o If graph is a variable, it will also be in those bindings

    Parameters

    • subject: Term

      Term of where we start the predicate* search.

    • predicate: PropertyPathSymbol

      Predicate of the *-path.

    • object: Variable

      Variable of the zeroOrMore-query.

    • graph: Term

      The graph in which we search for the pattern. (Possibly a variable)

    • context: IActionContext

      The context to pass to sub-opertations

    • emitFirstSubject: boolean

      If the path operation is predicate*, otherwise it is predicate+.

    • bindingsFactory: BindingsFactory

    Returns Promise<IPathResultStream>

    Iterator to where all bindings of query should have been pushed.

  • Pushes all terms to iterator it that are a solution of ?s predicate* ?o.

    Parameters

    • subjectVar: Variable

      String representation of subjectVariable

    • objectVar: Variable

      String representation of objectVariable

    • subjectVal: Term

      Term of where we start the predicate* search.

    • objectVal: Term

      Found solution for an object, start for the new step.

    • predicate: PropertyPathSymbol

      Predicate of the *-path.

    • graph: Term

      The graph in which we search for the pattern.

    • context: IActionContext
    • termHashesGlobal: Record<string, Promise<Term[]>>

      Remembers solutions for when objectVal is already been calculated, can be reused when same objectVal occurs

    • termHashesCurrentSubject: Record<string, boolean>

      Remembers the pairs we've already searched for, can stop searching if so.

    • it: BufferedIterator<Bindings>

      Iterator to push terms to.

    • counter: any

      Counts how many searches are in progress to close it when needed (when counter == 0).

    • bindingsFactory: BindingsFactory

    Returns Promise<void>

    All solutions of query should have been pushed to it by then.

  • Check if the given shape accepts the given query operation.

    Parameters

    • shape: FragmentSelectorShape

      A shape to test the query operation against.

    • operation: Operation

      A query operation to test.

    • Optional options: {
          filterBindings?: boolean;
          joinBindings?: boolean;
      }

      Additional options to consider.

      • Optional filterBindings?: boolean

        If additional bindings will be pushed down to the source for filtering.

      • Optional joinBindings?: boolean

        If additional bindings will be pushed down to the source for joining.

    Returns boolean