copyWith method
JsonLdEncoderOptions
copyWith({
- Map<
String, String> ? customPrefixes, - bool? generateMissingPrefixes,
- bool? includeBaseDeclaration,
- IriRelativizationOptions? iriRelativization,
override
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 RdfGraphEncoderOptions instance with the specified modifications.
Implementation
@override
JsonLdEncoderOptions copyWith(
{Map<String, String>? customPrefixes,
bool? generateMissingPrefixes,
bool? includeBaseDeclaration,
IriRelativizationOptions? iriRelativization}) =>
JsonLdEncoderOptions(
customPrefixes: customPrefixes ?? this.customPrefixes,
generateMissingPrefixes:
generateMissingPrefixes ?? this.generateMissingPrefixes,
includeBaseDeclaration:
includeBaseDeclaration ?? this.includeBaseDeclaration,
iriRelativization: iriRelativization ?? this.iriRelativization,
);