TaxonConceptWrapper
Source: TaxonConceptWrapper.js:26
The TaxonConceptWrapper wraps taxon concepts. These are taxonomic units with a type of TaxonomicUnitWrapper.TYPE_TAXON_CONCEPT. They are based on the Taxon Concept ontology at https://github.com/tdwg/ontology/tree/master/ontology/voc.
A taxon concept:
- SHOULD have a hasName property indicating the name this taxon refers to.
- MAY have accordingTo, describedBy or circumscribedBy to indicate how this taxon concept should be circumscribed. If none of these are present, this taxonomic unit will be considered a taxon rather than a taxon concept (i.e. as a nominal taxon concept, as in https://github.com/darwin-sw/dsw/wiki/ClassTaxon).
- MAY have nameString and accordingToString properties. We will fall back to these properties if hasName or accordingTo are missing.
Constructor
new TaxonConceptWrapper(
tunit,
defaultNomenCode,
): TaxonConceptWrapperCreate a TaxonConceptWrapper around a taxon concept.
Static Methods
normalize(tc)
Normalize the specified taxon concept.
Parameters
tc— A taxon concept to be normalized.
fromLabel()
Given a node label, attempt to parse it as a scientific name.
Note that this is NOT memoized -- you should really be using TaxonomicUnitWrapper.fromLabel() or TaxonNameWrapper.fromVerbatimName() rather than calling this directly.
Returns
- A taxonomic unit that corresponds to this taxon concept.
wrapTaxonName()
Wrap a taxon name with a particular TaxonName object and an accordingTo (string).
Instance Fields
taxonName
Return the taxon name of this taxon concept (if any) as an object.
nameComplete
Return the complete taxon name of this taxon concept (if any), which is the uninomial, binomial or trinomial name.
nomenCode
Return the nomenclatural code of this taxon concept as a string.
nomenCodeDetails
Return the nomenclatural code of this taxon concept as an object.
accordingTo
Return the accordingTo information (if any) as an object.
For now, we return this verbatim. Once we close #15, we should parse raw labels with a CitationWrapper.
accordingToString
Return the accordingTo information (if any) as a string.
For now, we stringify objects by converting them into JSON strings. Once we close #15, we will be able to generate a label using CitationWrapper.
label
Return the label of this taxon concept.
asOWLEquivClass
Return how this class should look in an OWL equivalentClass expression.
Note that we don't include the accordingTo information in this query, since we don't have a useful way to use that during OWL reasoning.
Static Fields
TYPE_TAXON_CONCEPT
The @type of a taxon or taxon concept.