Class AnnotationsWebService.TaxonConstraintValueObject
- Enclosing class:
AnnotationsWebService
🛑 Presence means "we looked." The object is emitted for every enriched hit,
including the overwhelming majority that declare no constraint — those carry
declared: false and null taxon fields. A null taxonConstraint on the hit means
only "not enriched" (outside the top-N), never "no constraint".
That split exists because a species gate has to tell "MONDO says this is human-applicable,
pass it" from "we did not check, so it could be the sheep term". One sentinel for both forces
the safe reading to always be the second, which costs a
/annotations/term?uri=… round trip per candidate and defeats the point of putting the
field in the search response. Raised by CAB 2026-08-15, and it is the same defect as an absent
value standing in for a failed one — absent evidence is not failed evidence.
- Author:
- tesarst
-
Constructor Summary
ConstructorsConstructorDescriptionTaxonConstraintValueObject(boolean declared, String uri, Integer ncbiTaxonId, String label, List<AnnotationsWebService.OntologyTermSimpleValueObject> crossSpeciesExactMatch) Creates a newTaxonConstraintValueObjectinstance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanMONDO'scrossSpeciesExactMatchtargets — the same disease in another species, typically the human counterpart.getLabel()Scientific name when the loaded model carries one, e.g.NCBI taxon id, e.g.getUri()Full NCBITaxon URI, e.g.inthashCode()booleanWhether the ontology declares anin_taxonconstraint for this term.toString()
-
Constructor Details
-
TaxonConstraintValueObject
public TaxonConstraintValueObject(boolean declared, @Nullable String uri, @Nullable Integer ncbiTaxonId, @Nullable String label, List<AnnotationsWebService.OntologyTermSimpleValueObject> crossSpeciesExactMatch) Creates a newTaxonConstraintValueObjectinstance.- Parameters:
declared- Whether the ontology declares anin_taxonconstraint for this term. False means checked and none declared — a term with no species restriction, i.e. normally applicable.uri- Full NCBITaxon URI, e.g.http://purl.obolibrary.org/obo/NCBITaxon_9940. Null whendeclaredis false.ncbiTaxonId- NCBI taxon id, e.g. 9940 forOvis aries. The field to key on: the label is absent whenever NCBITaxon is not loaded (Gemma does not load it) and the referencing ontology declared none of its own, so a client keying on the name stops matching the day that changes.label- Scientific name when the loaded model carries one, e.g.Ovis aries; often null.crossSpeciesExactMatch- MONDO'scrossSpeciesExactMatchtargets — the same disease in another species, typically the human counterpart.This is the difference between a species gate DROPPING a tag and REPAIRING it:
MONDO:0700199 sheep lung adenocarcinoma → MONDO:0005061 lung adenocarcinomais a defensible annotation, where a bare rejection leaves the experiment with no disease tag at all. MONDO carries 2,279 of these.Carries the URI, not just the label.
"lung adenocarcinoma"names bothMONDO:0005061andHP:0030078, so a client repairing from the string can land on the phenotype instead of the disease — the exact HP-beats-MONDO confusion the category table exists to prevent.labelis null whenever the referenced term's ontology is not loaded, which is precisely when the identifier matters most.Empty rather than null when the term declares none, since the object is only ever emitted for hits we actually inspected.
-
-
Method Details
-
isDeclared
public boolean isDeclared()Whether the ontology declares anin_taxonconstraint for this term. False means checked and none declared — a term with no species restriction, i.e. normally applicable. -
getUri
Full NCBITaxon URI, e.g.http://purl.obolibrary.org/obo/NCBITaxon_9940. Null whendeclaredis false. -
getNcbiTaxonId
NCBI taxon id, e.g. 9940 forOvis aries. The field to key on: the label is absent whenever NCBITaxon is not loaded (Gemma does not load it) and the referencing ontology declared none of its own, so a client keying on the name stops matching the day that changes. -
getLabel
Scientific name when the loaded model carries one, e.g.Ovis aries; often null. -
getCrossSpeciesExactMatch
MONDO'scrossSpeciesExactMatchtargets — the same disease in another species, typically the human counterpart.This is the difference between a species gate DROPPING a tag and REPAIRING it:
MONDO:0700199 sheep lung adenocarcinoma → MONDO:0005061 lung adenocarcinomais a defensible annotation, where a bare rejection leaves the experiment with no disease tag at all. MONDO carries 2,279 of these.Carries the URI, not just the label.
"lung adenocarcinoma"names bothMONDO:0005061andHP:0030078, so a client repairing from the string can land on the phenotype instead of the disease — the exact HP-beats-MONDO confusion the category table exists to prevent.labelis null whenever the referenced term's ontology is not loaded, which is precisely when the identifier matters most.Empty rather than null when the term declares none, since the object is only ever emitted for hits we actually inspected.
-
equals
-
hashCode
-
toString
-