Class AnnotationsWebService.OntologyTermValueObject

java.lang.Object
ubic.gemma.rest.AnnotationsWebService.OntologyTermValueObject
Enclosing class:
AnnotationsWebService

public static final class AnnotationsWebService.OntologyTermValueObject extends Object
Author:
tesarst
  • Constructor Details

    • OntologyTermValueObject

      public OntologyTermValueObject(String uri, String label, String definition, boolean obsolete, Integer usageCount, @Nullable List<AnnotationsWebService.OntologyTermSimpleValueObject> parents, List<AnnotationsWebService.OntologyTermSynonymValueObject> synonyms, List<String> alternativeIds, List<String> dbXrefs, int citationXrefCount, @Nullable String ontologyVersion, @Nullable AnnotationsWebService.LexicalTermMetadataValueObject sourceMetadata, @Nullable String termReplacedBy, @Nullable String termReplacedByLabel, List<AnnotationsWebService.OntologyTermSimpleValueObject> consider, @Nullable String obsoletedInVersion)
      Creates a new OntologyTermValueObject instance.
      Parameters:
      uri -
      label -
      definition -
      obsolete -
      usageCount -
      parents - Nearest is_a OR part_of parents of this term. Empty list when the term is a top-level node; null only if the lookup was skipped (e.g. term has no URI).
      synonyms - Typed synonyms drawn from the OBO/IAO synonym predicates (exact / narrow / broad / related / alt_label). Empty when the term declares none. Cheap to populate — a single in-memory walk of the already-resolved term, the same probe set /annotations/search uses for match attribution.
      alternativeIds - Alternative IDs for this term (OBO hasAlternativeId) — merged-in obsolete identifiers. Often empty, since only terms that absorbed a retired ID carry one. Lets a client recognise a term it knows by a retired identifier. Distinct from dbXrefs.
      dbXrefs - Database cross-references for this term (OBO hasDbXref) — pointers into other resources such as MESH, OMIM, UMLS, ICD, SNOMED, etc. (e.g. "MESH:D003920", "OMIM:222100"). Empty when the term declares none. This is the OBO "xref" most consumers mean.

      🛑 Literature citations are withheld unless asked for — see citationXrefCount and the includeCitationXrefs parameter. They are a different kind of thing from the identifiers around them: a pubmed: xref is provenance for what the term's definition asserts, not a record about the term you can resolve and click.

      citationXrefCount - How many literature citations dbXrefs is holding back, or would be holding back if they had not been asked for.

      Reported rather than dropped silently, because a caller that needs them has to be able to tell "this term cites nothing" from "this term cites fifty-one things you did not ask for". On imatinib, 51 of 63 cross-references are pubmed: while every identifier that names a record — cas, drugbank, drugcentral, kegg.drug — appears exactly once, so the citations push the useful ones off any bounded view.

      ontologyVersion - Version (release) of the ontology this term came from — owl:versionInfo (often a release date), falling back to owl:versionIRI. Null when the owning ontology declares no version. Surfaced so a client can tell which ontology release a term reflects, a recurring point of confusion when terms are added, merged, or obsoleted between releases.
      sourceMetadata - Descriptive metadata from a flat lexical source (Cellosaurus cell lines, MGI mouse strains) — species, cell-line type, donor sex, strain type, and any problematic-entry flag. Null for terms from a real ontology, which carry none of this.

      A cell-line NAME alone is not enough to act on: it does not say which organism it came from, and it does not say that the line is a known misidentified one. This carries those facts so the caller can decide. It is descriptive metadata about the term, in the same spirit as definition — NOT something to annotate an experiment with.

      termReplacedBy - The successor this term names, IAO:0100001 term replaced by — where a curator holding the deprecated URI should re-bind to. Null unless obsolete is true, and null then too for the terms whose ontology deprecated them without naming a replacement.

      A full IRI, never an id scoped to the queried ontology: the successor routinely crosses ontologies, e.g. EFO:0000408 obsolete_disease → MONDO:0000001 disease.

      This is the one field the .obo distributions cannot supply — obsolete classes are dropped at OBO parse time, so a consumer reading efo.obo never sees the tombstone at all. Gemma loads the OWL, which keeps them, which is why this is here.

      termReplacedByLabel - Preferred label of termReplacedBy, so a client can render the re-bind without a second round trip. Read from the deprecating model when it carries a label for the successor, otherwise resolved through the loaded ontologies. Null when neither has it — the IRI is the identity, the label is decoration.
      consider - oboInOwl:consider — candidates rather than a replacement, which is what a term that was SPLIT rather than merged leaves behind. Advisory: where termReplacedBy is also present, that one is the answer and these are context. Empty when the term names none.
      obsoletedInVersion - Ontology release that retired this term, e.g. 3.88.0 — the difference between "your curation was wrong" and "the ontology moved under you". Compare against ontologyVersion, which is the release currently loaded.

      EFO-specific (efo:obsoleted_in_version); expect null for terms from ontologies that declare no equivalent, which is most of them.

  • Method Details

    • getUri

      public String getUri()
    • getLabel

      public String getLabel()
    • getDefinition

      public String getDefinition()
    • isObsolete

      public boolean isObsolete()
    • getUsageCount

      public Integer getUsageCount()
    • getParents

      Nearest is_a OR part_of parents of this term. Empty list when the term is a top-level node; null only if the lookup was skipped (e.g. term has no URI).
    • getSynonyms

      Typed synonyms drawn from the OBO/IAO synonym predicates (exact / narrow / broad / related / alt_label). Empty when the term declares none. Cheap to populate — a single in-memory walk of the already-resolved term, the same probe set /annotations/search uses for match attribution.
    • getAlternativeIds

      public List<String> getAlternativeIds()
      Alternative IDs for this term (OBO hasAlternativeId) — merged-in obsolete identifiers. Often empty, since only terms that absorbed a retired ID carry one. Lets a client recognise a term it knows by a retired identifier. Distinct from dbXrefs.
    • getDbXrefs

      public List<String> getDbXrefs()
      Database cross-references for this term (OBO hasDbXref) — pointers into other resources such as MESH, OMIM, UMLS, ICD, SNOMED, etc. (e.g. "MESH:D003920", "OMIM:222100"). Empty when the term declares none. This is the OBO "xref" most consumers mean.

      🛑 Literature citations are withheld unless asked for — see citationXrefCount and the includeCitationXrefs parameter. They are a different kind of thing from the identifiers around them: a pubmed: xref is provenance for what the term's definition asserts, not a record about the term you can resolve and click.

    • getCitationXrefCount

      public int getCitationXrefCount()
      How many literature citations dbXrefs is holding back, or would be holding back if they had not been asked for.

      Reported rather than dropped silently, because a caller that needs them has to be able to tell "this term cites nothing" from "this term cites fifty-one things you did not ask for". On imatinib, 51 of 63 cross-references are pubmed: while every identifier that names a record — cas, drugbank, drugcentral, kegg.drug — appears exactly once, so the citations push the useful ones off any bounded view.

    • getOntologyVersion

      @Nullable public String getOntologyVersion()
      Version (release) of the ontology this term came from — owl:versionInfo (often a release date), falling back to owl:versionIRI. Null when the owning ontology declares no version. Surfaced so a client can tell which ontology release a term reflects, a recurring point of confusion when terms are added, merged, or obsoleted between releases.
    • getSourceMetadata

      @Nullable public AnnotationsWebService.LexicalTermMetadataValueObject getSourceMetadata()
      Descriptive metadata from a flat lexical source (Cellosaurus cell lines, MGI mouse strains) — species, cell-line type, donor sex, strain type, and any problematic-entry flag. Null for terms from a real ontology, which carry none of this.

      A cell-line NAME alone is not enough to act on: it does not say which organism it came from, and it does not say that the line is a known misidentified one. This carries those facts so the caller can decide. It is descriptive metadata about the term, in the same spirit as definition — NOT something to annotate an experiment with.

    • getTermReplacedBy

      @Nullable public String getTermReplacedBy()
      The successor this term names, IAO:0100001 term replaced by — where a curator holding the deprecated URI should re-bind to. Null unless obsolete is true, and null then too for the terms whose ontology deprecated them without naming a replacement.

      A full IRI, never an id scoped to the queried ontology: the successor routinely crosses ontologies, e.g. EFO:0000408 obsolete_disease → MONDO:0000001 disease.

      This is the one field the .obo distributions cannot supply — obsolete classes are dropped at OBO parse time, so a consumer reading efo.obo never sees the tombstone at all. Gemma loads the OWL, which keeps them, which is why this is here.

    • getTermReplacedByLabel

      @Nullable public String getTermReplacedByLabel()
      Preferred label of termReplacedBy, so a client can render the re-bind without a second round trip. Read from the deprecating model when it carries a label for the successor, otherwise resolved through the loaded ontologies. Null when neither has it — the IRI is the identity, the label is decoration.
    • getConsider

      oboInOwl:consider — candidates rather than a replacement, which is what a term that was SPLIT rather than merged leaves behind. Advisory: where termReplacedBy is also present, that one is the answer and these are context. Empty when the term names none.
    • getObsoletedInVersion

      @Nullable public String getObsoletedInVersion()
      Ontology release that retired this term, e.g. 3.88.0 — the difference between "your curation was wrong" and "the ontology moved under you". Compare against ontologyVersion, which is the release currently loaded.

      EFO-specific (efo:obsoleted_in_version); expect null for terms from ontologies that declare no equivalent, which is most of them.

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object