Class AnnotationSet
- All Implemented Interfaces:
Identifiable
Investigation: a JSON
description of one annotation set in one of three lifecycle shapes
(see AnnotationSetRole).
Relationship to the applied annotations. The authoritative
record of an experiment's annotations lives on the EE entity graph
(Characteristic, Statement, FactorValue, …). AnnotationSet
is the curation log alongside that graph — a side-table of
hypotheses, drafts, and snapshots that may or may not have been
applied. Reading "the current annotations on EE X" still means walking
the EE; reading "what did the agent propose / what is the curator
drafting / what was the state at time T" is what this table answers.
Roles.
AnnotationSetRole.PROPOSAL— immutable hypothesis emitted by an agent run (or external import). Thekindsub-discriminator distinguishes a forward-looking proposal from a post-hoc audit.AnnotationSetRole.DRAFT— mutable curator WIP buffer. Typically seeded from aPROPOSALviaparent; per-element disposition is derived at read time by diffingpayloadJsonagainst the parent's payload.parkedElementsis the sidecar for opaque element keys the curator has chosen to park.AnnotationSetRole.SNAPSHOT— immutable capture of the experiment's annotation state at a point in time. A SNAPSHOT withfinalizedAtset is the "polished" view the curator has blessed as canonical; without it, the row is a raw capture (e.g. for diffing across runs).
Idempotency. UNIQUE(investigation, role, runId)
carries three different semantics depending on role:
- PROPOSAL —
runIdis the agent runner's unique identifier for the run; re-posting the same run is a no-op returning the existing row (matches theAgentProposalcontract). - DRAFT —
runIdis derived as"draft-{createdBy}"so the constraint enforces "one DRAFT per (investigation, curator)". - SNAPSHOT —
runIdis a generated UUID at create time; SNAPSHOTs are append-only.
FK to Investigation cascades on delete; FK to
parent is ON DELETE SET NULL so a parent retirement
leaves the descendant payload intact (sans lineage baseline).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanImportant note: Two objects with the same class and non-null ID must be considered equal.getKind()getModel()getRanAt()getRole()getRunId()inthashCode()Important note: Never use the ID in the hashCode() implementation since it can be assigned when the object is persisted.voidsetAgentName(String agentName) voidsetAgentVersion(String agentVersion) voidsetCreatedAt(Date createdAt) voidsetCreatedBy(String createdBy) voidsetFactorCount(Integer factorCount) voidsetFinalizedAt(Date finalizedAt) voidsetFinalizedBy(String finalizedBy) voidsetFinalizedNotes(String finalizedNotes) voidsetInvestigation(Investigation investigation) voidsetKind(AgentCurationKind kind) voidvoidsetParent(AnnotationSet parent) voidsetParkedElements(String parkedElements) voidsetPayloadJson(String payloadJson) voidvoidsetRole(AnnotationSetRole role) voidvoidvoidsetSource(AnnotationSetSource source) voidvoidsetTagCount(Integer tagCount) voidsetUpdatedAt(Date updatedAt) Methods inherited from class AbstractIdentifiable
getId, setId, toString
-
Constructor Details
-
AnnotationSet
public AnnotationSet()
-
-
Method Details
-
getStatus
-
setStatus
-
getFactorCount
-
setFactorCount
-
getTagCount
-
setTagCount
-
getInvestigation
-
setInvestigation
-
getRole
-
setRole
-
getSource
-
setSource
-
getKind
-
setKind
-
getRunId
-
setRunId
-
getParent
-
setParent
-
getCreatedBy
-
setCreatedBy
-
getCreatedAt
-
setCreatedAt
-
getUpdatedAt
-
setUpdatedAt
-
getFinalizedAt
-
setFinalizedAt
-
getFinalizedBy
-
setFinalizedBy
-
getFinalizedNotes
-
setFinalizedNotes
-
getAgentVersion
-
setAgentVersion
-
getModel
-
setModel
-
getRunSha
-
setRunSha
-
getAgentName
-
setAgentName
-
getRanAt
-
setRanAt
-
getPayloadJson
-
setPayloadJson
-
getParkedElements
-
setParkedElements
-
hashCode
public int hashCode()Description copied from class:AbstractIdentifiableImportant note: Never use the ID in the hashCode() implementation since it can be assigned when the object is persisted.- Specified by:
hashCodein classAbstractIdentifiable
-
equals
Description copied from class:AbstractIdentifiableImportant note: Two objects with the same class and non-null ID must be considered equal. If one or both IDs are nulls, the rest of the state can be used to determine equality.- Specified by:
equalsin classAbstractIdentifiable
-