Class MZTabLineParser
- java.lang.Object
-
- uk.ac.ebi.pride.jmztab2.utils.parser.MZTabLineParser
-
- Direct Known Subclasses:
COMLineParser
,MTDLineParser
,MZTabDataLineParser
,MZTabHeaderLineParser
public class MZTabLineParser extends Object
Common tab split line parser. If there exists format or logical errors during the parse process, system will add them intoMZTabErrorList
, or break validate and throwMZTabException
directly.- Since:
- 10/02/13
- Author:
- qingwei
- See Also:
MZTabHeaderLineParser
,MZTabDataLineParser
,MTDLineParser
-
-
Field Summary
Fields Modifier and Type Field Description protected MZTabParserContext
context
protected uk.ac.ebi.pride.jmztab2.utils.errors.MZTabErrorList
errorList
protected String[]
items
based on TAB char to split raw line into String array.protected String
line
protected int
lineNumber
protected Section
section
-
Constructor Summary
Constructors Modifier Constructor Description protected
MZTabLineParser(MZTabParserContext context)
Constructor for MZTabLineParser.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
parse(int lineNumber, String line, uk.ac.ebi.pride.jmztab2.utils.errors.MZTabErrorList errorList)
We assume that user before call this method, have parse the raw line is not empty line and start with section prefix.
-
-
-
Field Detail
-
lineNumber
protected int lineNumber
-
context
protected final MZTabParserContext context
-
errorList
protected uk.ac.ebi.pride.jmztab2.utils.errors.MZTabErrorList errorList
-
-
Constructor Detail
-
MZTabLineParser
protected MZTabLineParser(MZTabParserContext context)
Constructor for MZTabLineParser.
- Parameters:
context
- aMZTabParserContext
object.
-
-
Method Detail
-
parse
protected void parse(int lineNumber, String line, uk.ac.ebi.pride.jmztab2.utils.errors.MZTabErrorList errorList) throws uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
We assume that user before call this method, have parse the raw line is not empty line and start with section prefix.- Parameters:
lineNumber
- a int.line
- aString
object.errorList
- aMZTabErrorList
object.- Throws:
uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
- if any.
-
-