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

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

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

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

Return the complete taxon name of this taxon concept (if any), which is the uninomial, binomial or trinomial name.

public get

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

Return the taxon name of this taxon concept (if any) as an object.

public

tunit: *

Static Public Members

public static get TYPE_TAXON_CONCEPT: * source

The @type of a taxon or taxon concept.

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:

NameTypeAttributeDescription
nodeLabel *
nomenCode *
  • optional

Return:

*

A taxonomic unit that corresponds to this taxon concept.

public static wrapTaxonName(taxonName: *, accordingTo: *): * source

Wrap a taxon name with a particular TaxonName object and an accordingTo (string).

Params:

NameTypeAttributeDescription
taxonName *
accordingTo *

Return:

*

Public Constructors

public constructor() source

Create a TaxonConceptWrapper around a taxon concept.

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 label: * source

Return the label of this taxon concept.

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 nomenCode: * source

Return the nomenclatural code of this taxon concept as a string.

public get nomenCodeDetails: * source

Return the nomenclatural code of this taxon concept as an object.

public get taxonName: * source

Return the taxon name of this taxon concept (if any) as an object.

public tunit: * source