Class CharacteristicValueObject
- All Implemented Interfaces:
Serializable, Comparable<CharacteristicValueObject>, Identifiable
Characteristic.- Author:
- poirigui
- See Also:
-
Field Summary
FieldsFields inherited from class IdentifiableValueObject
id -
Constructor Summary
ConstructorsConstructorDescriptionRequired when using the class as a spring bean.CharacteristicValueObject(String value, String valueUri) CharacteristicValueObject(String value, String valueUri, String category, String categoryUri) CharacteristicValueObject(Characteristic characteristic) -
Method Summary
Modifier and TypeMethodDescriptionstatic Collection<CharacteristicValueObject> characteristic2CharacteristicVO(Collection<? extends Characteristic> characteristics) intbooleanintwhat Ontology uses this termThe submitter's own wording, as it arrived — before curation replacedvaluewith an ontology label, and before a compound field was split.longlongnumber of occurrences in all genescom.fasterxml.jackson.databind.JsonNodeVerbatim provenance backing a curated characteristic — a JSON array of{quote, source, location, …}items the curation agents emitted.getTaxon()getUrlId()id used by url on the client sidegetValue()The definition of the value, if it is an ontology term, as supplied by the ontology.A unique ontology identifier (i.e.inthashCode()voidbooleanbooleanbooleanisChild()child term from a rootbooleanisRoot()root of a querybooleanTrue when this candidate came from a flat lexical catalogue (MGI names, Cellosaurus) rather than a conventional ontology.voidsetAlreadyPresentInDatabase(boolean alreadyPresentInDatabase) voidsetAlreadyPresentOnGene(boolean alreadyPresentOnGene) voidsetCategory(String category) voidsetCategoryUri(String categoryUri) voidsetChild(boolean child) child term from a rootvoidsetNumTimesUsed(int numTimesUsed) voidsetOntologyUsed(String ontologyUsed) what Ontology uses this termvoidsetOriginalValue(String originalValue) The submitter's own wording, as it arrived — before curation replacedvaluewith an ontology label, and before a compound field was split.voidsetPrivateGeneCount(long privateGeneCount) voidsetPublicGeneCount(long publicGeneCount) number of occurrences in all genesvoidsetRoot(boolean root) root of a queryvoidsetSupplementary(boolean supplementary) True when this candidate came from a flat lexical catalogue (MGI names, Cellosaurus) rather than a conventional ontology.voidsetSupportingEvidence(com.fasterxml.jackson.databind.JsonNode supportingEvidence) Verbatim provenance backing a curated characteristic — a JSON array of{quote, source, location, …}items the curation agents emitted.voidvoidid used by url on the client sidevoidvoidsetValueDefinition(String valueDefinition) The definition of the value, if it is an ontology term, as supplied by the ontology.voidsetValueId(String valueId) A unique ontology identifier (i.e.voidsetValueUri(String valueUri) toString()Methods inherited from class IdentifiableValueObject
canEqual, getId, setId
-
Field Details
-
valueId
A unique ontology identifier (i.e. IRI) for this characteristic.
-
-
Constructor Details
-
CharacteristicValueObject
public CharacteristicValueObject()Required when using the class as a spring bean. -
CharacteristicValueObject
-
CharacteristicValueObject
-
CharacteristicValueObject
-
CharacteristicValueObject
-
-
Method Details
-
characteristic2CharacteristicVO
public static Collection<CharacteristicValueObject> characteristic2CharacteristicVO(Collection<? extends Characteristic> characteristics) -
hashCode
public int hashCode()- Overrides:
hashCodein classIdentifiableValueObject<Characteristic>
-
equals
- Overrides:
equalsin classIdentifiableValueObject<Characteristic>
-
compareTo
- Specified by:
compareToin interfaceComparable<CharacteristicValueObject>
-
toString
- Overrides:
toStringin classIdentifiableValueObject<Characteristic>
-
incrementOccurrenceCount
public void incrementOccurrenceCount() -
getCategory
-
getCategoryUri
-
getValue
-
getValueUri
-
getOriginalValue
The submitter's own wording, as it arrived — before curation replacedvaluewith an ontology label, and before a compound field was split.Once
valuehas been grounded the original is not recoverable from anything else on the wire:organism part: "hypothalamus"does not say the submitter wrotetissue: "Hypothalamus". That makes two questions unanswerable without it — "is this the right resolution of what they actually wrote?" and "what literal should a curator revisit when no term covers it?" (a mouse cohort aged"2-3 months"straddles two stages; the span is real and only the literal carries it). Curators were preserving such strings by hand in free-text tags because nothing surfaced this field.Null means "not recorded", NEVER "same as value". It is populated at GEO import and backfilled from the pre-edit value when a curator grounds a tag, so it is absent for rows written through the curation API and for anything that never had a distinct original. A consumer that reads null as "unchanged" turns an unknown into a confirmed no-op.
Serialized only when present. Was withheld from REST under the old
@GemmaWebOnlymarker until the field's only consumer, Gemma Web, was retired. -
getValueId
A unique ontology identifier (i.e. IRI) for this characteristic. -
getSupportingEvidence
@Nullable public com.fasterxml.jackson.databind.JsonNode getSupportingEvidence()Verbatim provenance backing a curated characteristic — a JSON array of{quote, source, location, …}items the curation agents emitted. Gemma stores and serves it opaquely; the agents repo owns the schema.This is the field that answers "where did this come from" for an
ExperimentalFactor's category, which is aCharacteristiclike any other and therefore already has the storage. Null means "nothing recorded", which is the expected reading for most rows — it is not an error and must not be rendered as one.Provenance rather than identity, so it is excluded from equals/hashCode for the same reason
supplementaryis: the same term reached with and without recorded evidence is the same term, and including it here would break the de-duplication the search paths rely on. -
getUrlId
id used by url on the client side -
isAlreadyPresentInDatabase
public boolean isAlreadyPresentInDatabase() -
isAlreadyPresentOnGene
public boolean isAlreadyPresentOnGene() -
isSupplementary
public boolean isSupplementary()True when this candidate came from a flat lexical catalogue (MGI names, Cellosaurus) rather than a conventional ontology.These sources exist to back-fill names the ontologies lack, and their index applies a large exact-name boost whose scores are not comparable with a Jena index's — which is why
OntologyServiceImpl.findTermsInexactranks them below every conventional hit rather than merging them. Carrying the flag onto the value object lets the ranking layers keep that distinction instead of re-deriving it from URI namespaces one pair at a time.Provenance rather than identity, so it is excluded from equals/hashCode: the same term reached through two sources is the same term.
-
isChild
public boolean isChild()child term from a root -
getNumTimesUsed
public int getNumTimesUsed() -
getOntologyUsed
what Ontology uses this term -
getPrivateGeneCount
public long getPrivateGeneCount() -
getPublicGeneCount
public long getPublicGeneCount()number of occurrences in all genes -
isRoot
public boolean isRoot()root of a query -
getTaxon
-
getValueDefinition
The definition of the value, if it is an ontology term, as supplied by the ontology. If the value is free text, this will be empty -
setCategory
-
setCategoryUri
-
setValue
-
setValueUri
-
setOriginalValue
The submitter's own wording, as it arrived — before curation replacedvaluewith an ontology label, and before a compound field was split.Once
valuehas been grounded the original is not recoverable from anything else on the wire:organism part: "hypothalamus"does not say the submitter wrotetissue: "Hypothalamus". That makes two questions unanswerable without it — "is this the right resolution of what they actually wrote?" and "what literal should a curator revisit when no term covers it?" (a mouse cohort aged"2-3 months"straddles two stages; the span is real and only the literal carries it). Curators were preserving such strings by hand in free-text tags because nothing surfaced this field.Null means "not recorded", NEVER "same as value". It is populated at GEO import and backfilled from the pre-edit value when a curator grounds a tag, so it is absent for rows written through the curation API and for anything that never had a distinct original. A consumer that reads null as "unchanged" turns an unknown into a confirmed no-op.
Serialized only when present. Was withheld from REST under the old
@GemmaWebOnlymarker until the field's only consumer, Gemma Web, was retired. -
setValueId
A unique ontology identifier (i.e. IRI) for this characteristic. -
setSupportingEvidence
public void setSupportingEvidence(@Nullable com.fasterxml.jackson.databind.JsonNode supportingEvidence) Verbatim provenance backing a curated characteristic — a JSON array of{quote, source, location, …}items the curation agents emitted. Gemma stores and serves it opaquely; the agents repo owns the schema.This is the field that answers "where did this come from" for an
ExperimentalFactor's category, which is aCharacteristiclike any other and therefore already has the storage. Null means "nothing recorded", which is the expected reading for most rows — it is not an error and must not be rendered as one.Provenance rather than identity, so it is excluded from equals/hashCode for the same reason
supplementaryis: the same term reached with and without recorded evidence is the same term, and including it here would break the de-duplication the search paths rely on. -
setUrlId
id used by url on the client side -
setAlreadyPresentInDatabase
public void setAlreadyPresentInDatabase(boolean alreadyPresentInDatabase) -
setAlreadyPresentOnGene
public void setAlreadyPresentOnGene(boolean alreadyPresentOnGene) -
setSupplementary
public void setSupplementary(boolean supplementary) True when this candidate came from a flat lexical catalogue (MGI names, Cellosaurus) rather than a conventional ontology.These sources exist to back-fill names the ontologies lack, and their index applies a large exact-name boost whose scores are not comparable with a Jena index's — which is why
OntologyServiceImpl.findTermsInexactranks them below every conventional hit rather than merging them. Carrying the flag onto the value object lets the ranking layers keep that distinction instead of re-deriving it from URI namespaces one pair at a time.Provenance rather than identity, so it is excluded from equals/hashCode: the same term reached through two sources is the same term.
-
setChild
public void setChild(boolean child) child term from a root -
setNumTimesUsed
public void setNumTimesUsed(int numTimesUsed) -
setOntologyUsed
what Ontology uses this term -
setPrivateGeneCount
public void setPrivateGeneCount(long privateGeneCount) -
setPublicGeneCount
public void setPublicGeneCount(long publicGeneCount) number of occurrences in all genes -
setRoot
public void setRoot(boolean root) root of a query -
setTaxon
-
setValueDefinition
The definition of the value, if it is an ontology term, as supplied by the ontology. If the value is free text, this will be empty
-