Class: EMLView

EMLView()

An EMLView renders an editable view of an EML 2.1.1 document

Constructor

new EMLView()

Source:

Extends

Members

type :ScienceMetadata

The ScienceMetadata model to render
Type:
Inherited From:
Source:

dataSensitivityContainerSelector :string

jQuery selector for the element that contains the Data Sensitivity section.
Type:
  • string
Source:

partyTypes :Array.<object>

An array of literal objects to describe each type of EML Party. This property has been moved to EMLParty#partyTypes as of 2.21.0 and will soon be deprecated.
Type:
  • Array.<object>
Since:
  • 2.15.0
Deprecated:
  • Yes
Source:

Methods

formatParagraphs()

Takes the text object from a metadata model and returns it as HTML formatted with paragraph elements
Inherited From:
Source:

updateText()

When a text element is changed, update the attribute in the model
Inherited From:
Source:

addAnnotation(e)

Adds an EMLAnnotation to the EML211 model currently being edited. Attributes for the annotation are retreived from the HTML attributes from the HTML element that was interacted with.
Parameters:
Name Type Description
e Event An Event on an Element that contains EMLAnnotation data
Source:

addTaxa(newClassifications)

Add new taxa to the EML model and re-render the taxa section. The new taxa will be added to the first element in the EML model. If there is no element, one will be created.
Parameters:
Name Type Description
newClassifications Array.<Object> An array of objects with any of the following properties: - taxonRankName: (sting) The name of the taxonomic rank, e.g. "Kingdom" - taxonRankValue: (string) The value of the taxonomic rank, e.g. "Animalia" - commonName: (string) The common name of the taxon, e.g. "Animals" - taxonId: (object) The official ID of the taxon, including "provider" and "value". - taxonomicClassification: (array) An array of nested taxonomic classifications
Since:
  • 2.24.0
Source:
Example
this.addTaxon([{
 taxonRankName: "Kingdom",
 taxonRankValue: "Animalia",
 commonName: "Animals",
 taxonId: {
   provider: "https://www.itis.gov/",
   value: "202423"
 }]);

getTaxonQuickAddOptions() → {Array.<Object>}

Get the list of options for the taxon quick add interface. Filter out any that have already been added to the taxonomic coverage.
Since:
  • 2.24.0
Source:
Returns:
An array of search select options
Type
Array.<Object>

makeNewTaxonomicClassificationRow() → {jQuery}

Create the HTML for a new row in a taxonomicClassification table
Since:
  • 2.24.0
Source:
Returns:
A jQuery object containing the HTML for a new row in a taxonomicClassification table
Type
jQuery

makeTaxonomicClassificationRow(classification) → {jQuery}

Create the HTML for a single row in a taxonomicClassification table
Parameters:
Name Type Description
classification EMLTaxonCoverage#taxonomicClassification A classification object from an EMLTaxonCoverage model, may include a taxonRank, taxonValue, taxonId, commonName, and nested taxonomicClassification objects
Since:
  • 2.24.0
Source:
Returns:
A jQuery object containing the HTML for a single row in a taxonomicClassification table
Type
jQuery

movePersonDown(e:)

Attempt to move the current person (Party) one index forward (down).
Parameters:
Name Type Description
e: EventHandler The click event handler
Source:

movePersonUp(e:)

Attempt to move the current person (Party) one index backward (up).
Parameters:
Name Type Description
e: EventHandler The click event handler
Source:

renderDataSensitivity()

Renders the Data Sensitivity section of the Editor using the data-sensitivity.html template.
Source:
Fires:
  • EML211View#event:editorInputsAdded

renderPeopleDropdown()

Creates and renders the dropdown at the bottom of the people section that allows the user to create a new party type category. The dropdown menu is saved to the view as view.partyMenu.
Since:
  • 2.15.0
Source:

renderPerson(emlParty, partyType)

Render the information provided for a given EML party in the party section.
Parameters:
Name Type Description
emlParty EMLParty the EMLParty model to render. If set to null, a new EML party will be created for the given party type.
partyType string The party type for which to render a new EML party. E.g. "creator", "coPrincipalInvestigator", etc.
Source:

renderTaxaQuickAdd()

Insert the "quick add" interface for adding common taxa to the taxonomic coverage section. Only renders if there is a list of taxa configured in the appModel.
Source:

taxonOptionToSearchSelectItem(option) → {Object}

Reformats a taxon option, as provided in the appModel AppModel#quickAddTaxa, as a search select item.
Parameters:
Name Type Description
option Object A single taxon classification with at least a taxonRankValue and taxonRankName. It may also have a taxonId (object with provider and value) and a commonName.
Source:
Returns:
A search select item with label, value, and description properties.
Type
Object

updateQuickAddTaxa()

Update the options for the quick add taxon select interface. This ensures that only taxonomic classifications that are not already included in the taxonomic coverage are available for selection.
Since:
  • 2.24.0
Source: