2183 |
24 Apr 06 |
nicklas |
1 |
/* |
2183 |
24 Apr 06 |
nicklas |
$Id$ |
2183 |
24 Apr 06 |
nicklas |
3 |
|
4889 |
06 Apr 09 |
nicklas |
Copyright (C) 2006 Jari Häkkinen, Nicklas Nordborg, Martin Svensson |
2183 |
24 Apr 06 |
nicklas |
5 |
|
2304 |
22 May 06 |
jari |
This file is part of BASE - BioArray Software Environment. |
2304 |
22 May 06 |
jari |
Available at http://base.thep.lu.se/ |
2183 |
24 Apr 06 |
nicklas |
8 |
|
2183 |
24 Apr 06 |
nicklas |
BASE is free software; you can redistribute it and/or |
2183 |
24 Apr 06 |
nicklas |
modify it under the terms of the GNU General Public License |
4479 |
05 Sep 08 |
jari |
as published by the Free Software Foundation; either version 3 |
2183 |
24 Apr 06 |
nicklas |
of the License, or (at your option) any later version. |
2183 |
24 Apr 06 |
nicklas |
13 |
|
2183 |
24 Apr 06 |
nicklas |
BASE is distributed in the hope that it will be useful, |
2183 |
24 Apr 06 |
nicklas |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
2183 |
24 Apr 06 |
nicklas |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2183 |
24 Apr 06 |
nicklas |
GNU General Public License for more details. |
2183 |
24 Apr 06 |
nicklas |
18 |
|
2183 |
24 Apr 06 |
nicklas |
You should have received a copy of the GNU General Public License |
4515 |
11 Sep 08 |
jari |
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 |
This interface is used together with the <code>BioAssaySetFilterUtil</code> |
2183 |
24 Apr 06 |
nicklas |
class to help a plugin filter the data of a bioassay set. A plugin |
2183 |
24 Apr 06 |
nicklas |
must supply an implementation of this interface to be able to use the |
2981 |
30 Nov 06 |
nicklas |
{@link BioAssaySetFilterUtil#createFilteredBioAssaySet(DbControl, BioAssaySet, |
2981 |
30 Nov 06 |
nicklas |
List, Job, DynamicFilter, ProgressReporter)} |
2183 |
24 Apr 06 |
nicklas |
method. |
2183 |
24 Apr 06 |
nicklas |
41 |
|
2183 |
24 Apr 06 |
nicklas |
@author Nicklas |
2183 |
24 Apr 06 |
nicklas |
@version 2.0 |
2183 |
24 Apr 06 |
nicklas |
@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 |
Configure the query before it is used. This includes selecting any |
2183 |
24 Apr 06 |
nicklas |
columns that is needed by the {@link #includeSpot(SqlResult)} method |
2222 |
09 May 06 |
nicklas |
later and joining related tables (ie. raw data, reporter) that is needed |
2222 |
09 May 06 |
nicklas |
by the filter. |
2183 |
24 Apr 06 |
nicklas |
@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 |
If the <code>includeSpot</code> method must be called for each spot or not. |
2222 |
09 May 06 |
nicklas |
If FALSE is returned, all rows that are returned by the query are included in |
2222 |
09 May 06 |
nicklas |
the filtered bioassay set. |
2222 |
09 May 06 |
nicklas |
61 |
|
2222 |
09 May 06 |
nicklas |
@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 |
Check if a spot should be included in the filtered output or not. |
2183 |
24 Apr 06 |
nicklas |
68 |
|
2183 |
24 Apr 06 |
nicklas |
@param data The current data row to check |
2183 |
24 Apr 06 |
nicklas |
@return TRUE if the spot passed the filter, FALSE otherwise |
4017 |
28 Nov 07 |
martin |
@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 |
} |