src/core/net/sf/basedb/util/export/spotdata/DynamicField.java

Code
Comments
Other
Rev Date Author Line
4925 08 May 09 nicklas 1 /**
4925 08 May 09 nicklas 2   $Id$
4925 08 May 09 nicklas 3
4925 08 May 09 nicklas 4   Copyright (C) 2009 Nicklas Nordborg
4925 08 May 09 nicklas 5
4925 08 May 09 nicklas 6   This file is part of BASE - BioArray Software Environment.
4925 08 May 09 nicklas 7   Available at http://base.thep.lu.se/
4925 08 May 09 nicklas 8
4925 08 May 09 nicklas 9   BASE is free software; you can redistribute it and/or
4925 08 May 09 nicklas 10   modify it under the terms of the GNU General Public License
4925 08 May 09 nicklas 11   as published by the Free Software Foundation; either version 3
4925 08 May 09 nicklas 12   of the License, or (at your option) any later version.
4925 08 May 09 nicklas 13
4925 08 May 09 nicklas 14   BASE is distributed in the hope that it will be useful,
4925 08 May 09 nicklas 15   but WITHOUT ANY WARRANTY; without even the implied warranty of
4925 08 May 09 nicklas 16   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4925 08 May 09 nicklas 17   GNU General Public License for more details.
4925 08 May 09 nicklas 18
4925 08 May 09 nicklas 19   You should have received a copy of the GNU General Public License
4925 08 May 09 nicklas 20   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 31   Represents a spot or reporter field that is going to be exported
4925 08 May 09 nicklas 32   from a bioassay set. An implementation needs to provide the following
4925 08 May 09 nicklas 33   information and services:
4925 08 May 09 nicklas 34   <ul>
4925 08 May 09 nicklas 35   <li>An {@link Expression} that is added to the selection list of a
4925 08 May 09 nicklas 36     {@link DynamicQuery}.
4925 08 May 09 nicklas 37   <li>A {@link Formatter} that is used to format the values that are
4925 08 May 09 nicklas 38     selected by the expression before they are written to the file
4925 08 May 09 nicklas 39   <li>A title that is used as a column header for the data
4925 08 May 09 nicklas 40   </ul>
4925 08 May 09 nicklas 41
4925 08 May 09 nicklas 42   @author Nicklas
4925 08 May 09 nicklas 43   @version 2.12
4925 08 May 09 nicklas 44   @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 50     Get an expression that selects the data that should be exported.
4925 08 May 09 nicklas 51     
4925 08 May 09 nicklas 52     @param dc The DbControl that is used for database access
5319 20 Apr 10 nicklas 53     @param query The query the expression will be used with
4925 08 May 09 nicklas 54     @param source The source bioassay set
4925 08 May 09 nicklas 55     @param forAverage TRUE if the expression should generate an
4925 08 May 09 nicklas 56       average of multiple values
4925 08 May 09 nicklas 57     @return An expression, or null if it is not possible to create an
4925 08 May 09 nicklas 58       expression in the given case (this will normally be replaced with 
4925 08 May 09 nicklas 59       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 }