4925 |
08 May 09 |
nicklas |
1 |
/** |
4925 |
08 May 09 |
nicklas |
$Id$ |
4925 |
08 May 09 |
nicklas |
3 |
|
4925 |
08 May 09 |
nicklas |
Copyright (C) 2009 Nicklas Nordborg |
4925 |
08 May 09 |
nicklas |
5 |
|
4925 |
08 May 09 |
nicklas |
This file is part of BASE - BioArray Software Environment. |
4925 |
08 May 09 |
nicklas |
Available at http://base.thep.lu.se/ |
4925 |
08 May 09 |
nicklas |
8 |
|
4925 |
08 May 09 |
nicklas |
BASE is free software; you can redistribute it and/or |
4925 |
08 May 09 |
nicklas |
modify it under the terms of the GNU General Public License |
4925 |
08 May 09 |
nicklas |
as published by the Free Software Foundation; either version 3 |
4925 |
08 May 09 |
nicklas |
of the License, or (at your option) any later version. |
4925 |
08 May 09 |
nicklas |
13 |
|
4925 |
08 May 09 |
nicklas |
BASE is distributed in the hope that it will be useful, |
4925 |
08 May 09 |
nicklas |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
4925 |
08 May 09 |
nicklas |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4925 |
08 May 09 |
nicklas |
GNU General Public License for more details. |
4925 |
08 May 09 |
nicklas |
18 |
|
4925 |
08 May 09 |
nicklas |
You should have received a copy of the GNU General Public License |
4925 |
08 May 09 |
nicklas |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
4925 |
08 May 09 |
nicklas |
21 |
*/ |
4925 |
08 May 09 |
nicklas |
22 |
package net.sf.basedb.util.export.spotdata; |
4925 |
08 May 09 |
nicklas |
23 |
|
4925 |
08 May 09 |
nicklas |
24 |
import net.sf.basedb.core.BioAssaySet; |
4925 |
08 May 09 |
nicklas |
25 |
import net.sf.basedb.core.DbControl; |
4925 |
08 May 09 |
nicklas |
26 |
import net.sf.basedb.core.DynamicQuery; |
4925 |
08 May 09 |
nicklas |
27 |
import net.sf.basedb.core.query.Expression; |
4925 |
08 May 09 |
nicklas |
28 |
import net.sf.basedb.util.formatter.Formatter; |
4925 |
08 May 09 |
nicklas |
29 |
|
4925 |
08 May 09 |
nicklas |
30 |
/** |
4925 |
08 May 09 |
nicklas |
Represents a spot or reporter field that is going to be exported |
4925 |
08 May 09 |
nicklas |
from a bioassay set. An implementation needs to provide the following |
4925 |
08 May 09 |
nicklas |
information and services: |
4925 |
08 May 09 |
nicklas |
<ul> |
4925 |
08 May 09 |
nicklas |
<li>An {@link Expression} that is added to the selection list of a |
4925 |
08 May 09 |
nicklas |
{@link DynamicQuery}. |
4925 |
08 May 09 |
nicklas |
<li>A {@link Formatter} that is used to format the values that are |
4925 |
08 May 09 |
nicklas |
selected by the expression before they are written to the file |
4925 |
08 May 09 |
nicklas |
<li>A title that is used as a column header for the data |
4925 |
08 May 09 |
nicklas |
</ul> |
4925 |
08 May 09 |
nicklas |
41 |
|
4925 |
08 May 09 |
nicklas |
@author Nicklas |
4925 |
08 May 09 |
nicklas |
@version 2.12 |
4925 |
08 May 09 |
nicklas |
@base.modified $Date$ |
4925 |
08 May 09 |
nicklas |
45 |
*/ |
4925 |
08 May 09 |
nicklas |
46 |
public interface DynamicField |
4925 |
08 May 09 |
nicklas |
47 |
extends ExportableField |
4925 |
08 May 09 |
nicklas |
48 |
{ |
4925 |
08 May 09 |
nicklas |
49 |
/** |
4925 |
08 May 09 |
nicklas |
Get an expression that selects the data that should be exported. |
4925 |
08 May 09 |
nicklas |
51 |
|
4925 |
08 May 09 |
nicklas |
@param dc The DbControl that is used for database access |
5319 |
20 Apr 10 |
nicklas |
@param query The query the expression will be used with |
4925 |
08 May 09 |
nicklas |
@param source The source bioassay set |
4925 |
08 May 09 |
nicklas |
@param forAverage TRUE if the expression should generate an |
4925 |
08 May 09 |
nicklas |
average of multiple values |
4925 |
08 May 09 |
nicklas |
@return An expression, or null if it is not possible to create an |
4925 |
08 May 09 |
nicklas |
expression in the given case (this will normally be replaced with |
4925 |
08 May 09 |
nicklas |
an empty column in the output) |
4925 |
08 May 09 |
nicklas |
60 |
*/ |
5319 |
20 Apr 10 |
nicklas |
61 |
public Expression getExpression(DbControl dc, DynamicQuery query, BioAssaySet source, boolean forAverage); |
4925 |
08 May 09 |
nicklas |
62 |
|
4925 |
08 May 09 |
nicklas |
63 |
} |