Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface CollectionFactory<FactoryTypes, IndexType>

Type parameters

  • FactoryTypes

  • IndexType

Hierarchy

Index

Properties

blankNode

blankNode: (value?: undefined | string) => BlankNode

Returns a new instance of BlankNode. If the value parameter is undefined a new identifier for the blank node is generated for each call.

Type declaration

    • Parameters

      • Optional value: undefined | string

      Returns BlankNode

defaultGraph

defaultGraph: () => DefaultGraph | NamedNode | BlankNode

Returns an instance of DefaultGraph.

Type declaration

Optional fromQuad

fromQuad: undefined | ((original: Quad) => Quad)

Returns a new instance of Quad, such that newObject.equals(original) returns true. Not implemented in RDFJS, so optional.

Optional fromTerm

fromTerm: undefined | ((original: Term) => Term)

Returns a new instance of the specific Term subclass given by original.termType (e.g., NamedNode, BlankNode, Literal, etc.), such that newObject.equals(original) returns true. Not implemented in RDFJS, so optional.

namedNode

namedNode: (value: string) => NamedNode

Returns a new instance of NamedNode.

Type declaration

supports

supports: SupportTable

Optional variable

variable: undefined | ((value: string) => Variable)

Returns a new instance of Variable. This method is optional.

Methods

collection

equals

id

  • id(obj: Term | FactoryTypes): IndexType
  • Generates a unique session-idempotent identifier for the given object.

    example

    NQ serialization (reversible from value)

    example

    MD5 hash of termType + value (irreversible from value, map needed)

    Parameters

    • obj: Term | FactoryTypes

    Returns IndexType

    A unique value which must also be a valid JS object key type.

isQuad

  • isQuad(obj: any): obj is Statement

literal

  • literal(value: string, languageOrDatatype?: string | TFNamedNode): Literal

quad

quadToNQ

termToNQ

  • termToNQ(term: Term): string

toNQ

  • toNQ(term: Term | FactoryTypes): string