toString method

  1. @override
String toString()
override

Returns a string representation of the triple in a Turtle-like syntax.

The output format is similar to Turtle's triple pattern with a period: <subject> <predicate> <object> .

This representation is useful for debugging and logging purposes, but it's not guaranteed to be valid Turtle syntax, as it relies on the string representations of the individual terms.

Example:

final triple = Triple(
  IriTerm('http://example.org/john'),
  IriTerm('http://xmlns.com/foaf/0.1/name'),
  LiteralTerm.string('John Smith')
);

print(triple); // Prints: <http://example.org/john> <http://xmlns.com/foaf/0.1/name> "John Smith" .

Implementation

@override
String toString() => '$subject $predicate $object .';