solid-ui
    Preparing search index...

    Class Literal

    An RDF literal, containing some value which isn't expressed as an IRI.

    Hierarchy (View Summary)

    Implements

    • Literal
    Index

    Constructors

    • Initializes a literal

      Parameters

      • value: string

        The literal's lexical value

      • Optionallanguage: null | string

        The language for the literal. Defaults to ''.

      • Optionaldatatype: any

        The literal's datatype as a named node. Defaults to xsd:string.

      Returns Literal

    Properties

    classOrder: number

    The class order for this node

    datatype: NamedNode

    The literal's datatype as a named node

    isVar: number
    language: string

    The language for the literal

    termType: "Literal"

    The type of node

    value: string

    The node's value

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

    Accessors

    • get lang(): string

      The language for the literal

      Returns string

      use {language} instead

    • set lang(language: string): void

      Parameters

      • language: string

      Returns void

    Methods

    • Compares this node with another

      Parameters

      • other: Node

        The other node

      Returns number

      to check if two nodes are equal

    • Gets a copy of this literal

      Returns Literal

    • Gets whether two literals are the same

      Parameters

      • other: Term

        The other statement

      Returns boolean

    • Creates a hash for this node

      Returns string

      use {rdfFactory.id} instead if possible

    • 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-quads string representation of this node

      Returns string

    • Creates a n-triples string representation of this node

      Returns string

    • Creates a string representation of this node

      Returns string

    • Builds a literal node from a boolean value

      Parameters

      • value: boolean

        The value

      Returns Literal

    • Builds a literal node from a date value

      Parameters

      • value: Date

        The value

      Returns Literal

    • Builds a literal node from a number value

      Parameters

      • value: number

        The value

      Returns Literal

    • Builds a literal node from an input value

      Type Parameters

      • T extends FromValueReturns

      Parameters

      • value: ValueType

        The input value

      Returns T

    • Serializes a literal to an N-Triples string

      Parameters

      Returns string