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

SpecimenWrapper

The SpecimenWrapper wraps specimen taxonomic units. These can be identified with a '@type' of SpecimenWrapper.TYPE_SPECIMEN (which is currently https://dwc.tdwg.org/terms/#occurrence).

  • TaxonomicUnitWrapper.TYPE_SPECIMEN: A specimen.

Since TaxonNameWrapper follows the TDWG ontology, we'd love to do the same for SpecimenWrapper, but unfortunately the TaxonOccurrence ontology has been deprecated (see https://github.com/tdwg/ontology). Therefore, it instead improvises a representation based on dwc:Occurrence.

Static Member Summary

Static Public Members
public static get

The '@type' of specimens in JSON-LD document.

Static Method Summary

Static Public Methods
public static

fromOccurrenceID(occurrenceID: *, basisOfRecord: string): *

Parse the provided occurrence ID.

Constructor Summary

Public Constructor
public

Construct a wrapper around a specimen.

Member Summary

Public Members
public get

asOWLEquivClass: {"@type": string, "onProperty": *, "hasValue": *}

Return this specimen as an equivalentClass expression.

public get

Return the basis of record, if one is present.

public set

Set the basis of record.

public get

Get the catalogNumber if present.

public get

Get the collectionCode if present.

public get

Get the institutionCode if present.

public get

Return a label for this specimen.

public get

Return the occurrence ID of this specimen, if we have one.

public
public get

Return this specimen as a taxon concept if it contains taxon name information.

Static Public Members

public static get TYPE_SPECIMEN: * source

The '@type' of specimens in JSON-LD document.

Static Public Methods

public static fromOccurrenceID(occurrenceID: *, basisOfRecord: string): * source

Parse the provided occurrence ID. The two expected formats are:

  • 'urn:catalog:[institutionCode]:[collectionCode]:[catalogNumber]' (in which case, we ignore the first two "components" here)
  • '[institutionCode]:[collectionCode]:[catalogNumber]'

Params:

NameTypeAttributeDescription
occurrenceID *
basisOfRecord string
  • optional
  • default: PreservedSpecimen

Return:

*

Public Constructors

public constructor() source

Construct a wrapper around a specimen.

Public Members

public get asOWLEquivClass: {"@type": string, "onProperty": *, "hasValue": *} source

Return this specimen as an equivalentClass expression.

public get basisOfRecord: * source

Return the basis of record, if one is present.

public set basisOfRecord source

Set the basis of record. See http://rs.tdwg.org/dwc/terms/basisOfRecord for recommended values.

public get catalogNumber: * source

Get the catalogNumber if present.

public get collectionCode: * source

Get the collectionCode if present.

public get institutionCode: * source

Get the institutionCode if present.

public get label: string source

Return a label for this specimen.

public get occurrenceID: * source

Return the occurrence ID of this specimen, if we have one. Otherwise, we attempt to construct one in the form: "urn:catalog:" + institutionCode (if present) + ':' + collectionCode (if present) + ':' + catalogNumber (if present)

public specimen: * source

public get taxonConcept: * source

Return this specimen as a taxon concept if it contains taxon name information.