Class MZTabError
- java.lang.Object
-
- uk.ac.ebi.pride.jmztab2.utils.errors.MZTabError
-
- All Implemented Interfaces:
Serializable
public class MZTabError extends Object implements Serializable
mzTab files can be validated to ensure that they comply with the latest version of the format specification. The process includes two steps: first of all the basic model architecture is created, including the metadata section and the generation of the table column headers. The second step is the validation of the column rows, which take most of the processing time. The class MZTabFileParser is used to parse and validate the mzTab files. If the validation is successful, an MZTabFile model will be then generated. A series of messages are then reported, which can help to diagnose different types of format-related (reporting format problems) and/or logical (reporting errors related to the logical relationships among the different sections in a file) errors. At the moment of writing, there are about sixty types of error messages (http://mztab.googlecode.com/wiki/jmzTab_message). The validation messages have a unique identifier and are classified in three levels: Info, Warn and Error, according to the requirements included in the specification document.- Since:
- 06/02/13
- Author:
- qingwei
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MZTabError(MZTabErrorType type, int lineNumber, String... values)
System will fill a couple of values one by one, and generate a concrete error message during parselineNumber
line in mzTab file.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getLineNumber()
Getter for the fieldlineNumber
.String
getMessage()
Getter for the fieldmessage
.MZTabErrorType
getType()
Getter for the fieldtype
.String
toString()
Code: Unique number for error/warn Category: Currently, there are three types of messages: Format, Logical Original: Message expression pattern. "{?}"ValidationMessage
toValidationMessage()
-
-
-
Constructor Detail
-
MZTabError
public MZTabError(MZTabErrorType type, int lineNumber, String... values)
System will fill a couple of values one by one, and generate a concrete error message during parselineNumber
line in mzTab file.- Parameters:
type
- SHOULD NOT null.lineNumber
- SHOULD be positive integer. Except "-1", which means the line number unknown.values
- May be null, if no variable in error's original pattern.
-
-
Method Detail
-
getType
public MZTabErrorType getType()
Getter for the field
type
.- Returns:
MZTabErrorType
- See Also:
FormatErrorType
,LogicalErrorType
-
getMessage
public String getMessage()
Getter for the field
message
.- Returns:
- a concrete error/warn message.
-
getLineNumber
public int getLineNumber()
Getter for the field
lineNumber
.- Returns:
- the line number.
-
toString
public String toString()
Code: Unique number for error/warn Category: Currently, there are three types of messages: Format, Logical Original: Message expression pattern. "{?}" is a couple of parameters which can be filled during validate processing. Cause: A readable text to describe the reason why raise this error/warn. Currently, these cause message coming from mztab specification mainly.
-
toValidationMessage
public ValidationMessage toValidationMessage() throws IllegalStateException
- Throws:
IllegalStateException
-
-