TurtleEncoderOptions class
Configuration options for Turtle serialization.
This class provides configuration settings that control how RDF graphs are serialized to the Turtle format, including namespace prefix handling and automatic prefix generation.
Example:
final options = TurtleEncoderOptions(
customPrefixes: {'ex': 'http://example.org/'},
generateMissingPrefixes: true
);
final encoder = TurtleEncoder(options: options);
- Inheritance
-
- Object
- RdfGraphEncoderOptions
- TurtleEncoderOptions
Constructors
-
TurtleEncoderOptions.new({Map<
String, String> customPrefixes = const {}, IriRelativizationOptions iriRelativization = const IriRelativizationOptions.full(), bool generateMissingPrefixes = true, bool useNumericLocalNames = false, bool includeBaseDeclaration = true, bool renderFragmentsAsPrefixed = true}) -
Creates a new TurtleEncoderOptions instance.
const
Properties
-
customPrefixes
→ Map<
String, String> -
Custom namespace prefixes to use during encoding.
finalinherited
- generateMissingPrefixes → bool
-
Controls automatic generation of namespace prefixes for IRIs without matching prefixes.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- includeBaseDeclaration → bool
-
Whether to include base URI declarations in the output
final
- iriRelativization → IriRelativizationOptions
-
Options for controlling IRI relativization behavior.
finalinherited
- renderFragmentsAsPrefixed → bool
-
Controls how fragment IRIs are rendered in the output.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- useNumericLocalNames → bool
-
Controls whether local names that start with a digit are written using prefix notation.
final
Methods
-
copyWith(
{Map< String, String> ? customPrefixes, bool? generateMissingPrefixes, bool? useNumericLocalNames, bool? includeBaseDeclaration, bool? renderFragmentsAsPrefixed, IriRelativizationOptions? iriRelativization}) → TurtleEncoderOptions -
This method allows creating a new TurtleEncoderOptions instance based on
the current options, selectively overriding specific fields while keeping
all other settings unchanged.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
from(
RdfGraphEncoderOptions options) → TurtleEncoderOptions - Creates a TurtleEncoderOptions instance from generic RdfGraphEncoderOptions.