Class: EMLSpecializedText

EMLSpecializedText()

An EMLSpecializedText is an EML 2.2.0 Text module that is treated differently in the UI display. It is identified as "Specialized", by the title (either a `title` element in EMLText or a Markdown Header 1). For example, you may want to display a custom EML Method Step specifically about "Ethical Research Practices". An EMLSpecializedText would have a title of `Ethical Research Practices`, which would be serialized in the EML XML as a section title or markdown header.

Constructor

new EMLSpecializedText()

Since:
  • 2.19.0
Source:

Extends

Methods

getParentEML() → {EML211|false}

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

nodeNameMap()

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()
Inherited From:
Source:

parse(objectDOM) → {object}

Parses the XML objectDOM into a literal object to be set on the model. It uses the EMLText 220 parse() method first and then performs additional parsing for Specialized Texts. In particular, the first title in the text is sorted out and used to identify as a Specialized text.
Parameters:
Name Type Description
objectDOM Element XML Element to parse
Overrides:
Source:
Returns:
The literal object to be set on the model later
Type
object

setText()

Inherited From:
Source:

toString() → {string}

Inherited From:
Source:
Returns:
Type
string

updateDOM(textType) → {XMLElement}

Makes a copy of the original XML DOM and updates it with the new values from the model
Parameters:
Name Type Description
textType string a string indicating the name for the outer xml element (i.e. content). Used in case there is no exisiting xmlDOM.
Overrides:
Source:
Returns:
Type
XMLElement