triple property

Triple get triple

Extracts the triple component of this quad (without graph context)

Creates a new Triple instance containing the subject, predicate, and object components of this quad. The graph context information is lost in this conversion.

This is useful when you need to work with RDF operations that expect triples, or when processing quad data in a graph-agnostic manner.

Returns: A new Triple with the same subject, predicate, and object as this quad.

Example:

final quad = Quad(alice, foaf.name, aliceName, peopleGraph);
final triple = quad.triple; // Graph context is lost

// Use triple in graph operations
final graph = RdfGraph().withTriple(triple);

Implementation

Triple get triple => Triple(subject, predicate, object);