Package de.isas.mztab2.io.validators
Interface FieldValidator<T>
-
- Type Parameters:
T- the type of the parsed object to validate.
- All Known Implementing Classes:
SpectraRefValidator
public interface FieldValidator<T>
Implementations of the field validator are applied to the type object (usually a parsed string element) during the parsing process. The validator can access the current parsing context for state-dependent validation and receives the current column specification for type specific checking.- Author:
- nilshoffmann
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default List<MZTabError>validateLine(int lineNumber, MZTabParserContext parserContext, IMZTabColumn column, String field, T t)Validate the given object of type T, using the provided parser context and column to check the state of not yet completely parsed and constructed mzTab hierarchy.
-
-
-
Method Detail
-
validateLine
default List<MZTabError> validateLine(int lineNumber, MZTabParserContext parserContext, IMZTabColumn column, String field, T t)
Validate the given object of type T, using the provided parser context and column to check the state of not yet completely parsed and constructed mzTab hierarchy.- Parameters:
lineNumber- the current line number being parsed. Maybe -1 to indicate no active lineNumber, e.g. for post-hoc refine validation.parserContext- the parser contextcolumn- the IMzTabColumn to use for type validation constraintsfield- the string representation of the fieldt- the object to validate- Returns:
- a list of
MZTabError, maybe empty.
-
-