Class: EMLMethods

EMLMethods()

Represents the EML Methods module. The methods field documents scientific methods used in the collection of this dataset. It includes information on items such as tools, instrument calibration and software.

Constructor

new EMLMethods()

Source:

Extends

  • Backbone.Model

Methods

addMethodStep(attropt)

Creates a new EMLMethodStep model and adds it to this model
Parameters:
Name Type Attributes Description
attr object <optional>
A literal object of attributes to set on the EMLMethodStep
Since:
  • 2.19.0
Source:

createCustomMethodSteps() → {Array.<EMLMethodStep>}

Creates and returns the custom Method Step models, as configured in the AppConfig
Since:
  • 2.19.0
Source:
Returns:
Type
Array.<EMLMethodStep>

defaults() → {object}

The default values of this model that are get() or set()
Properties:
Name Type Description
objectXML string The original XML snippet string from the EML XML
objectDOM Element The original XML snippet as an Element
methodSteps Array.<EMLMethodStep> An array of EMLMethodSteps that describe the scientific method steps
studyExtentDescription EMLText The field studyExtent represents both a specific sampling area and the sampling frequency (temporal boundaries, frequency of occurrence).
samplingDescription EMLText The samplingDescription field allows for a text-based/human readable description of the sampling procedures used in the research project.
Source:
Returns:
Type
object

getCustomSteps() → {Array.<EMLMethodStep>}

Returns the EMLMethodSteps that are custom methods, as configured in AppConfig#customEMLMethods
Since:
  • 2.19.0
Source:
Returns:
Type
Array.<EMLMethodStep>

getNonCustomSteps() → {Array.<EMLMethodStep>}

Returns the EMLMethodSteps that are not custom methods, as configured in AppConfig#customEMLMethods
Since:
  • 2.19.0
Source:
Returns:
Type
Array.<EMLMethodStep>

getParentEML() → {EML211|false}

Climbs up the model heirarchy until it finds the EML model
Source:
Returns:
- Returns the EML 211 Model or false if not found
Type
EML211 | false

isEmpty() → {boolean}

function isEmpty() - Will check if there are any values set on this model that are different than the default values and would be serialized to the EML.
Source:
Returns:
- Returns true is this model is empty, false if not
Type
boolean

nodeNameMap() → {object}

Maps the lower-case EML node names (valid in HTML DOM) to the camel-cased EML node names (valid in EML). Used during parse() and serialize()
Source:
Returns:
Type
object

removeMethodStep(step)

Removes the given EMLMethodStep from the overall EMLMethods
Parameters:
Name Type Description
step EMLMethodStep The EMLMethodStep to remove
Since:
  • 2.19.0
Source:

updateDOM()

Makes a copy of the original XML DOM and updates it with the new values from the model.
Source:

validate() → {object}

Overloads Backbone.Model.validate() to check if this model has valid values set on it. For now, only the custom method steps are validated, because they could be required.
Source:
Returns:
Type
object