Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface CollectionFactory<FactoryTypes, IndexType>

Type parameters

  • FactoryTypes

  • IndexType

Hierarchy

Index

Properties

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.

supports

supports: SupportTable

triple

triple: (subject: Term, predicate: Term, object: Term, graph?: Term) => Quad<any, any, any, any>

Returns a new instance of Quad. If graph is undefined or null it MUST set graph to a DefaultGraph.

Type declaration

Methods

blankNode

  • blankNode(value?: undefined | string): BlankNode

collection

defaultGraph

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

namedNode

  • namedNode(value: string): NamedNode

quad

quadToNQ

termToNQ

  • termToNQ(term: Term): string

toNQ

  • toNQ(term: Term | FactoryTypes): string

variable

  • variable(value: string): Variable