Triple constructor
Triple(
- RdfSubject subject,
- RdfPredicate predicate,
- RdfObject object
Creates a new triple with the specified subject, predicate, and object.
The constructor accepts any values that conform to the RDF term types that are allowed in each position, ensuring that only valid RDF triples can be created.
Parameters:
subjectThe subject of the triple (must be an IRI or blank node)predicateThe predicate of the triple (must be an IRI)objectThe object of the triple (can be an IRI, blank node, or literal)
Example:
// Create a triple: <http://example.org/john> <http://xmlns.com/foaf/0.1/name> "John Smith"
final john = const IriTerm('http://example.org/john');
final name = const IriTerm('http://xmlns.com/foaf/0.1/name');
final johnSmith = LiteralTerm.string('John Smith');
final triple = Triple(john, name, johnSmith);
Implementation
Triple(this.subject, this.predicate, this.object);