Class: EMLDistribution

EMLDistribution()

Information on how the resource is distributed online and offline

Extends

  • Backbone.Model

Members

defaults :Object

Default values for an EML 211 Distribution model. This is essentially a flattened version of the EML 2.1.1 DistributionType, including nodes and node attributes. Not all nodes are supported by this model yet.
Type:
  • Object
Properties:
Name Type Description
type string The name of the top-level XML element that this model represents (distribution)
objectXML string The XML string representation of the distribution
objectDOM Element The DOM representation of the distribution
mediumName string The name of the medium on which the offline distribution is stored
mediumVolume string The volume number of the medium on which the offline distribution is stored
mediumFormat string The format of the medium on which the offline distribution is stored
mediumNote string A note about the medium on which the offline distribution is stored
url string The URL of the online distribution
urlFunction string The purpose of the URL. May be either "information" or "download".
onlineDescription string A description of the online distribution
parentModel EML211 The parent model of this distribution model
Source:

distLocations :Array.<string>

The direct children of the node that can have values, and that are supported by this model. "inline" is not supported yet. A distribution may have ONE of these nodes.
Type:
  • Array.<string>
Since:
  • 2.26.0
Source:

offlineNodes :Array.<string>

lower-case EML node names that belong within the node. These must be in the correct order.
Type:
  • Array.<string>
Since:
  • 2.26.0
Source:

onlineNodes :Array.<string>

lower-case EML node names that belong within the node. These must be in the correct order.
Type:
  • Array.<string>
Since:
  • 2.26.0
Source:

urlFunctionTypes :Array.<string>

the allowed values for the urlFunction attribute
Type:
  • Array.<string>
Since:
  • 2.26.0
Source:

Methods

hasValuesForDistributionLocation(location) → {boolean}

Check if the model has values for the given distribution location.
Parameters:
Name Type Description
location string one of the names of the direct children of the node, i.e. any of the values in this.distLocations.
Since:
  • 2.26.0
Source:
Returns:
- true if the model has values for the given location, false otherwise.
Type
boolean

initialize(options)

Initializes this EMLDistribution object
Parameters:
Name Type Description
options Object A literal object with options to pass to the model
Source:

parse(attributes)

Parses the given XML node or object and sets the model's attributes
Parameters:
Name Type Description
attributes Object the attributes passed in when the model is instantiated. Should include objectDOM or objectXML to be parsed.
Source:

serialize() → {string}

Returns the XML string representation of this model
Source:
Returns:
Type
string