copyWith method
JsonLdGraphEncoderOptions
copyWith({
- JsonLdOutputMode? outputMode,
- Map<
String, String> ? customPrefixes, - bool? generateMissingPrefixes,
- bool? includeBaseDeclaration,
- IriRelativizationOptions? iriRelativization,
- bool? useNativeTypes,
- bool? useRdfType,
- RdfDirection? rdfDirection,
- Object? compactionContext,
Creates a copy of this options instance with the specified overrides.
This method follows the copyWith pattern commonly used in Dart for creating modified copies of immutable objects while preserving the original instance.
Parameters:
customPrefixesNew custom prefixes to use. If null, the current value is retained.iriRelativizationNew relativization options. If null, the current value is retained.
Returns:
- A new
RdfGraphEncoderOptionsinstance with the specified modifications.
Implementation
@override
JsonLdGraphEncoderOptions copyWith(
{JsonLdOutputMode? outputMode,
Map<String, String>? customPrefixes,
bool? generateMissingPrefixes,
bool? includeBaseDeclaration,
IriRelativizationOptions? iriRelativization,
bool? useNativeTypes,
bool? useRdfType,
RdfDirection? rdfDirection,
Object? compactionContext}) =>
JsonLdGraphEncoderOptions(
outputMode: outputMode ?? this.outputMode,
customPrefixes: customPrefixes ?? this.customPrefixes,
generateMissingPrefixes:
generateMissingPrefixes ?? this.generateMissingPrefixes,
includeBaseDeclaration:
includeBaseDeclaration ?? this.includeBaseDeclaration,
iriRelativization: iriRelativization ?? this.iriRelativization,
useNativeTypes: useNativeTypes ?? this.useNativeTypes,
useRdfType: useRdfType ?? this.useRdfType,
rdfDirection: rdfDirection ?? this.rdfDirection,
compactionContext: compactionContext ?? this.compactionContext,
);