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: 2019-03-20 14:31:03 +0100 (ons, 20 mars 2019) $
-
-
Field Summary
Fields Modifier and Type Field Description private String
id
private int
valueIndex
-
Constructor Summary
Constructors Constructor Description ExtraFloatParser(String id, int valueIndex)
Creates a new extra value parser.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getId()
Get the external id of the extra value type.float
getValue(FlatFileParser.Data data, int firstIndex)
Get the extra value from the data.
-
-
-
Field Detail
-
id
private final String id
-
valueIndex
private final int valueIndex
-
-
Constructor Detail
-
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
-
-
Method Detail
-
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)
-
-