RdfDatasetCodecRegistry class final

Manages registration and discovery of RDF dataset codec plugins.

This registry acts as the central point for dataset codec plugin management, providing a mechanism for plugin registration, discovery, and codec auto-detection. It implements a plugin system that allows the core RDF library to be extended with additional dataset serialization formats.

Example usage:

// Create a registry
final registry = RdfDatasetCodecRegistry();

// Register dataset format plugins
registry.registerDatasetCodec(const NQuadsCodec());
registry.registerDatasetCodec(const TrigCodec());

// Get a codec for a specific MIME type
final nquadsCodec = registry.getDatasetCodec('application/n-quads');

// Or let the system detect the format
final autoCodec = registry.getDatasetCodec(); // Will auto-detect
Inheritance

Constructors

RdfDatasetCodecRegistry.new([List<RdfDatasetCodec> initialCodecs = const []])
Creates a new codec registry

Properties

allMimeTypes Set<String>
Returns all MIME types supported by all registered codecs
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() → void
Clear all registered codecs (mainly for testing)
inherited
detectCodec(String content) RdfCodec<RdfDataset>?
Detect codec from content when no MIME type is available
inherited
getAllCodecs() List<RdfCodec<RdfDataset>>
Retrieves all registered codecs
inherited
getCodec(String? mimeType) RdfCodec<RdfDataset>
Retrieves a codec instance by MIME type
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerCodec(RdfCodec<RdfDataset> codec) → void
Register a new codec with the registry
inherited
toString() String
A string representation of this object.
inherited

Operators

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