Record Class ModelGraphDocumentManifest
java.lang.Object
java.lang.Record
io.fluxzero.common.search.ModelGraphDocumentManifest
public record ModelGraphDocumentManifest(int version, long stateIndex, List<String> types, List<String> relationshipPaths, List<ModelGraphDocumentManifest.Node> nodes)
extends Record
Hidden structural description carried by a composed independent-model graph document.
The visible document remains ordinary nested JSON. This compact, dictionary-encoded manifest preserves exact node identities, concrete types, revisions and placements so SDK clients can reconstruct and independently upcast a typed lazy graph without guessing schema information from JSON paths. Parent nodes always precede their children.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordOne concrete placement in pre-order. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intCurrent manifest format version.static final StringInternal facet marker that lets document trackers avoid inspecting ordinary document payloads.static final StringReserved document-metadata key containing the manifest.static final StringReserved tombstone metadata containing the last materialized state boundary before deletion.static final StringReserved metadata marker for a deleted materialized graph root. -
Constructor Summary
ConstructorsConstructorDescriptionModelGraphDocumentManifest(int version, long stateIndex, List<String> types, List<String> relationshipPaths, List<ModelGraphDocumentManifest.Node> nodes) Creates an instance of aModelGraphDocumentManifestrecord class.ModelGraphDocumentManifest(long stateIndex, List<String> types, List<String> relationshipPaths, List<ModelGraphDocumentManifest.Node> nodes) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static Optional<ModelGraphDocumentManifest> Reads the manifest from document metadata when present.static Optional<ModelGraphDocumentManifest> from(SerializedDocument document) Reads the manifest from a composed graph document when present.final inthashCode()Returns a hash code value for this object.static booleanisGraphDocument(SerializedDocument document) Returns whether a document advertises the hidden typed-graph manifest without decoding its metadata.nodes()Returns the value of thenodesrecord component.Returns the relationship path referenced by a non-root node.Returns the value of therelationshipPathsrecord component.Serializes this manifest for hidden search-document metadata.longReturns the value of thestateIndexrecord component.final StringtoString()Returns a string representation of this record class.Returns the concrete class name referenced by a node.types()Returns the value of thetypesrecord component.intversion()Returns the value of theversionrecord component.
-
Field Details
-
CURRENT_VERSION
public static final int CURRENT_VERSIONCurrent manifest format version.- See Also:
-
METADATA_KEY
Reserved document-metadata key containing the manifest.- See Also:
-
FACET_NAME
Internal facet marker that lets document trackers avoid inspecting ordinary document payloads.- See Also:
-
TOMBSTONE_METADATA_KEY
Reserved metadata marker for a deleted materialized graph root.- See Also:
-
PREVIOUS_STATE_INDEX_METADATA_KEY
Reserved tombstone metadata containing the last materialized state boundary before deletion.- See Also:
-
-
Constructor Details
-
ModelGraphDocumentManifest
-
ModelGraphDocumentManifest
public ModelGraphDocumentManifest(int version, long stateIndex, List<String> types, List<String> relationshipPaths, List<ModelGraphDocumentManifest.Node> nodes) Creates an instance of aModelGraphDocumentManifestrecord class.- Parameters:
version- the value for theversionrecord componentstateIndex- the value for thestateIndexrecord componenttypes- the value for thetypesrecord componentrelationshipPaths- the value for therelationshipPathsrecord componentnodes- the value for thenodesrecord component
-
-
Method Details
-
type
Returns the concrete class name referenced by a node. -
relationshipPath
Returns the relationship path referenced by a non-root node. -
serialize
Serializes this manifest for hidden search-document metadata. -
from
Reads the manifest from a composed graph document when present. -
isGraphDocument
Returns whether a document advertises the hidden typed-graph manifest without decoding its metadata. -
from
Reads the manifest from document metadata when present. -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
version
public int version()Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
stateIndex
public long stateIndex()Returns the value of thestateIndexrecord component.- Returns:
- the value of the
stateIndexrecord component
-
types
-
relationshipPaths
-
nodes
Returns the value of thenodesrecord component.- Returns:
- the value of the
nodesrecord component
-