net.sf.basedb.util.importer.spotdata
Class ExtraFloatParser
java.lang.Object
net.sf.basedb.util.importer.spotdata.ExtraFloatParser
public class ExtraFloatParser
- extends Object
Parser that is responsible for extracting extra float values
from the 'spot' section in a BASEfile. Extra value parsers
are created in the first pass and used in the second pass.
- Version:
- 2.14
- Author:
- Nicklas
- Last modified
- $Date: 2009-09-10 14:36:54 +0200 (Thu, 10 Sep 2009) $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
id
private final String id
valueIndex
private final int valueIndex
ExtraFloatParser
public ExtraFloatParser(String id,
int valueIndex)
- Creates a new extra value parser.
- Parameters:
id
- The external id of the extra value typevalueIndex
- The index of the extra value column
relative the first column of assay data
getId
public String getId()
- Get the external id of the extra value type.
getValue
public float getValue(FlatFileParser.Data data,
int firstIndex)
- Get the extra value from the data. If the section contains data for
multiple bioassays (eg. a matrix BASEfile) this method is called multiple
times (with different 'firstIndex' value) for each row.
- Parameters:
data
- The current data linefirstIndex
- The index of the first data column that contains data
for the current bioassay
- Returns:
- The extracted float value, or Float.NaN if the
value is invalid (results in not inserting it)