Class Biojs.EbiGlobalSearch
Version
1.0.0.
Extends
Biojs.
Defined in: Biojs.EbiGlobalSearch.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Biojs.EbiGlobalSearch(options)
EBI Global Search
|
| Field Attributes | Field Name and Description |
|---|---|
| <inner> |
Array containing the supported event names
|
| <inner> |
Default values for the options
|
| Method Attributes | Method Name and Description |
|---|---|
|
constructor(options)
|
|
|
setQuery(query, style)
Set query for the service.
|
|
|
setStyle(style)
Test styles for the service.
|
- Methods borrowed from class Biojs:
- addListener, extend, getId, listen, raiseEvent, setEventHandlers, setOptions
| Event Attributes | Event Name and Description |
|---|---|
|
onError(actionPerformed)
|
|
|
onResults(actionPerformed)
|
Class Detail
Biojs.EbiGlobalSearch(options)
EBI Global Search
Author: Rafael C Jimenez.
Author: Rafael C Jimenez.
var instance = new Biojs.EbiGlobalSearch({
target: 'YourOwnDivId',
query: 'p53',
searchBaseURL: 'http://www.ebi.ac.uk/ebisearch/',
style: 'collapsible' // basic | collapsible | expanded
});
- Parameters:
- {Object} options
- Component options
- Options detailed:
- {string} target
- Identifier of the DIV tag where the component should be displayed
- {string} query
- [query='keratin'] Query to retrieve EBI search results
- {string} [searchBaseURL='www.ebi.ac.uk/ebisearch/']
- Base URL of the REST service which provides the data
- {string} [style='basic']
- Pptions to display this component: basic, collapsible or expanded
Field Detail
<inner>
eventTypes
Array containing the supported event names
<inner>
opt
Default values for the options
Method Detail
constructor(options)
- Parameters:
- options
setQuery(query, style)
Set query for the service.
instance.setQuery("ENSG00000100867");
instance.setQuery("Q61171");
instance.setQuery("actin");
instance.setQuery("keratinnn");
- Parameters:
- {string} query
- Query.
- {string} style
- Style: 'basic', 'collapsible' or 'expanded'.
setStyle(style)
Test styles for the service.
instance.setStyle('basic');
instance.setStyle('collapsible');
instance.setStyle('expanded');
- Parameters:
- {string} style
- Style: 'basic', 'collapsible' or 'expanded'.
Event Detail
onError(actionPerformed)
instance.onError(
function( e ) {
alert( e.message );
}
);
- Parameters:
- {function} actionPerformed
- A function which receives an Biojs.Event object as argument.
- Event object data:
- {string} message
- Error message in case of result be 'failure'.
onResults(actionPerformed)
instance.onResults(
function( objEvent ) {
alert( objEvent.resutls + " results for " + objEvent.servicesWithResults + " services of " + objEvent.services + " services queried" );
}
);
- Parameters:
- {function} actionPerformed
- A function which receives an Biojs.Event object as argument.
- Event object data:
- {int} resutls
- Number of total results.
- {int} items
- Number of items.