Class 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
    • Constructor Detail

      • TableWidget

        public TableWidget​(TableWidgetConfig config,
                           InterMineBag interMineBag,
                           ObjectStore os,
                           java.lang.String ids)
        Parameters:
        config - configuration for this widget
        interMineBag - bag for this widget
        ids - intermine IDs, required if bag is NULL
        os - objecstore
    • Method Detail

      • process

        public void process()
        Process the data and create the widget
        Specified by:
        process in class 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 class Widget
        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 class Widget
        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 class Widget
        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 class Widget
        Returns:
        the pathquery