Class Index | File Index

Classes


Class Biojs.EbiGlobalSearch


Version 1.0.0.

Extends Biojs.

Defined in: Biojs.EbiGlobalSearch.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
EBI Global Search
Field Summary
Field Attributes Field Name and Description
<inner>  
Array containing the supported event names
<inner>  
opt
Default values for the options
Method Summary
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, removeListener, setEventHandlers, setOptions
Event Summary
Event Attributes Event Name and Description
 
onError(actionPerformed)
 
onResults(actionPerformed)
Class Detail
Biojs.EbiGlobalSearch(options)
EBI Global Search
Author: Rafael C Jimenez.
var instance = new Biojs.EbiGlobalSearch({
	  target: 'YourOwnDivId',
	  query: 'p53',
	  searchBaseURL: 'http://www.ebi.ac.uk/ebisearch/',
	  proxyUrl: '../biojs/dependencies/proxy/proxy.php',
	  style: 'expanded' // 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']
Options to display this component: basic, collapsible or expanded
{string} [proxyUrl='../biojs/dependencies/proxy/proxy.php']
Proxy to bypass the same origin policy (http://en.wikipedia.org/wiki/Same_origin_policy)
Requires:
jQuery Core 1.8.0
ebi-visual.css
EbiGlobalSearch.css
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.

Documentation generated by JsDoc Toolkit 2.3.2 on Thu Apr 17 2014 17:42:42 GMT+0100 (BST)