RdfGraphEncoder class abstract

Interface for encoding RDF graphs to different serialization formats.

This base class defines the contract for encoding RDF graphs into textual representations using various formats like Turtle, JSON-LD, etc. It's part of the Strategy pattern implementation that allows the library to support multiple encoding formats.

Format-specific encoders should extend this base class to be registered with the RDF library's codec framework.

Encoders are responsible for:

  • Determining how to represent triples in their specific format
  • Handling namespace prefixes and base URIs
  • Applying format-specific optimizations for readability or size
Inheritance
Implementers

Constructors

RdfGraphEncoder()
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

bind(Stream<RdfGraph> stream) Stream<String>
Transforms the provided stream.
inherited
cast<RS, RT>() Converter<RS, RT>
Provides a Converter<RS, RT> view of this stream transformer.
inherited
convert(RdfGraph graph, {String? baseUri}) String
Encodes an RDF graph to a string representation in a specific format.
override
fuse<TT>(Converter<String, TT> other) Converter<RdfGraph, TT>
Fuses this with other.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
startChunkedConversion(Sink<String> sink) Sink<RdfGraph>
Starts a chunked conversion.
inherited
toString() String
A string representation of this object.
inherited
withOptions(RdfGraphEncoderOptions options) RdfGraphEncoder
Creates a new encoder instance with the specified options.

Operators

operator ==(Object other) bool
The equality operator.
inherited