Class Variable

Variables are placeholders used in patterns to be matched. In cwm they are symbols which are the formula's list of quantified variables. In sparql they are not visibly URIs. Here we compromise, by having a common special base URI for variables. Their names are uris, but the ? notation has an implicit base uri of 'varid:'

Hierarchy (view full)

Implements

  • Variable

Constructors

Properties

base: string = 'varid:'

The base string for a variable's name

classOrder: number = ClassOrder.Variable

The class order for this node

isVar: number = 1
termType: "Variable" = VariableTermType

The type of node

uri: string

The unique identifier of this variable

value: string

The node's value

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

Type declaration

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

      • T extends FromValueReturns

      Parameters

      • value: ValueType

      Returns T

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

Type declaration

    • (term): 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 whether the two nodes are equal

    Parameters

    • other: any

      The other node

    Returns boolean

  • Creates a hash for this node

    Returns string

    Deprecated

    use {rdfFactory.id} instead if possible

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

    Parameters

    • bindings: any

      Bindings of identifiers to nodes

    Returns any

  • Parameters

    • variable: any

    Returns string