Class: EMLTaxonCoverage

EMLTaxonCoverage()

The EMLTaxonCoverage model represents the taxonomic coverage of a dataset. It includes a general description of the taxonomic coverage, as well as a list of taxonomic classifications.

Constructor

new EMLTaxonCoverage()

Source:

Extends

  • Backbone.Model

Members

defaults :Object

Returns the default properties for this model. Defined here.
Type:
  • Object
Properties:
Name Type Description
objectXML string The XML string for this model
objectDOM Element The XML DOM for this model
parentModel EML211 The parent EML211 model
taxonomicClassification Array.<taxonomicClassification> An array of taxonomic classifications, defining the taxonomic coverage of the dataset
generalTaxonomicCoverage string A general description of the taxonomic coverage of the dataset
Source:

Methods

classificationsAreEqual(c1, c2) → {boolean}

Check if two classifications are equal. Two classifications are equal if they have the same rankName, rankValue, commonName, and taxonId, as well as the same nested classifications. This function is recursive.
Parameters:
Name Type Description
c1 taxonomicClassification
c2 taxonomicClassification
Since:
  • 2.24.0
Source:
Returns:
- True if the two classifications are equal
Type
boolean

isDuplicate(classification, indexToSkip) → {boolean}

Returns true if the given classification is a duplicate of another classification in this model. Duplicates are considered those that have all values identical, including rankName, rankValue, commonName, and taxonId. If there are any nested classifications, then they too must be identical for the classification to be considered a duplicate, this this function is recursive. Only checks one classification at a time.
Parameters:
Name Type Description
classification taxonomicClassification
indexToSkip number The index of the classification to skip when checking for duplicates. This is useful when checking if a classification is a duplicate of another classification in the same model, but not itself.
Since:
  • 2.24.0
Source:
Returns:
- True if the given classification is a duplicate
Type
boolean

removeDuplicateClassifications()

Remove any duplicated classifications from this model. See isDuplicate for more information on what is considered a duplicate. If any classifications are removed, then a "duplicateClassificationsRemoved" event is triggered, passing the removed classifications as an argument.
Since:
  • 2.24.0
Source:
Fires:
  • event:duplicateClassificationsRemoved