Comunica
    Preparing search index...
    interface IRdfJsSourceExtended {
        countDistinctTerms?: (termNames: QuadTermName[]) => number;
        countNodes?: (graph: Term) => number;
        countQuads?: (
            subject?: Term,
            predicate?: Term,
            object?: Term,
            graph?: Term,
        ) => number | Promise<number>;
        features?: {
            indexDistinctTerms?: boolean;
            indexNodes?: boolean;
            quotedTripleFiltering?: boolean;
        };
        matchBindings?: (
            bindingsFactory: BindingsFactory,
            subject: Term,
            predicate: Term,
            object: Term,
            graph: Term,
        ) => EventEmitter;
        matchDistinctTerms?: (termNames: QuadTermName[]) => EventEmitter;
        matchNodes?: (graph: Term) => EventEmitter;
        match(
            subject?: Term | null,
            predicate?: Term | null,
            object?: Term | null,
            graph?: Term | null,
        ): Stream<Quad>;
    }

    Hierarchy

    • Source
      • IRdfJsSourceExtended
    Index

    Properties

    countDistinctTerms?: (termNames: QuadTermName[]) => number

    Returns the number of distinct combinations of the specified terms.

    This will only be used if features.indexDistinctTerms is true.

    countNodes?: (graph: Term) => number

    Returns the number of nodes in the given graph. Nodes are all terms that are either a subject or object within the graph.

    This will only be used if features.indexNodes is true.

    countQuads?: (
        subject?: Term,
        predicate?: Term,
        object?: Term,
        graph?: Term,
    ) => number | Promise<number>

    Return an estimated count of the number of quads matching the given pattern.

    The better the estimate, the better the query engine will be able to optimize the query.

    Type Declaration

      • (
            subject?: Term,
            predicate?: Term,
            object?: Term,
            graph?: Term,
        ): number | Promise<number>
      • Parameters

        • Optionalsubject: Term

          An optional subject.

        • Optionalpredicate: Term

          An optional predicate.

        • Optionalobject: Term

          An optional object.

        • Optionalgraph: Term

          An optional graph.

        Returns number | Promise<number>

    features?: {
        indexDistinctTerms?: boolean;
        indexNodes?: boolean;
        quotedTripleFiltering?: boolean;
    }

    A record indicating supported features of this source.

    Type Declaration

    • OptionalindexDistinctTerms?: boolean

      If this is true, matchDistinctTerms and countDistinctTerms must be available.

    • OptionalindexNodes?: boolean

      If this is true, matchNodes and countNodes must be available.

    • OptionalquotedTripleFiltering?: boolean

      If true, this source supports passing quad patterns with quoted quad patterns in the match method. If false (or if features is undefined), such quoted quad patterns can not be passed, and must be replaced by undefined and filtered by the caller afterwards.

    matchBindings?: (
        bindingsFactory: BindingsFactory,
        subject: Term,
        predicate: Term,
        object: Term,
        graph: Term,
    ) => EventEmitter

    Returns a stream that produces all bindings matching the pattern.

    Type Declaration

      • (
            bindingsFactory: BindingsFactory,
            subject: Term,
            predicate: Term,
            object: Term,
            graph: Term,
        ): EventEmitter
      • Parameters

        • bindingsFactory: BindingsFactory

          The factory that will be used to create bindings.

        • subject: Term

          The subject, which can be a variable.

        • predicate: Term

          The predicate, which can be a variable.

        • object: Term

          The object, which can be a variable.

        • graph: Term

          The graph, which can be a variable.

        Returns EventEmitter

    matchDistinctTerms?: (termNames: QuadTermName[]) => EventEmitter

    Returns a stream that produces all distinct combinations of the specified terms. The stream produces arrays where each element corresponds to a term in the termNames array.

    This will only be used if features.indexDistinctTerms is true.

    matchNodes?: (graph: Term) => EventEmitter

    Returns a stream that produces all nodes as terms in the given graph. Nodes are all terms that are either a subject or object within the graph.

    This will only be used if features.indexNodes is true.

    Methods

    • Returns a stream that processes all quads matching the pattern.

      Parameters

      • Optionalsubject: Term | null

        The optional subject.

      • Optionalpredicate: Term | null

        The optional predicate.

      • Optionalobject: Term | null

        The optional object.

      • Optionalgraph: Term | null

        The optional graph.

      Returns Stream<Quad>

      The resulting quad stream.