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:

Methods

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
Source:
Returns:
The literal object to be set on the model later
Type
object

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.
Source:
Returns:
Type
XMLElement