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 Detail

      • validateLine

        default List<MZTabErrorvalidateLine​(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 context
        column - the IMzTabColumn to use for type validation constraints
        field - the string representation of the field
        t - the object to validate
        Returns:
        a list of MZTabError, maybe empty.