import {TaxonomicUnitWrapper} from '@phyloref/phyx/src/wrappers/TaxonomicUnitWrapper.js'
TaxonomicUnitWrapper
The TaxonomicUnitWrapper wraps taxonomic units, whether on a node or being used as a specifier on a phyloreference. Every taxonomic unit can additionally be wrapped by more specific classes, such as TaxonConceptWrapper or SpecimenWrapper. We can determine which type it is based on its '@type' and whether it includes:
- TaxonomicUnitWrapper.TYPE_TAXON_CONCEPT => TaxonConceptWrapper
- TaxonomicUnitWrapper.TYPE_SPECIMEN => SpecimenWrapper
- TaxonomicUnitWrapper.TYPE_APOMORPHY => reserved for future use
- TaxonomicUnitWrapper.TYPE_PHYLOREF => reserved for future use
It also contains static methods for extracting taxonomic units from arbitrary strings, such as phylogeny labels.
Every taxonomic unit SHOULD have an rdfs:label and MAY include a dcterm:description to describe it in human-readable terms. It MUST include a '@type' that specifies what type of taxonomic unit it is.
Taxonomic units may be specified with only an '@id' or a set of '@id's, which indicate external references.
Static Member Summary
Static Public Members | ||
public static get |
A specimen. |
|
public static get |
A taxon or taxon concept. |
Static Method Summary
Static Public Methods | ||
public static |
fromLabel(nodeLabel: *, nomenCode: *): * Given a label, attempt to parse it into a taxonomic unit, whether a scientific name or a specimen identifier. |
|
public static |
normalize(tunit: *): * Normalize the specified taxonomic unit. |
Constructor Summary
Public Constructor | ||
public |
Wrap a taxonomic unit. |
Member Summary
Public Members | ||
public get |
asJSON: * Return the JSON representation of this taxonomic unit, i.e. |
|
public get |
asJSONLD: * Return this taxonomic unit as an OWL/JSON-LD object. |
|
public get |
Return the equivalent class expression for this taxonomic unit. |
|
public |
|
|
public get |
Return the list of external references for this taxonomic unit. |
|
public get |
label: * Return the label of this taxonomic unit. |
|
public get |
specimen: * Return this taxonomic unit if it is a specimen. |
|
public get |
taxonConcept: * Return this taxonomic unit if it is a taxon concept. |
|
public |
tunit: * |
|
public get |
What type of specifier is this? This is an array that could contain multiple classes, but should contain one of: |
Static Public Members
Static Public Methods
public static fromLabel(nodeLabel: *, nomenCode: *): * source
Given a label, attempt to parse it into a taxonomic unit, whether a scientific name or a specimen identifier. The provided nomenclatural code is used.
Params:
Name | Type | Attribute | Description |
nodeLabel | * | ||
nomenCode | * |
|
Return:
* | A taxonomic unit that this label could be parsed as. |
public static normalize(tunit: *): * source
Normalize the specified taxonomic unit.
Params:
Name | Type | Attribute | Description |
tunit | * | A taxonomic unit to be normalized. |
Return:
* |
Public Constructors
Public Members
public get asJSON: * source
Return the JSON representation of this taxonomic unit, i.e. the object we're wrapping.
public get asOWLEquivClass: * source
Return the equivalent class expression for this taxonomic unit.
public defaultNomenCode: * source
public get externalReferences: undefined[] source
Return the list of external references for this taxonomic unit. This is just all the '@ids' of this object.