src/core/net/sf/basedb/util/DynamicFilter.java

Code
Comments
Other
Rev Date Author Line
2183 24 Apr 06 nicklas 1 /*
2183 24 Apr 06 nicklas 2   $Id$
2183 24 Apr 06 nicklas 3
4889 06 Apr 09 nicklas 4   Copyright (C) 2006 Jari Häkkinen, Nicklas Nordborg, Martin Svensson
2183 24 Apr 06 nicklas 5   
2304 22 May 06 jari 6   This file is part of BASE - BioArray Software Environment.
2304 22 May 06 jari 7   Available at http://base.thep.lu.se/
2183 24 Apr 06 nicklas 8
2183 24 Apr 06 nicklas 9   BASE is free software; you can redistribute it and/or
2183 24 Apr 06 nicklas 10   modify it under the terms of the GNU General Public License
4479 05 Sep 08 jari 11   as published by the Free Software Foundation; either version 3
2183 24 Apr 06 nicklas 12   of the License, or (at your option) any later version.
2183 24 Apr 06 nicklas 13
2183 24 Apr 06 nicklas 14   BASE is distributed in the hope that it will be useful,
2183 24 Apr 06 nicklas 15   but WITHOUT ANY WARRANTY; without even the implied warranty of
2183 24 Apr 06 nicklas 16   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2183 24 Apr 06 nicklas 17   GNU General Public License for more details.
2183 24 Apr 06 nicklas 18
2183 24 Apr 06 nicklas 19   You should have received a copy of the GNU General Public License
4515 11 Sep 08 jari 20   along with BASE. If not, see <http://www.gnu.org/licenses/>.
2183 24 Apr 06 nicklas 21 */
2183 24 Apr 06 nicklas 22 package net.sf.basedb.util;
2183 24 Apr 06 nicklas 23
2601 29 Aug 06 martin 24 import net.sf.basedb.core.BioAssaySet;
2601 29 Aug 06 martin 25 import net.sf.basedb.core.DbControl;
2601 29 Aug 06 martin 26 import net.sf.basedb.core.Job;
2601 29 Aug 06 martin 27 import net.sf.basedb.core.ProgressReporter;
2183 24 Apr 06 nicklas 28 import net.sf.basedb.core.query.SqlQuery;
2183 24 Apr 06 nicklas 29 import net.sf.basedb.core.query.SqlResult;
2183 24 Apr 06 nicklas 30
2183 24 Apr 06 nicklas 31 import java.sql.SQLException;
2981 30 Nov 06 nicklas 32 import java.util.List;
2183 24 Apr 06 nicklas 33
2183 24 Apr 06 nicklas 34 /**
2183 24 Apr 06 nicklas 35   This interface is used together with the <code>BioAssaySetFilterUtil</code>
2183 24 Apr 06 nicklas 36   class to help a plugin filter the data of a bioassay set. A plugin
2183 24 Apr 06 nicklas 37   must supply an implementation of this interface to be able to use the
2981 30 Nov 06 nicklas 38   {@link BioAssaySetFilterUtil#createFilteredBioAssaySet(DbControl, BioAssaySet, 
2981 30 Nov 06 nicklas 39   List, Job, DynamicFilter, ProgressReporter)}
2183 24 Apr 06 nicklas 40   method.
2183 24 Apr 06 nicklas 41   
2183 24 Apr 06 nicklas 42   @author Nicklas
2183 24 Apr 06 nicklas 43   @version 2.0
2183 24 Apr 06 nicklas 44   @base.modified $Date$
2183 24 Apr 06 nicklas 45 */
2183 24 Apr 06 nicklas 46 public interface DynamicFilter
2183 24 Apr 06 nicklas 47 {
2183 24 Apr 06 nicklas 48   /**
2183 24 Apr 06 nicklas 49     Configure the query before it is used. This includes selecting any
2183 24 Apr 06 nicklas 50     columns that is needed by the {@link #includeSpot(SqlResult)} method
2222 09 May 06 nicklas 51     later and joining related tables (ie. raw data, reporter) that is needed
2222 09 May 06 nicklas 52     by the filter.
2183 24 Apr 06 nicklas 53     @param query The query to configure
2183 24 Apr 06 nicklas 54   */
2183 24 Apr 06 nicklas 55   public void configureQuery(SqlQuery query);
2183 24 Apr 06 nicklas 56   
2183 24 Apr 06 nicklas 57   /**
2222 09 May 06 nicklas 58     If the <code>includeSpot</code> method must be called for each spot or not.
2222 09 May 06 nicklas 59     If FALSE is returned, all rows that are returned by the query are included in 
2222 09 May 06 nicklas 60     the filtered bioassay set.
2222 09 May 06 nicklas 61     
2222 09 May 06 nicklas 62     @return TRUE or FALSE
2222 09 May 06 nicklas 63    */
2222 09 May 06 nicklas 64   public boolean useIncludeSpot();
2222 09 May 06 nicklas 65   
2222 09 May 06 nicklas 66   /**
2183 24 Apr 06 nicklas 67     Check if a spot should be included in the filtered output or not.
2183 24 Apr 06 nicklas 68     
2183 24 Apr 06 nicklas 69     @param data The current data row to check
2183 24 Apr 06 nicklas 70     @return TRUE if the spot passed the filter, FALSE otherwise
4017 28 Nov 07 martin 71     @throws SQLException If running SQL statement fails.
2183 24 Apr 06 nicklas 72   */
2183 24 Apr 06 nicklas 73   public boolean includeSpot(SqlResult data)
2183 24 Apr 06 nicklas 74     throws SQLException;
2183 24 Apr 06 nicklas 75 }