Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IRDFlibDataFactory<IndexType>

Type parameters

  • 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

fetcher

fetcher: (store: IndexedFormula, options: any) => Fetcher

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.

graph

graph: (features?: any, opts?: any) => IndexedFormula

Type declaration

lit

lit: (val: string, lang?: undefined | string, dt?: NamedNode) => RDFlibLiteral

Type declaration

    • (val: string, lang?: undefined | string, dt?: NamedNode): RDFlibLiteral
    • Parameters

      • val: string
      • Optional lang: undefined | string
      • Optional dt: NamedNode

      Returns RDFlibLiteral

namedNode

namedNode: (value: string) => NamedNode

Returns a new instance of NamedNode.

Type declaration

st

st: (subject: Quad_Subject, predicate: Quad_Predicate, object: Quad_Object, graph?: Quad_Graph) => Statement

Type declaration

supports

supports: SupportTable

triple

triple: (subject: Quad_Subject, predicate: Quad_Predicate, object: Quad_Object) => Statement

Type declaration

Optional variable

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

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

Methods

equals

id

  • 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

    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