Class ModelGraphDocumentStitcher
java.lang.Object
io.fluxzero.common.search.ModelGraphDocumentStitcher
Deterministically composes direct current model documents using explicit relationship paths.
This implementation is shared by local SDK fixtures and the runtime so path, collision, ordering, and DAG behavior cannot drift between them.
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<ModelGraphEdge> applyPathOverrides(Collection<ModelGraphEdge> edges, Collection<ModelGraphPathOverride> overrides) Applies projection-local canonical path replacements to graph edges before composition.static List<SerializedDocument> stitch(List<SerializedDocument> roots, Collection<ModelGraphEdge> edges, Map<String, SerializedDocument> documents, ModelGraphComposition composition) Composes every root document from the supplied current graph.static List<SerializedDocument> stitch(List<SerializedDocument> roots, Collection<ModelGraphEdge> edges, Map<String, SerializedDocument> documents, ModelGraphComposition composition, long stateIndex) Composes every root document and records the exact model-state boundary in its hidden graph manifest.
-
Method Details
-
stitch
public static List<SerializedDocument> stitch(List<SerializedDocument> roots, Collection<ModelGraphEdge> edges, Map<String, SerializedDocument> documents, ModelGraphComposition composition) Composes every root document from the supplied current graph.- Parameters:
roots- root documents in search-result orderedges- current graph edges reachable from those rootsdocuments- direct documents keyed by globally unique model ID, including the rootscomposition- traversal and output bounds- Returns:
- composed roots in the original result order
-
stitch
public static List<SerializedDocument> stitch(List<SerializedDocument> roots, Collection<ModelGraphEdge> edges, Map<String, SerializedDocument> documents, ModelGraphComposition composition, long stateIndex) Composes every root document and records the exact model-state boundary in its hidden graph manifest. -
applyPathOverrides
public static List<ModelGraphEdge> applyPathOverrides(Collection<ModelGraphEdge> edges, Collection<ModelGraphPathOverride> overrides) Applies projection-local canonical path replacements to graph edges before composition.
-