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: typeof VariableTermType = 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: <T>(value: ValueType) => T

Type declaration

Static toJS

toJS: (term: any) => Date | Number | string | boolean | object | Array<Date | Number | string | boolean | object>

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

equals

  • equals(other: Term): 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