Class ExtraFloatParser
java.lang.Object
net.sf.basedb.util.importer.spotdata.ExtraFloatParser
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
-
Constructor Summary
ConstructorDescriptionExtraFloatParser
(String id, int valueIndex) Creates a new extra value parser. -
Method Summary
Modifier and TypeMethodDescriptiongetId()
Get the external id of the extra value type.float
getValue
(FlatFileParser.Data data, int firstIndex) Get the extra value from the data.
-
Field Details
-
id
-
valueIndex
private final int valueIndex
-
-
Constructor Details
-
ExtraFloatParser
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 Details
-
getId
Get the external id of the extra value type. -
getValue
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)
-