Home Manual Reference Source Test
import {TaxonomicUnitWrapper} from '@phyloref/phyx/src/wrappers/TaxonomicUnitWrapper.js'
public class | source

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.

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

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

Return this taxonomic unit if it is a specimen.

public get

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

public static get TYPE_SPECIMEN: * source

A specimen.

public static get TYPE_TAXON_CONCEPT: * source

A taxon or taxon concept.

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:

NameTypeAttributeDescription
nodeLabel *
nomenCode *
  • optional

Return:

*

A taxonomic unit that this label could be parsed as.

Public Constructors

public constructor() source

Wrap a taxonomic unit.

Public Members

public get asJSON: * source

Return the JSON representation of this taxonomic unit, i.e. the object we're wrapping.

public get asJSONLD: * source

Return this taxonomic unit as an OWL/JSON-LD object.

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.

public get label: * source

Return the label of this taxonomic unit.

public get specimen: * source

Return this taxonomic unit if it is a specimen.

public get taxonConcept: * source

Return this taxonomic unit if it is a taxon concept.

public tunit: * source

public get types: undefined[] source

What type of specifier is this? This is an array that could contain multiple classes, but should contain one of: