Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface RdfJsDataFactory

RDF/JS spec DataFactory

Not 100% compliant due to to practicality problems.

link

https://rdf.js.org/data-model-spec/#datafactory-interface

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

Returns an instance of DefaultGraph.

Type declaration

    • (): DefaultGraph
    • Returns DefaultGraph

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.

literal

literal: (value: string, languageOrDatatype: string | NamedNode) => Literal

Returns a new instance of Literal. If languageOrDatatype is a NamedNode, then it is used for the value of datatype. Otherwise languageOrDatatype is used for the value of language.

Type declaration

    • (value: string, languageOrDatatype: string | NamedNode): Literal
    • Parameters

      • value: string
      • languageOrDatatype: string | NamedNode

      Returns Literal

namedNode

namedNode: (value: string) => NamedNode

Returns a new instance of NamedNode.

Type declaration

quad

quad: (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

supports

supports: SupportTable

Check for specific features/behaviour on the factory.

This does not exist on the original RDF/JS spec

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

Optional variable

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

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