org.intermine.web.logic.widget
Class EnrichmentWidgetLdr

java.lang.Object
  extended by org.intermine.web.logic.widget.EnrichmentWidgetLdr

public class EnrichmentWidgetLdr
extends java.lang.Object

Prepares the data and queries for the enrichment widget controller to process.


Field Summary
protected  java.lang.String append
           
protected  InterMineBag bag
           
protected  java.lang.String externalLink
           
protected  java.util.Collection<java.lang.String> organisms
           
protected  java.util.Collection<java.lang.String> organismsLower
           
 
Constructor Summary
EnrichmentWidgetLdr()
           
 
Method Summary
 java.lang.String getAppendage()
          this was used for tiffin.
 Query getExportQuery(java.util.List<java.lang.String> keys)
           
 java.lang.String getExternalLink()
           
 java.util.Collection<java.lang.String> getPopulationDescr()
           
 Query getPopulationQuery(boolean calcTotal)
           
 Query getQuery(java.lang.String action, java.util.List<java.lang.String> keys)
          returns the relevant query.
 Query getSampleQuery(boolean calcTotal)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

externalLink

protected java.lang.String externalLink

append

protected java.lang.String append

bag

protected InterMineBag bag

organisms

protected java.util.Collection<java.lang.String> organisms

organismsLower

protected java.util.Collection<java.lang.String> organismsLower
Constructor Detail

EnrichmentWidgetLdr

public EnrichmentWidgetLdr()
Method Detail

getExternalLink

public java.lang.String getExternalLink()
Returns:
if the widget should have an external link, where it should go to

getAppendage

public java.lang.String getAppendage()
this was used for tiffin. obsolete?

Returns:
the string to append to the end of external link

getPopulationDescr

public java.util.Collection<java.lang.String> getPopulationDescr()
Returns:
description of reference population, ie "Accounting dept"

getQuery

public Query getQuery(java.lang.String action,
                      java.util.List<java.lang.String> keys)
returns the relevant query. this method is used for 6 widget queries. export query: select identifier and term where key = what the user selected on the widget analysed query: select object.id where object is used in query the results of this query are used as a NOT_IN constraint in a pathquery. the pathquery is run when the user clicks on the 'not analysed' number on the widget. population query: M = total annotated with this term in reference population annotated population query: N = total annotated with any term in reference population sample query: k = total annotated with this term in bag annotated sample query: n = total annotated with any term in bag (used to be bag.count)

Parameters:
keys - the keys of the records to be exported
action - which query to be built.
Returns:
query to return the correct result set for this widget

getSampleQuery

public Query getSampleQuery(boolean calcTotal)
Parameters:
calcTotal - whether or not to calculate the total number of annotated objects in the sample
Returns:
the query representing the sample population (the list)

getPopulationQuery

public Query getPopulationQuery(boolean calcTotal)
Parameters:
calcTotal - whether or not to calculate the total number of annotated objects in the database
Returns:
the query representing the entire population (all the items in the database)

getExportQuery

public Query getExportQuery(java.util.List<java.lang.String> keys)
Parameters:
keys - the keys to the records to be exported
Returns:
the query representing the records to be exported