Constructor
new BioontologyAccordionSearchSelect()
- Since:
- Source:
Extends
Methods
connect()
Connects the three models together. When the bioontology results change,
the accordion display model is updated to reflect the new results. When
the selected ontology model changes in the searchSelect, the bioontology
model is updated to reflect the new ontology.
- Source:
defaults()
Default model attributes
Properties:
Name |
Type |
Description |
bioontology |
Bioontology
|
The Bioontology model |
accordion |
Accordion
|
The Accordion model |
searchSelect |
SearchSelect
|
The SearchSelect model |
selectedClass |
BioontologyClass
|
The selected ontology class |
accordionRoot |
string
|
The root-level ontology or subtree when
the Bioontology model is first fetched (can change when searching subtrees). |
defaultSubtree |
string
|
The default subtree to display when
if no subtree is specified in the ontology options. |
ontologyOptions |
Array
|
An array of objects specifying the
ontologies to choose from in the SearchSel |
- Source:
fetchChildren(itemModel)
Fetches the children of an ontology class from the BioPortal API.
Parameters:
Name |
Type |
Description |
itemModel |
Backbone.Model
|
The model of the ontology class to
fetch children for. |
- Source:
initialize()
- Source:
setAccordionRoot(subTreeopt)
Sets the accordionRoot attribute to the root ontology or subtree when
the Bioontology model is first fetched.
Parameters:
Name |
Type |
Attributes |
Description |
subTree |
string
|
<optional>
|
The root ontology or subtree. If not
provided, current subTree of the Bioontology model is used or the
default subtree. |
- Source:
setSelectedClass(itemModel)
Selects a class in the accordion and sets the selectedClass attribute
in this connector to the selected class.
Parameters:
Name |
Type |
Description |
itemModel |
Backbone.Model
|
The model of the selected class. |
- Source:
setupAccordion()
Sets up the Accordion model with the first ontology and fetches the
ontology classes.
- Source:
setupBioontology(firstOntology)
Sets up the Bioontology model with the first ontology and fetches the
ontology classes.
Parameters:
Name |
Type |
Description |
firstOntology |
object
|
The first ontology object in the
ontologyOptions array. |
- Source:
setupSearchSelect(options, selected)
Sets up the SearchSelect model with the ontology options and the first
ontology.
Parameters:
Name |
Type |
Description |
options |
Array.<object>
|
An array of ontology options objects to
populate a search select model. |
selected |
string
|
The value of the first ontology to select. |
- Source:
switchOntology(newOntology)
Switches the ontology in the bioontology model to the selected ontology
and fetches the new ontology classes.
Parameters:
Name |
Type |
Description |
newOntology |
BioontolgyClass
|
The selected ontology model,
with ontology and subTree attributes. |
- Source:
syncAccordion()
Syncs the accordion display model with the bioontology results model.
This method is called when the bioontology results model changes.
- Source: