Class Statement<S, P, O, G>

A Statement represents an RDF Triple or Quad.

Type Parameters

  • S extends SubjectType = SubjectType

  • P extends PredicateType = PredicateType

  • O extends ObjectType = ObjectType

  • G extends GraphType = GraphType

Hierarchy

  • Statement

Implements

  • Quad<S, P, O, G | DefaultGraph>

Constructors

  • Construct a new statement

    Type Parameters

    • S extends SubjectType = SubjectType

    • P extends PredicateType = PredicateType

    • O extends ObjectType = ObjectType

    • G extends GraphType = GraphType

    Parameters

    • subject: S

      The subject of the triple. What the fact is about

    • predicate: P

      The relationship which is asserted between the subject and object

    • object: O

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

    • Optional graph: DefaultGraph | G

      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<S, P, O, G>

Properties

graph: DefaultGraph | G

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

object: O

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

predicate: P

The relationship which is asserted between the subject and object

subject: S

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

Accessors

  • get why(): DefaultGraph | G
  • Alias for graph, favored by Tim

    Returns DefaultGraph | G

  • set why(g: DefaultGraph | G): void
  • Parameters

    • g: DefaultGraph | G

    Returns void

Methods

  • Checks whether two statements are the same

    Parameters

    • other: Quad<Quad_Subject, Quad_Predicate, Quad_Object, Quad_Graph>

      The other statement

    Returns boolean

  • Creates a statement with the bindings substituted

    Parameters

    • bindings: Bindings

      The bindings

    Returns Statement<SubjectType, PredicateType, ObjectType, GraphType>

  • Creates a canonical string representation of this statement.

    Returns string

  • Creates a n-quads string representation of this statement

    Returns string

  • Creates a n-triples string representation of this statement

    Returns string

  • Creates a string representation of this statement

    Returns string

Generated using TypeDoc