generateMissingPrefixes property
Controls automatic generation of namespace prefixes for IRIs without matching prefixes.
When set to true (default), the encoder will automatically generate namespace
prefixes for IRIs that don't have a matching prefix in either the custom prefixes
or the standard namespace mappings.
The prefix generation process:
- Attempts to extract a meaningful namespace from the IRI (splitting at '/' or '#')
- Skips IRIs with only protocol specifiers (e.g., "http://")
- Only generates prefixes for namespaces ending with '/' or '#' (proper RDF namespace delimiters)
- Uses RdfNamespaceMappings.getOrGeneratePrefix to create a compact, unique prefix
Setting this to false will result in all IRIs without matching prefixes being
written as full IRIs in the JSON-LD output.
Applies to JsonLdOutputMode.compact and JsonLdOutputMode.flattened.
Has no effect in JsonLdOutputMode.expanded (which has no @context).
Implementation
final bool generateMissingPrefixes;