Class: EMLMeasurementTypeView

EMLMeasurementTypeView()

new EMLMeasurementTypeView()

Source:

Extends

  • Backbone.View

Members

filterLabel

The label for the property that goes with terms selected with this interface as well as the terms inserted
Source:

filterURI

The URI of for the property that goes with terms selected with this interface as well as the terms inserted
Source:

model

Reference to the parent EMLAttribute model so we can .set/.get the 'annotation' attribute when this view adds or removes annotations
Source:

multiSelect

Whether to allow (true) the user to pick more than one value
Source:

ontology

The ontology (on BioPortal) to show a tree for
Source:

startingRoot

Which term within this.ontology to root the tree at. Set this to null to start at the root of the tree and set it to a class/term URI to root the tree at that class/term
Source:

Methods

handleMeasurementTypeNotFound(e)

Handle when the user can't find a class for their attribute This method isn't fantastic. We need a way to signify that the user couldn't find a good match for their attribute. EML doesn't have a way to specify this scenario so we use a sentinel value here in the hopes that moderation workflows will pick it up.
Parameters:
Name Type Description
e Event The click event
Source:

handleRemove(e)

Handle a click event to remove an annotation This method deletes by value rather than index because multiple views may be managing the state of the annotation attribute for a given EMLAttribute. i.e., the indices might not match when removals are happening in both views.
Parameters:
Name Type Description
e Event A click event handler
Source:

removeAnnotationsBy(attribute, value)

Remove a annotations by value Removes all matching annotations with a matching valueURI
Parameters:
Name Type Description
attribute string The model attribute to pull from
value string The value to compare with
Source:

renderAnnotations()

Render just the list of annotation in the view Used in both render() to perform the initial render and by selectConcept and handleRemove to update the list as annotations are added and removed
Source:

selectConcept(event, classId, prefLabel, selectedNode)

Add an annotation when the user selects on in the UI
Parameters:
Name Type Description
event Event The click event handler
classId string The selected term's URI
prefLabel string The selected term's prefLabel
selectedNode Element The clicked element
Source: