Class: EMLReferences

EMLReferences()

Constructor

new EMLReferences()

Since:
  • 2.34.0
Source:

Extends

  • Backbone.Model

Methods

defaults() → {object}

Default attributes for an EML element.
Properties:
Name Type Description
references string The id of another element being referenced.
system string | null Optional system attribute for external system scoping.
objectDOM string The DOM representation of this references element.
modelType string The name of the backbone model that is used to represent this the element that the reference points to. We need this to be able to find the element in the EML document that corresponds to this reference.
parentModel Backbone.Model The parent EML model of this references element, e.g. a EMLAttributeList.
Source:
Returns:
- Default attributes for the model.
Type
object

getLinkedDOM() → {jQuery|null}

Get the linked DOM element in the EML document that corresponds to the references. This is the element with the same id that the reference points to.
Source:
Returns:
- The linked DOM element or null if not found.
Type
jQuery | null

getLinkedModel() → {Backbone.Model|null}

Find the subtree in the EML document that corresponds to the references. i.e. the element with the same id that the reference points to.
Source:
Returns:
- The linked model or null if not found.
Type
Backbone.Model | null

getParentEML() → {EML}

Get the parent EML model of this references element.
Source:
Returns:
- The parent EML model.
Type
EML

isEmpty() → {boolean}

Check if the references element is empty.
Source:
Returns:
- True if the references element is empty, false otherwise.
Type
boolean

parse(response, options) → {object}

Convert the references xml to model attributes.
Parameters:
Name Type Description
response HTMLElement | jQuery The XML response to parse.
options object Options for parsing.
Properties
Name Type Description
parentModel Backbone.Model The parent model of this references element, e.g. a EMLAttributeList.
Source:
Returns:
- The parsed attributes.
Type
object

updateDOM() → {string}

Serialize the model to an XML string.
Source:
Returns:
- The XML representation of this element.
Type
string

validate() → {object}

Validate the attributes to ensure a valid structure.
Source:
Returns:
- An object containing validation errors, if any.
Type
object