Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Statement

A Statement represents an RDF Triple or Quad.

Hierarchy

  • Statement

Implements

Index

Constructors

constructor

  • Construct a new statement

    Parameters

    • subject: Quad_Subject | Term

      The subject of the triple. What the fact is about

    • predicate: Quad_Predicate | Term

      The relationship which is asserted between the subject and object

    • object: Quad_Object | Term

      The thing or data value which is asserted to be related to the subject

    • Optional graph: Quad_Graph | Term

      The document where the triple is or was or will be stored on the web.

      The graph param is a named node of the document in which the triple when it is stored on the web. It exists because when you have read data from various places in the web, the “graph” tells you why you have the triple. (At the moment, it is just the document, in future it could be an inference step)

      When you do UpdateManager.update() then the graph’s of all the statements must be the same, and give the document you are patching. In future, we may have a more powerful update() which can update more than one document.

    Returns Statement

Properties

graph

graph: GraphType

The graph param is a named node of the document in which the triple when it is stored on the web.

object

object: ObjectType

The thing or data value which is asserted to be related to the subject

predicate

predicate: PredicateType

The relationship which is asserted between the subject and object

subject

subject: SubjectType

The subject of the triple. What the Statement is about.

Accessors

why

  • get why(): Variable | NamedNode | DefaultGraph
  • set why(g: Variable | NamedNode | DefaultGraph): void
  • deprecated

    use {graph} instead

    Returns Variable | NamedNode | DefaultGraph

  • deprecated

    use {graph} instead

    Parameters

    • g: Variable | NamedNode | DefaultGraph

    Returns void

Methods

equals

  • equals(other: Quad): boolean
  • Checks whether two statements are the same

    Parameters

    • other: Quad

      The other statement

    Returns boolean

substitute

toCanonical

  • toCanonical(): string
  • Creates a canonical string representation of this statement.

    Returns string

toNQ

  • toNQ(): string
  • Creates a n-quads string representation of this statement

    Returns string

toNT

  • toNT(): string
  • Creates a n-triples string representation of this statement

    Returns string

toString

  • toString(): string