Constructor
new BioontologySelectView()
- Since:
- Source:
Extends
Members
className
- Source:
ontologies :Array.<{label: string, ontology: string, subTree: string}>
The ontologies that can be searched or browsed. Each ontology needs a
"label" and a "ontology" (acronym) property. Optionally, a "subTree"
property can be provided to search a specific sub-tree of the ontology.
Type:
-
Array.<{label: string, ontology: string, subTree: string}>
- Since:
- Source:
queryField :string
The name of the field in the Solr schema that the user is searching.
Type:
- Source:
showClassLabels :boolean
Set this to false to avoid fetching class labels from BioPortal. The
labels will be displayed as the values that are returned from the Solr
query.
Type:
- Source:
type
- Source:
Methods
addListeners()
Listen to when a class is selected in the browser & when the button is
clicked to open the browser
- Source:
addOptionDetails(classes)
Add the details of the ontology classes to the options in the select
element
Parameters:
Name |
Type |
Description |
classes |
Backbone.Collection
|
Array
|
The collection of classes to add
to the options |
- Source:
fetchClassLabels()
Fetch the labels select element from BioPortal
- Source:
hideOntologyBrowser()
Hide the ontology browser modal
- Source:
initialize(optsopt)
Initialize the view
Parameters:
Name |
Type |
Attributes |
Description |
opts |
object
|
<optional>
|
The options to initialize the view with
Properties
Name |
Type |
Attributes |
Description |
showClassLabels |
boolean
|
<optional>
|
Set to false to avoid
fetching class labels from BioPortal |
queryField |
string
|
<optional>
|
The name of the field in the Solr
schema that the user is searching |
ontologies |
Array.<object>
|
<optional>
|
The ontoloties (& sub-trees) to
allow users to search for. |
|
- Source:
render()
- Source:
Create the button to open the ontology browser
- Source:
renderOntologyModal()
Render the ontology browser modal
- Source:
selectClass(ontologyClass)
Set the value of the select element to the given ontology class
Parameters:
Name |
Type |
Description |
ontologyClass |
OntologyClass
|
The class model to select |
- Source:
showOntologyBrowser()
Show the ontology browser modal
- Source: