Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NamedNode

RDF/JS spec NamedNode A named (IRI) RDF node

link

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

Hierarchy

Implements

Implemented by

Index

Constructors

constructor

Properties

classOrder

classOrder: number = ClassOrder.NamedNode

termType

termType: "NamedNode" = NamedNodeTermType

value

value: string

Static toJS

toJS: function

Type declaration

    • (term: any): Date | Number | string | boolean | object | Array<Date | Number | string | boolean | object>
    • Parameters

      • term: any

      Returns Date | Number | string | boolean | object | Array<Date | Number | string | boolean | object>

Accessors

uri

  • get uri(): string
  • set uri(uri: string): void
  • Legacy getter and setter alias, node.uri

    deprecated

    use value

    Returns string

  • Legacy getter and setter alias, node.uri

    Parameters

    • uri: string

    Returns void

Methods

compareTerm

  • compareTerm(other: Node): number
  • Compares this node with another

    see

    {equals} to check if two nodes are equal

    Parameters

    • other: Node

      The other node

    Returns number

dir

  • dir(): NamedNode | null
  • Returns an $rdf node for the containing directory, ending in slash.

    Returns NamedNode | null

doc

  • doc(): NamedNode
  • Creates the fetchable named node for the document. Removes everything from the # anchor tag.

    Returns NamedNode

equals

  • equals(other: Term): boolean
  • Compare this term with {other} for structural equality

    Note that the task force spec only allows comparison with other terms

    Parameters

    Returns boolean

hashString

  • hashString(): string

id

  • id(): string
  • The local identifier with the document

    Returns string

sameTerm

  • sameTerm(other: Node): boolean

site

  • site(): NamedNode
  • Returns an NN for the whole web site, ending in slash. Contrast with the "origin" which does NOT have a trailing slash

    Returns NamedNode

substitute

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

    Type parameters

    Parameters

    • bindings: Bindings

      Bindings of identifiers to nodes

    Returns T

toCanonical

  • toCanonical(): string

toNQ

  • toNQ(): string

toNT

  • toNT(): string

toString

  • toString(): string

Static fromValue

  • fromValue(value: any): any
  • Creates a named node from the specified input value

    Parameters

    • value: any

      An input value

    Returns any