Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BlankNode

RDF/JS spec Literal An RDF blank node is a Node without a URI

link

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

link

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

Hierarchy

Implements

Implemented by

Index

Constructors

constructor

  • new BlankNode(id?: string | unknown): BlankNode

Properties

classOrder

classOrder: number = ClassOrder.BlankNode

isBlank

isBlank: number = 1

Whether this is a blank node

isVar

isVar: number = 1

This type of node is a variable.

Note that the existence of this property already indicates that it is a variable.

termType

termType: "BlankNode" = BlankNodeTermType

value

value: string

Static NTAnonymousNodePrefix

NTAnonymousNodePrefix: "_:" = "_:"

Static fromValue

fromValue: function

Type declaration

Static nextId

nextId: number = 0

The next unique identifier for blank nodes

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

id

  • get id(): string
  • set id(value: string): void
  • The identifier for the blank node

    deprecated

    use value instead.

    Returns string

  • The identifier for the blank node

    Parameters

    • value: string

    Returns void

Methods

compareTerm

  • compareTerm(other: BlankNode): number

copy

  • Gets a copy of this blank node in the specified formula

    Parameters

    Returns BlankNode

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

sameTerm

  • sameTerm(other: Node): boolean

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