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 throwMZTabExceptiondirectly.- Since:
- 10/02/13
- Author:
- qingwei
- See Also:
MZTabHeaderLineParser,MZTabDataLineParser,MTDLineParser
-
-
Field Summary
Fields Modifier and Type Field Description protected MZTabParserContextcontextprotected MZTabErrorListerrorListprotected String[]itemsbased on TAB char to split raw line into String array.protected Stringlineprotected intlineNumberprotected Sectionsection
-
Constructor Summary
Constructors Modifier Constructor Description protectedMZTabLineParser(MZTabParserContext context)Constructor for MZTabLineParser.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidparse(int lineNumber, String line, 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 MZTabErrorList errorList
-
-
Constructor Detail
-
MZTabLineParser
protected MZTabLineParser(MZTabParserContext context)
Constructor for MZTabLineParser.
- Parameters:
context- aMZTabParserContextobject.
-
-
Method Detail
-
parse
protected void parse(int lineNumber, String line, MZTabErrorList errorList) throws 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- aStringobject.errorList- aMZTabErrorListobject.- Throws:
MZTabException- if any.
-
-