Class SMHLineParser
- java.lang.Object
-
- uk.ac.ebi.pride.jmztab2.utils.parser.MZTabLineParser
-
- uk.ac.ebi.pride.jmztab2.utils.parser.MZTabHeaderLineParser
-
- uk.ac.ebi.pride.jmztab2.utils.parser.SMHLineParser
-
public class SMHLineParser extends MZTabHeaderLineParser
Parse and validate Small Molecule header line into aMZTabColumnFactory
.- Since:
- 10/02/13
- Author:
- qingwei, ntoro, nilshoffmann
-
-
Field Summary
-
Fields inherited from class uk.ac.ebi.pride.jmztab2.utils.parser.MZTabHeaderLineParser
factory, metadata
-
Fields inherited from class uk.ac.ebi.pride.jmztab2.utils.parser.MZTabLineParser
context, errorList, items, line, lineNumber, section
-
-
Constructor Summary
Constructors Constructor Description SMHLineParser(MZTabParserContext context, de.isas.mztab2.model.Metadata metadata)
Constructor for SMHLineParser.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
parseColumns()
This methods delegates to the subclasses the parsing of the columns.protected void
refine()
Some validate operation need to be done after the wholeMZTabColumnFactory
created.-
Methods inherited from class uk.ac.ebi.pride.jmztab2.utils.parser.MZTabHeaderLineParser
checkAbundanceColumns, checkOptColumnName, fromIndexToOrder, getFactory, parse, parseIndex, refineOptionalColumn
-
-
-
-
Constructor Detail
-
SMHLineParser
public SMHLineParser(MZTabParserContext context, de.isas.mztab2.model.Metadata metadata)
Constructor for SMHLineParser.
- Parameters:
context
- aMZTabParserContext
object.metadata
- aMetadata
object.
-
-
Method Detail
-
parseColumns
protected int parseColumns() throws uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
This methods delegates to the subclasses the parsing of the columns. All of the columns are defined inSmallMoleculeColumn
,SmallMoleculeFeatureColumn
, orSmallMoleculeEvidenceColumn
.- Specified by:
parseColumns
in classMZTabHeaderLineParser
- Returns:
- the next physical index of column available after the parsing.
- Throws:
uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
- if any structural or logical errors are encountered that prohibit further processing.
-
refine
protected void refine() throws uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
Some validate operation need to be done after the wholeMZTabColumnFactory
created. Thus, user can add them, and called at the end of theMZTabHeaderLineParser.parse(int, String, MZTabErrorList)
method. The following optional columns are mandatory: 1. abundance_assay[1-n] 2. abundance_study_variable[1-m] 3. abundance_variation_study_variable[1-m] NOTICE: this method will be called at end of parse() function.- Specified by:
refine
in classMZTabHeaderLineParser
- Throws:
uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
- if any structural or logical errors are encountered that prohibit further processing.- See Also:
MZTabHeaderLineParser.parse(int, String, MZTabErrorList)
,MZTabHeaderLineParser.parse(int, String, MZTabErrorList)
-
-