Quad constructor

const Quad(
  1. RdfSubject subject,
  2. RdfPredicate predicate,
  3. RdfObject object, [
  4. RdfGraphName? graphName,
])

Creates a new RDF quad with the specified components

Constructs an immutable quad using the standard RDF parameter order: subject, predicate, object, graph. The graph parameter is optional and defaults to null (indicating the default graph).

Parameters:

  • subject The subject resource (IRI or blank node)
  • predicate The predicate IRI
  • object The object (IRI, blank node, or literal)
  • graphName Optional IRI identifying the containing graph (null = default graph)

Example:

// Quad in named graph
final quad = Quad(john, foaf.name, johnName, peopleGraph);

// Quad in default graph
final defaultQuad = Quad(jane, foaf.age, janeAge);

Implementation

const Quad(this.subject, this.predicate, this.object, [this.graphName]);