TurtleEncoderOptions constructor

const TurtleEncoderOptions({
  1. Map<String, String> customPrefixes = const {},
  2. IriRelativizationOptions iriRelativization = const IriRelativizationOptions.full(),
  3. bool generateMissingPrefixes = true,
  4. bool useNumericLocalNames = false,
  5. bool includeBaseDeclaration = true,
  6. bool renderFragmentsAsPrefixed = true,
  7. bool prettyPrintCollections = true,
  8. int collectionItemBreakAfter = 10,
  9. int objectListBreakAfter = 10,
  10. int inlineBlankNodeMaxWidth = 80,
  11. int inlineBlankNodeMaxTriples = 3,
})

Creates a new TurtleEncoderOptions instance.

Parameters:

  • customPrefixes Custom namespace prefixes to use during encoding. A mapping of prefix strings to namespace URIs that will be used to generate compact prefix declarations in the Turtle output.
  • generateMissingPrefixes When true (default), the encoder will automatically generate prefix declarations for IRIs that don't have a matching prefix.
  • useNumericLocalNames When false (default), IRIs with local names that start with a digit will be written as full IRIs instead of using prefixed notation.
  • includeBaseDeclaration Whether to include base URI declarations in the output. Defaults to true if not provided.
  • renderFragmentsAsPrefixed Whether to render fragment IRIs as prefixed IRIs (true, default) or as relative IRIs (false).
  • prettyPrintCollections Whether to format complex RDF collections across multiple lines.
  • collectionItemBreakAfter Maximum number of collection items before breaking lines.
  • objectListBreakAfter Maximum number of objects before breaking lines.
  • inlineBlankNodeMaxWidth Maximum inline length before breaking blank nodes.
  • inlineBlankNodeMaxTriples Maximum triple count before breaking blank nodes.

Implementation

const TurtleEncoderOptions({
  super.customPrefixes = const {},
  super.iriRelativization = const IriRelativizationOptions.full(),
  this.generateMissingPrefixes = true,
  this.useNumericLocalNames = false,
  bool includeBaseDeclaration = true,
  this.renderFragmentsAsPrefixed = true,
  this.prettyPrintCollections = true,
  this.collectionItemBreakAfter = 10,
  this.objectListBreakAfter = 10,
  this.inlineBlankNodeMaxWidth = 80,
  this.inlineBlankNodeMaxTriples = 3,
}) : includeBaseDeclaration = includeBaseDeclaration;