Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Variable

RDF/JS spec 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:'

link

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

Hierarchy

Implements

Implemented by

Index

Constructors

constructor

Properties

base

base: string = "varid:"

The base string for a variable's name

classOrder

classOrder: number = ClassOrder.Variable

isVar

isVar: number = 1

termType

termType: "Variable" = VariableTermType

Contains the constant "Variable".

uri

uri: string

The unique identifier of this variable

value

value: string

The name of the variable without leading "?" (example: "a").

Static fromValue

fromValue: function

Type declaration

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>

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

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

  • substitute(bindings: any): any

toCanonical

  • toCanonical(): string

toNQ

  • toNQ(): string

toNT

  • toNT(): string

toString

  • toString(): string

Static toString

  • toString(variable: any): string