Creates a new StatementSerializer.
The underlying format-specific serializer used to
render individual quads (e.g. TurtleSerializer).
Merges externally created quads into an existing set of statement contexts. New quads receive empty comment arrays so they serialize cleanly between existing statements.
Existing statement contexts (from the parser).
Additional quads to add.
A new array containing both the original and new contexts.
Serializes statement contexts to a complete document string.
The output includes:
BASE / @base declaration (when baseIri is set)PREFIX / @prefix declarations (when prefixes is provided)The (optionally pre-sorted / pre-merged) statement contexts.
Optionaloptions: QuadContextSerializerOptionsSerialization options.
The complete serialized document string.
Sorts statement contexts using the provided sorting option. Comments travel with their quads so that each comment block stays associated with the correct statement after reordering.
The statement contexts to sort.
Sorting option (see SortOption).
A new sorted array.
Serializes QuadContext | statement contexts to a complete document string, preserving source comments and emitting prefix/base declarations automatically.