Class DatasetsWebService.FactorValueCommit

java.lang.Object
ubic.gemma.rest.DatasetsWebService.EntityRef
ubic.gemma.rest.DatasetsWebService.FactorValueCommit
Enclosing class:
DatasetsWebService

public static class DatasetsWebService.FactorValueCommit extends DatasetsWebService.EntityRef
One factor value, with the samples it applies to (by GSM short name) and its statements.
Author:
tesarst
  • Constructor Details

    • FactorValueCommit

      public FactorValueCommit()
  • Method Details

    • getFreeTextLabel

      @Nullable public String getFreeTextLabel()
      The value's human-readable label.

      🛑 On a CONTINUOUS factor this must equal measurement.value, or the commit is a 409 ("the value of the factor must match the measurement value"). The obvious client move is to keep the submitter's own string — "20 days" against a measurement of "20" — and that is the case this rejects (cab, 2026-09-04). Send the bare number as the label, or omit the label and let the measurement speak.

    • getBaseline

      @Nullable public Boolean getBaseline()
      null = leave the baseline flag unchanged.
    • getMeasurement

      @Nullable public DatasetsWebService.MeasurementRef getMeasurement()
    • getBiomaterialShortNames

      @Deprecated @Nullable public List<String> getBiomaterialShortNames()
      Deprecated.
      use biomaterialIds. Scheduled for removal — Paul, 2026-09-05: "as a choice of way to parameterize, we should not allow it, by removing that as an option for the endpoints. Deprecation is the right step now." Kept working meanwhile so no existing caller breaks.

      A name is not an addressing form. It is not guaranteed to EXIST — a single-cell sub-bioassay has no accession of its own — and not guaranteed to be UNIQUE: on GEO-sourced single-cell data every sub-bioassay descends from one GSM, so that accession names fifteen samples rather than one. Such a name is now a 400 rather than an arbitrary pick.

      An id, by contrast, always exists here: these endpoints never add or remove a dataset's samples, so every sample a commit can refer to was already persisted and already has one. That is what makes removal safe rather than merely desirable — there is no new-entity case for samples, and clientRef covers the entities a commit genuinely does create.

    • getBiomaterialIds

      @Nullable public List<Long> getBiomaterialIds()
      Samples this value applies to, by BioMaterial id — the identifier GET /datasets/{id}/design already reports as bioMaterialAssignments[].bioMaterialId. Authoritative when present: biomaterialShortNames is ignored on the same item.

      🛑 The id is the only identifier every sample has. Names do not survive two cases that are not edge cases:

      • a dataset that did not come from GEO has no accession to send, and
      • a single-cell sub-bioassay has none by construction — many descend from one GSM, so no accession can name one of them. Measured on GSE124952 subset 68405 (uib, 2026-09-05): 15 sub-bioassays, 15 distinct biomaterial ids, 0 accessions.
      Paul, ruling on it: "Gemma must do it by its own ID for the sample. Not everything comes from GEO, not everything has an accession, period. The id is the primary key."

      Same null = leave untouched, [] = clear convention as the names field.

    • getSupportingEvidence

      @Nullable public com.fasterxml.jackson.databind.JsonNode getSupportingEvidence()
      Verbatim provenance for this factor VALUE — a JSON array of {quote, source, location, …} items. Stored and served opaquely; the agents repo owns the schema.

      🛑 Not a fallback for DatasetsWebService.StatementCommit.getSupportingEvidence() and not superseded by it. A statement's evidence backs its triple; this backs the value — its label, its baseline flag, its measurement, the samples it covers — and a value carrying no statements at all (a continuous value, a plain free-text one) still has a curator behind those choices. Both may be sent on one commit and both are kept.

      Null / omitted leaves any evidence already recorded untouched, same as everywhere else on this route.

      🛑 An EMPTY ARRAY is the same as omitting it, NOT an erase. A payload built from a reference file stamps [] on every entity that has no evidence, and reading that as "clear it" would wipe stored provenance on every entity such a write touches while reporting an ordinary success. There is deliberately no way to clear evidence through this route.

    • getStatements

    • setFreeTextLabel

      public void setFreeTextLabel(@Nullable String freeTextLabel)
      The value's human-readable label.

      🛑 On a CONTINUOUS factor this must equal measurement.value, or the commit is a 409 ("the value of the factor must match the measurement value"). The obvious client move is to keep the submitter's own string — "20 days" against a measurement of "20" — and that is the case this rejects (cab, 2026-09-04). Send the bare number as the label, or omit the label and let the measurement speak.

    • setBaseline

      public void setBaseline(@Nullable Boolean baseline)
      null = leave the baseline flag unchanged.
    • setMeasurement

      public void setMeasurement(@Nullable DatasetsWebService.MeasurementRef measurement)
    • setBiomaterialShortNames

      @Deprecated public void setBiomaterialShortNames(@Nullable List<String> biomaterialShortNames)
      Deprecated.
      use biomaterialIds. Scheduled for removal — Paul, 2026-09-05: "as a choice of way to parameterize, we should not allow it, by removing that as an option for the endpoints. Deprecation is the right step now." Kept working meanwhile so no existing caller breaks.

      A name is not an addressing form. It is not guaranteed to EXIST — a single-cell sub-bioassay has no accession of its own — and not guaranteed to be UNIQUE: on GEO-sourced single-cell data every sub-bioassay descends from one GSM, so that accession names fifteen samples rather than one. Such a name is now a 400 rather than an arbitrary pick.

      An id, by contrast, always exists here: these endpoints never add or remove a dataset's samples, so every sample a commit can refer to was already persisted and already has one. That is what makes removal safe rather than merely desirable — there is no new-entity case for samples, and clientRef covers the entities a commit genuinely does create.

    • setBiomaterialIds

      public void setBiomaterialIds(@Nullable List<Long> biomaterialIds)
      Samples this value applies to, by BioMaterial id — the identifier GET /datasets/{id}/design already reports as bioMaterialAssignments[].bioMaterialId. Authoritative when present: biomaterialShortNames is ignored on the same item.

      🛑 The id is the only identifier every sample has. Names do not survive two cases that are not edge cases:

      • a dataset that did not come from GEO has no accession to send, and
      • a single-cell sub-bioassay has none by construction — many descend from one GSM, so no accession can name one of them. Measured on GSE124952 subset 68405 (uib, 2026-09-05): 15 sub-bioassays, 15 distinct biomaterial ids, 0 accessions.
      Paul, ruling on it: "Gemma must do it by its own ID for the sample. Not everything comes from GEO, not everything has an accession, period. The id is the primary key."

      Same null = leave untouched, [] = clear convention as the names field.

    • setSupportingEvidence

      public void setSupportingEvidence(@Nullable com.fasterxml.jackson.databind.JsonNode supportingEvidence)
      Verbatim provenance for this factor VALUE — a JSON array of {quote, source, location, …} items. Stored and served opaquely; the agents repo owns the schema.

      🛑 Not a fallback for DatasetsWebService.StatementCommit.getSupportingEvidence() and not superseded by it. A statement's evidence backs its triple; this backs the value — its label, its baseline flag, its measurement, the samples it covers — and a value carrying no statements at all (a continuous value, a plain free-text one) still has a curator behind those choices. Both may be sent on one commit and both are kept.

      Null / omitted leaves any evidence already recorded untouched, same as everywhere else on this route.

      🛑 An EMPTY ARRAY is the same as omitting it, NOT an erase. A payload built from a reference file stamps [] on every entity that has no evidence, and reading that as "clear it" would wipe stored provenance on every entity such a write touches while reporting an ordinary success. There is deliberately no way to clear evidence through this route.

    • setStatements

      public void setStatements(DatasetsWebService.Section<DatasetsWebService.StatementCommit> statements)
    • toString

      public String toString()
      Overrides:
      toString in class DatasetsWebService.EntityRef
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class DatasetsWebService.EntityRef
    • canEqual

      protected boolean canEqual(Object other)
      Overrides:
      canEqual in class DatasetsWebService.EntityRef
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class DatasetsWebService.EntityRef