Package org.intermine.web.logic.widget
Class TableWidget
- java.lang.Object
-
- org.intermine.web.logic.widget.Widget
-
- org.intermine.web.logic.widget.TableWidget
-
public class TableWidget extends Widget
A table widget gets the values for a given path for all the items in a list.- Author:
- "Xavier Watkins", Daniela Butano
-
-
Field Summary
-
Fields inherited from class org.intermine.web.logic.widget.Widget
bag, config, ids, notAnalysed, os, poplationCount
-
-
Constructor Summary
Constructors Constructor Description TableWidget(TableWidgetConfig config, InterMineBag interMineBag, ObjectStore os, java.lang.String ids)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List
getColumns()
Get the columnsjava.util.List<java.util.List<java.lang.String>>
getExportResults(java.lang.String[] selected)
java.util.List
getFlattenedResults()
Get the flattened resultsboolean
getHasResults()
PathQuery
getPathQuery()
Return the PathQuery generated dynamically by the attribute views in the configuration filejava.util.List<java.util.List<java.lang.Object>>
getResults()
Return the result that represents the data from this widget.void
process()
Process the data and create the widget-
Methods inherited from class org.intermine.web.logic.widget.Widget
createPathQueryView, getConfigId, getNotAnalysed, getPopulationCount, getTitle, setNotAnalysed, setPopulationCount
-
-
-
-
Constructor Detail
-
TableWidget
public TableWidget(TableWidgetConfig config, InterMineBag interMineBag, ObjectStore os, java.lang.String ids)
- Parameters:
config
- configuration for this widgetinterMineBag
- bag for this widgetids
- intermine IDs, required if bag is NULLos
- objecstore
-
-
Method Detail
-
process
public void process()
Process the data and create the widget
-
getFlattenedResults
public java.util.List getFlattenedResults()
Get the flattened results- Returns:
- the List of flattened results
-
getExportResults
public java.util.List<java.util.List<java.lang.String>> getExportResults(java.lang.String[] selected) throws java.lang.Exception
- Specified by:
getExportResults
in classWidget
- 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.
-
getHasResults
public boolean getHasResults()
- Specified by:
getHasResults
in classWidget
- Returns:
- the hasResults
-
getColumns
public java.util.List getColumns()
Get the columns- Returns:
- the columns
-
getResults
public java.util.List<java.util.List<java.lang.Object>> getResults()
Description copied from class:Widget
Return the result that represents the data from this widget. Each row is represented as a list of Object- Specified by:
getResults
in classWidget
- Returns:
- a list representing the rows containing a list of objects
-
getPathQuery
public PathQuery getPathQuery()
Description copied from class:Widget
Return the PathQuery generated dynamically by the attribute views in the configuration file- Specified by:
getPathQuery
in classWidget
- Returns:
- the pathquery
-
-