import {TaxonConceptWrapper} from '@phyloref/phyx/src/wrappers/TaxonConceptWrapper.js'
TaxonConceptWrapper
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.
Static Member Summary
Static Public Members | ||
public static get |
The @type of a taxon or taxon concept. |
Static Method Summary
Static Public Methods | ||
public static |
fromLabel(nodeLabel: *, nomenCode: *): * Given a node label, attempt to parse it as a scientific name. |
|
public static |
normalize(tc: *): * Normalize the specified taxon concept. |
|
public static |
wrapTaxonName(taxonName: *, accordingTo: *): * Wrap a taxon name with a particular TaxonName object and an accordingTo (string). |
Constructor Summary
Public Constructor | ||
public |
Create a TaxonConceptWrapper around a taxon concept. |
Member Summary
Public Members | ||
public get |
accordingTo: * Return the accordingTo information (if any) as an object. |
|
public get |
Return the accordingTo information (if any) as a string. |
|
public get |
asOWLEquivClass: {"@type": string, "onProperty": *, "someValuesFrom": *} Return how this class should look in an OWL equivalentClass expression. |
|
public |
|
|
public get |
label: * Return the label of this taxon concept. |
|
public get |
nameComplete: * Return the complete taxon name of this taxon concept (if any), which is the uninomial, binomial or trinomial name. |
|
public get |
nomenCode: * Return the nomenclatural code of this taxon concept as a string. |
|
public get |
Return the nomenclatural code of this taxon concept as an object. |
|
public get |
taxonName: * Return the taxon name of this taxon concept (if any) as an object. |
|
public |
tunit: * |
Static Public Members
Static Public Methods
public static fromLabel(nodeLabel: *, nomenCode: *): * source
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.
Params:
Name | Type | Attribute | Description |
nodeLabel | * | ||
nomenCode | * |
|
Return:
* | A taxonomic unit that corresponds to this taxon concept. |
public static normalize(tc: *): * source
Normalize the specified taxon concept.
Params:
Name | Type | Attribute | Description |
tc | * | A taxon concept to be normalized. |
Return:
* |
public static wrapTaxonName(taxonName: *, accordingTo: *): * source
Wrap a taxon name with a particular TaxonName object and an accordingTo (string).
Params:
Name | Type | Attribute | Description |
taxonName | * | ||
accordingTo | * |
Return:
* |
Public Constructors
Public Members
public get accordingTo: * source
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.
public get accordingToString: * source
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.
public get asOWLEquivClass: {"@type": string, "onProperty": *, "someValuesFrom": *} source
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.
public defaultNomenCode: * source
public get nameComplete: * source
Return the complete taxon name of this taxon concept (if any), which is the uninomial, binomial or trinomial name.
public get nomenCodeDetails: * source
Return the nomenclatural code of this taxon concept as an object.