MAEPlugin.analysis
Class FilterPlugin

java.lang.Object
  |
  +--MAEPlugin.MAEPlugin
        |
        +--MAEPlugin.CheckBoxMenuPlugin
              |
              +--MAEPlugin.analysis.AnalysisPlugin
                    |
                    +--MAEPlugin.analysis.FilterPlugin
All Implemented Interfaces:
java.util.EventListener, java.awt.event.ItemListener, PluginStub

public abstract class FilterPlugin
extends AnalysisPlugin

This class is the filter MAEPlugin base class and is be used to implement a filter base class:

Users must implement pluginInit() and geneOperation(). Users MAY overide resetPipeline() and finishPipeline().

Created on September 5, 2001, 6:13 PM, Jai Evans

This work was produced by Peter Lemkin of the National Cancer Institute, an agency of the United States Government. As a work of the United States Government there is no associated copyright. It is offered as open source software under the Mozilla Public License (version 1.1) subject to the limitations noted in the accompanying LEGAL file. This notice must be included with the code. The MAExplorer Mozilla and Legal files are available on http://maexplorer.sourceforge.net/.

Version:
$Date: 2003/03/03 16:22:07 $ / $Revision: 1.9 $
Author:
Jai Evans (DECA/CIT), C. Santos (DECA/CIT), P. Lemkin (NCI-FCRDC)
See Also:
MAExplorer Home

Field Summary
protected static java.util.Vector activeFilterPluginList
          pointer to the active FilterPlugin object.
 
Fields inherited from class MAEPlugin.MAEPlugin
DBUG_MAEP, jarResources, registryMaxSize
 
Fields inherited from interface MAEPlugin.PluginStub
PLUGIN_VERSION
 
Constructor Summary
FilterPlugin()
          FilterPlugin() - Constructor for new FilterPlugin called when load the plugin.
FilterPlugin(java.lang.String label)
          FilterPlugin() - Constructor for new FilterPlugin
 
Method Summary
 boolean finishPipeline(int optArg)
          finishPipeline() - finish filter at end of test of all genes (if required).
protected abstract  boolean geneOperation(int mid)
          geneOperation() - implemented by plugin writer.
static java.util.Vector getActiveFilterPluginList()
          getActiveFilterPluginList() - Bean-style method for getting activeFilterPluginList.
static boolean getFilterState()
          getFilterState() - Static method for using getActiveFilter().
 void pluginHalt()
          pluginHalt() - stop the plugin
abstract  void pluginInit()
          pluginInit() - Plugin init method.
 void pluginMain()
          pluginMain() is the method activated when end-users check a checkbox API.
 void removeActiveFilter(FilterPlugin o)
          removeActiveFilter() - Bean-style method for removing from activeFilterPluginList.
 boolean resetPipeline(int optArg)
          resetPipeline() - reset filter at start of test of all genes (if required).
 void setActiveFilter(FilterPlugin o)
          setActiveFilter() - Bean-style method for setting the activeFilterPluginList.
 int setOperation(int[] midList, int length)
          setOperation() - used in Filter intersection chain to process additional MAEPlugin filter tests.
 
Methods inherited from class MAEPlugin.CheckBoxMenuPlugin
getState, itemStateChanged, setState
 
Methods inherited from class MAEPlugin.MAEPlugin
getFlag, getInstance, getMAEStub, getMenuHook, getMenuInsertionPointName, getMenuItem, getNumberPlugins, getPluginDescription, getPluginFileName, getPluginName, getPlugins, menuActivated, removePlugin, setFlag, setJarResources, setMAEStub, setMenuHook, setMenuInsertionPointName, setMenuItem, setMenuLabel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

activeFilterPluginList

protected static java.util.Vector activeFilterPluginList
pointer to the active FilterPlugin object. Reference to this object allows data filter methods to find the active data filter.
Constructor Detail

FilterPlugin

public FilterPlugin()
FilterPlugin() - Constructor for new FilterPlugin called when load the plugin. This specifies the plugin name.

FilterPlugin

public FilterPlugin(java.lang.String label)
FilterPlugin() - Constructor for new FilterPlugin
Parameters:
label - is the overide name of the plugin
Method Detail

pluginMain

public final void pluginMain()
pluginMain() is the method activated when end-users check a checkbox API. This is unlike other plugins in that analysis will be done passively.
Overrides:
pluginMain in class CheckBoxMenuPlugin
See Also:
setActiveFilter(MAEPlugin.analysis.FilterPlugin), removeActiveFilter(MAEPlugin.analysis.FilterPlugin)

getFilterState

public static final boolean getFilterState()
getFilterState() - Static method for using getActiveFilter(). It is used in MaeJavaAPI
Returns:
state of data filter plugin. True if active.

getActiveFilterPluginList

public static final java.util.Vector getActiveFilterPluginList()
getActiveFilterPluginList() - Bean-style method for getting activeFilterPluginList.
Returns:
FilterPlugin instance

removeActiveFilter

public final void removeActiveFilter(FilterPlugin o)
removeActiveFilter() - Bean-style method for removing from activeFilterPluginList.

setActiveFilter

public final void setActiveFilter(FilterPlugin o)
setActiveFilter() - Bean-style method for setting the activeFilterPluginList.

setOperation

public int setOperation(int[] midList,
                        int length)
setOperation() - used in Filter intersection chain to process additional MAEPlugin filter tests. It is passed the MID list and then calls geneOperation() for each mid and then returns the mids that did pass the test in the same midList[].
 NOTE:
 (1)Override this method only if you need to compare different elements
    of the genelist simultaneously.
(2) Otherwise implement geneOperation() @see #geneOperation
Parameters:
midList - Master Gene ID list
Returns:
number of genes that did pass the test. Genes passing the first are in the first part of the midList[]; -1 means no genes past filter. If the state of the filter is off, then just return the original gene list.
See Also:
geneOperation(int)

resetPipeline

public boolean resetPipeline(int optArg)
resetPipeline() - reset filter at start of test of all genes (if required). This sets up the state that may be used during the pipeline operation.
Parameters:
optArg - - optional argument
Returns:
true if succeed

finishPipeline

public boolean finishPipeline(int optArg)
finishPipeline() - finish filter at end of test of all genes (if required). This cleans up the state that may be after the pipeline operation.
Parameters:
optArg - - optional argument
Returns:
true if succeed

geneOperation

protected abstract boolean geneOperation(int mid)
geneOperation() - implemented by plugin writer. NOTE: use MJAsmapleList, MJAGene and MJAGeneList to access data

pluginInit

public abstract void pluginInit()
pluginInit() - Plugin init method. Code to initialize the plugin data structures etc. at load time goes here.
Overrides:
pluginInit in class MAEPlugin

pluginHalt

public void pluginHalt()
pluginHalt() - stop the plugin
Overrides:
pluginHalt in class MAEPlugin