SpecimenWrapper

Source: SpecimenWrapper.js:22

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.


Constructor

new SpecimenWrapper(specimen): SpecimenWrapper

Construct a wrapper around a specimen.


Static Methods

normalize(specimen)

Normalize the specified specimen.

Parameters

  • specimen — A specimen to be normalized.

fromOccurrenceID()

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]'

Instance Fields

catalogNumber

Get the catalogNumber if present.

institutionCode

Get the institutionCode if present.

collectionCode

Get the collectionCode if present.

occurrenceID

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)

basisOfRecord

Return the basis of record, if one is present. See http://rs.tdwg.org/dwc/terms/basisOfRecord for recommended values.

basisOfRecord

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

taxonConcept

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

label

Return a label for this specimen.

asOWLEquivClass

Return this specimen as an equivalentClass expression.

Static Fields

TYPE_SPECIMEN

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