TriGEncoderOptions constructor
const
TriGEncoderOptions({
- Map<
String, String> customPrefixes = const {}, - IriRelativizationOptions iriRelativization = const IriRelativizationOptions.full(),
- bool generateMissingPrefixes = true,
- bool useNumericLocalNames = false,
- bool includeBaseDeclaration = true,
- bool renderFragmentsAsPrefixed = true,
- bool useGraphKeyword = true,
- bool prettyPrintCollections = true,
- int collectionItemBreakAfter = 10,
- int objectListBreakAfter = 10,
- int inlineBlankNodeMaxWidth = 80,
- int inlineBlankNodeMaxTriples = 3,
Creates a new TriGEncoderOptions instance.
Parameters:
customPrefixesCustom 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.generateMissingPrefixesWhen true (default), the encoder will automatically generate prefix declarations for IRIs that don't have a matching prefix.useNumericLocalNamesWhen false (default), IRIs with local names that start with a digit will be written as full IRIs instead of using prefixed notation.includeBaseDeclarationWhether to include base URI declarations in the output. Defaults to true if not provided.renderFragmentsAsPrefixedWhether to render fragment IRIs as prefixed IRIs (true, default) or as relative IRIs (false).useGraphKeywordWhether to use the explicitGRAPHkeyword for named graphs (true, default) or the shorthand syntax (false).prettyPrintCollectionsWhether to format complex RDF collections across multiple lines.collectionItemBreakAfterMaximum number of collection items before breaking lines.objectListBreakAfterMaximum number of objects before breaking lines.inlineBlankNodeMaxWidthMaximum inline length before breaking blank nodes.inlineBlankNodeMaxTriplesMaximum triple count before breaking blank nodes.
Implementation
const TriGEncoderOptions({
super.customPrefixes = const {},
super.iriRelativization = const IriRelativizationOptions.full(),
this.generateMissingPrefixes = true,
this.useNumericLocalNames = false,
bool includeBaseDeclaration = true,
this.renderFragmentsAsPrefixed = true,
this.useGraphKeyword = true,
this.prettyPrintCollections = true,
this.collectionItemBreakAfter = 10,
this.objectListBreakAfter = 10,
this.inlineBlankNodeMaxWidth = 80,
this.inlineBlankNodeMaxTriples = 3,
}) : includeBaseDeclaration = includeBaseDeclaration;