Class NodeAbstract

The superclass of all RDF Statement objects, that is NamedNode, Literal, BlankNode, etc. Should not be instantiated directly. Also called Term.

Link

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

Hierarchy

Constructors

Properties

classOrder: number

The class order for this node

termType: TermType

The type of node

value: string

The node's value

fromValue: (<T>(value: ValueType) => T)

Type declaration

    • <T>(value: ValueType): T
    • Type Parameters

      • T extends FromValueReturns<any>

      Parameters

      • value: ValueType

      Returns T

toJS: ((term: any) => string | boolean | object | Number | Date | (string | boolean | object | Number | Date)[])

Type declaration

    • (term: any): string | boolean | object | Number | Date | (string | boolean | object | Number | Date)[]
    • Parameters

      • term: any

      Returns string | boolean | object | Number | Date | (string | boolean | object | Number | Date)[]

Methods

  • Compares this node with another

    See

    to check if two nodes are equal

    Parameters

    • other: Node

      The other node

    Returns number

  • Compares whether the two nodes are equal

    Parameters

    • other: Term

      The other node

    Returns boolean

  • Creates a hash for this node

    Deprecated

    use {rdfFactory.id} instead if possible

    Returns string

  • Compares whether this node is the same as the other one

    Parameters

    • other: Node

      Another node

    Returns boolean

  • Creates the substituted node for this one, according to the specified bindings

    Type Parameters

    Parameters

    • bindings: Bindings

      Bindings of identifiers to nodes

    Returns T

  • Creates a canonical string representation of this node

    Returns string

  • Creates a n-triples string representation of this node

    Returns string

Generated using TypeDoc