Stores the metadata triples and provides methods for easy access. Most functions return the metadata object to allow for chaining.

Constructors

Properties

logger: Logger = ...

Accessors

Methods

  • Parameters

    • subject: string | BlankNode | NamedNode<string>

      Subject of quad to add.

    • predicate: NamedNode<string>

      Predicate of quad to add.

    • object:
          | string
          | BlankNode
          | Literal
          | NamedNode<string>

      Object of quad to add.

    • Optionalgraph: MetadataGraph

      Optional graph of quad to add.

    Returns this

  • Parameters

    • predicate: NamedNode<string>

      Predicate to get the value for.

    • Optionalgraph: MetadataGraph

      Optional graph where the triple should be found.

    Returns undefined | Term

    The corresponding value. Undefined if there is no match

    Error If there are multiple matching values.

  • Finds all object values matching the given predicate and/or graph.

    Parameters

    • predicate: NamedNode<string>

      Optional predicate to get the values for.

    • Optionalgraph: MetadataGraph

      Optional graph where to get from.

    Returns Term[]

    An array with all matches.

  • Verifies if a specific triple can be found in the metadata. Undefined parameters are interpreted as wildcards.

    Parameters

    • predicate: null | string | NamedNode<string> = null
    • object:
          | null
          | string
          | BlankNode
          | Literal
          | NamedNode<string> = null
    • graph: null | MetadataGraph = null

    Returns boolean

  • Parameters

    • subject:
          | null
          | string
          | BlankNode
          | NamedNode<string> = null
    • predicate: null | NamedNode<string> = null
    • object:
          | null
          | string
          | BlankNode
          | Literal
          | NamedNode<string> = null
    • graph: null | MetadataGraph = null

    Returns Quad[]

    All matching metadata quads.

  • Parameters

    • subject: string | BlankNode | NamedNode<string>

      Subject of quad to remove.

    • predicate: NamedNode<string>

      Predicate of quad to remove.

    • object:
          | string
          | BlankNode
          | Literal
          | NamedNode<string>

      Object of quad to remove.

    • Optionalgraph: MetadataGraph

      Optional graph of quad to remove.

    Returns this

  • Sets the value for the given predicate, removing all other instances. In case the object is undefined this is identical to removeAll(predicate).

    Parameters

    • predicate: NamedNode<string>

      Predicate linking to the value.

    • Optionalobject: MetadataValue

      Value(s) to set.

    • Optionalgraph: MetadataGraph

      Optional graph where the triple should be stored.

    Returns this