Enum Class AnnotationSetRole

java.lang.Object
java.lang.Enum<AnnotationSetRole>
ubic.gemma.model.common.auditAndSecurity.curation.AnnotationSetRole
All Implemented Interfaces:
Serializable, Comparable<AnnotationSetRole>, Constable

public enum AnnotationSetRole extends Enum<AnnotationSetRole>
Role discriminator on AnnotationSet rows. Distinguishes four lifecycle shapes:
  • PROPOSAL — immutable hypothesis emitted by an agent run or external import. Subsumes both the forward-looking proposal (kind=proposal) and the post-hoc audit (kind=audit) that AgentProposal historically split via its AgentCurationKind column. The sub-discriminator continues to live on the kind field.
  • DRAFT — mutable curator work-in-progress buffer. Typically seeded from a PROPOSAL (the parent link), with the curator's per-element decisions derived at read time by diffing this row's payload against its parent's.
  • SNAPSHOT — immutable capture of the experiment's annotation state at a moment in time. A SNAPSHOT with finalizedAt set is the "polished" view a curator has blessed as canonical; without it, the row is a raw capture (promotion artifact, comparison probe, etc.). The applied annotations themselves live on the EE entity graph (Characteristic, Statement, FactorValue, …); this row stores only a JSON description of that state for comparison / history.
  • COMMIT — immutable record that a curation was applied to the dataset, and by which run. Proposed-versus- applied is the distinction the whole provenance surface rests on: "an agent suggested this" and "this is what the data says" are different claims about the world, and a curator reading a trace has to know which one they are looking at. Overloading PROPOSAL would force every consumer that branches on role to re-derive appliedness from somewhere else, and they would disagree about how. Like SNAPSHOT, the applied annotations themselves live on the EE entity graph; this row records who applied them and from which build. Sparse on purpose — a commit with no run reference mints no row at all.

Persisted as the enum Enum.name() (uppercase). The getDbValue() / fromDbValue(String) helpers expose a lowercase form for DTOs / wire surfaces, matching the convention established by AgentCurationKind.

  • Enum Constant Details

  • Method Details

    • values

      public static AnnotationSetRole[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static AnnotationSetRole valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getDbValue

      public String getDbValue()
      Returns:
      the lowercase external form, for use in JSON DTOs / API surfaces.
    • fromDbValue

      public static AnnotationSetRole fromDbValue(String v)
      Parse the lowercase external form back into the enum. Accepts either case (delegates to valueOf(String) after uppercasing).