Package org.intermine.web.logic.widget
Class TableWidgetLdr
- java.lang.Object
-
- org.intermine.web.logic.widget.WidgetLdr
-
- org.intermine.web.logic.widget.TableWidgetLdr
-
public class TableWidgetLdr extends WidgetLdr
- Author:
- Xavier Watkins, Daniela Butano
-
-
Field Summary
-
Fields inherited from class org.intermine.web.logic.widget.WidgetLdr
bag, filter, ids, os, queryClassInQuery, startClass
-
-
Constructor Summary
Constructors Constructor Description TableWidgetLdr(WidgetConfig widgetConfig, InterMineBag bag, ObjectStore os, java.lang.String ids)
This class loads and formats the data for the count table widgets in the bag details page
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PathQuery
createPathQuery()
Returns the pathquery based on the views set in config file and the bag constraint Executed when the user selects any item in the matches column in the enrichment widget.java.util.List<java.lang.String>
getColumns()
Get the columnNamesjava.lang.String
getDescription()
Get the descriptionjava.util.List<java.util.List<java.lang.String>>
getExportResults(java.lang.String[] selected)
java.util.List<java.util.List<java.lang.Object>>
getFlattenedResults()
get the flattened resultsQuery
getQuery(boolean calcTotal, java.util.List<java.lang.String> keys)
java.lang.String
getTitle()
Get the titlejava.lang.String
getType()
int
getWidgetTotal()
protected java.lang.String
pathWithNoConstraints(java.lang.String path)
void
setFlattenedResults()
builds, runs query.-
Methods inherited from class org.intermine.web.logic.widget.WidgetLdr
addReference, buildQueryValue, createAttributePath, createQueryFieldByPath
-
-
-
-
Constructor Detail
-
TableWidgetLdr
public TableWidgetLdr(WidgetConfig widgetConfig, InterMineBag bag, ObjectStore os, java.lang.String ids) throws java.io.UnsupportedEncodingException
This class loads and formats the data for the count table widgets in the bag details page- Parameters:
widgetConfig
- the configuration settings for this widgetbag
- bag for this widgetos
- the objectstoreids
- intermine IDs, required if bag is NULL- Throws:
java.io.UnsupportedEncodingException
- if can't encode url
-
-
Method Detail
-
getType
public java.lang.String getType()
- Returns:
- the class name of the path this table widget loads.
-
setFlattenedResults
public void setFlattenedResults() throws java.io.UnsupportedEncodingException
builds, runs query. builds the results sets to be used to build widget- Throws:
java.io.UnsupportedEncodingException
- if url can't be encoded
-
getFlattenedResults
public java.util.List<java.util.List<java.lang.Object>> getFlattenedResults()
get the flattened results- Returns:
- the flattened results
-
getColumns
public java.util.List<java.lang.String> getColumns()
Get the columnNames- Returns:
- the columnNames
-
getTitle
public java.lang.String getTitle()
Get the title- Returns:
- the title
-
getDescription
public java.lang.String getDescription()
Get the description- Returns:
- the description
-
getQuery
public Query getQuery(boolean calcTotal, java.util.List<java.lang.String> keys)
- Parameters:
calcTotal
- if we are generating the query to calculate the widget totalskeys
- constraints to add to the query- Returns:
- query representing data related to a table widget
-
pathWithNoConstraints
protected java.lang.String pathWithNoConstraints(java.lang.String path)
- Parameters:
path
- the path to parse- Returns:
- a path with out any [] constraints
-
getWidgetTotal
public int getWidgetTotal()
- Returns:
- the total number of objects analysed in this widget
-
getExportResults
public java.util.List<java.util.List<java.lang.String>> getExportResults(java.lang.String[] selected) throws java.lang.Exception
- Parameters:
selected
- selected records to export- Returns:
- list of lists of records to export
- Throws:
java.lang.Exception
- if something goes horribly wrong
-
createPathQuery
public PathQuery createPathQuery()
Returns the pathquery based on the views set in config file and the bag constraint Executed when the user selects any item in the matches column in the enrichment widget.- Returns:
- the query generated
-
-