org.intermine.web.logic.widget
Class Widget

java.lang.Object
  extended by org.intermine.web.logic.widget.Widget
Direct Known Subclasses:
EnrichmentWidget, GraphWidget, GridWidget, HTMLWidget, TableWidget

public abstract class Widget
extends java.lang.Object


Field Summary
protected  WidgetConfig config
           
 
Constructor Summary
Widget(WidgetConfig config)
          The constructor
 
Method Summary
 java.lang.String getConfigId()
          Get the ID of the corresponding WidgetConfig
abstract  java.util.List<java.lang.String> getElementInList()
          checks if elem is in bag
abstract  java.util.List<java.util.List<java.lang.String>> getExportResults(java.lang.String[] selected)
           
abstract  java.util.List<java.util.List<java.lang.String[]>> getFlattenedResults()
           
abstract  boolean getHasResults()
           
abstract  int getNotAnalysed()
           
 java.lang.String getTitle()
          Get the widget title
abstract  void process()
          Process the data and create the widget
abstract  void setNotAnalysed(int notAnalysed)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

config

protected WidgetConfig config
Constructor Detail

Widget

public Widget(WidgetConfig config)
The constructor

Parameters:
config - the WidgetConfig
Method Detail

process

public abstract void process()
                      throws java.lang.Exception
Process the data and create the widget

Throws:
java.lang.Exception - if one of the classes in the widget isn't found

getNotAnalysed

public abstract int getNotAnalysed()
Returns:
the number of objects not analysed in this widget

setNotAnalysed

public abstract void setNotAnalysed(int notAnalysed)
Parameters:
notAnalysed - the number of objects not analysed in this widget

getExportResults

public abstract java.util.List<java.util.List<java.lang.String>> getExportResults(java.lang.String[] selected)
                                                                           throws java.lang.Exception
Parameters:
selected - the list of checked items from the form
Returns:
the checked items in export format
Throws:
java.lang.Exception - something has gone wrong. oh no.

getFlattenedResults

public abstract java.util.List<java.util.List<java.lang.String[]>> getFlattenedResults()
Returns:
results of widget

getHasResults

public abstract boolean getHasResults()
Returns:
the hasResults

getElementInList

public abstract java.util.List<java.lang.String> getElementInList()
checks if elem is in bag

Returns:
true if elem is in bag

getConfigId

public java.lang.String getConfigId()
Get the ID of the corresponding WidgetConfig

Returns:
the WidgetConfig ID

getTitle

public java.lang.String getTitle()
Get the widget title

Returns:
the title