convert method

  1. @override
String convert(
  1. RdfDataset dataset, {
  2. String? baseUri,
})

Encodes an RDF dataset to a string representation in a specific format.

Transforms an in-memory RDF dataset into an encoded text format that can be stored or transmitted. The exact output format depends on the implementing class.

Parameters:

  • dataset The RDF dataset to encode.
  • baseUri Optional base URI for resolving/shortening IRIs in the output. When provided, the encoder may use this to produce more compact output.

Returns:

  • The serialized representation of the dataset as a string.

Implementation

@override
String convert(RdfDataset dataset, {String? baseUri}) {
  return encode(dataset);
}