Class MzTabFileParser


  • public class MzTabFileParser
    extends Object
    MZTabFileParser provides reading functionality of the mzTab file. During the parsing process, minimal integrity checks are preformed.
    Since:
    21/02/13
    Author:
    qingwei, nilshoffmann
    • Constructor Summary

      Constructors 
      Constructor Description
      MzTabFileParser​(File tabFile)
      Create a new MZTabFileParser for the given file.
      MzTabFileParser​(URI tabFileUri)
      Create a new MZTabFileParser for the given file URI.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void checkColunitMapping​(MZTabColumnFactory columnFactory, Optional<Collection<de.isas.mztab2.model.ColumnParameterMapping>> columnParameterMapping, de.isas.mztab2.model.Metadata.Properties colUnitProperty, de.isas.mztab2.model.MzTab.Properties mzTabSection)  
      uk.ac.ebi.pride.jmztab2.utils.errors.MZTabErrorList getErrorList()
      Getter for the field errorList.
      de.isas.mztab2.model.MzTab getMZTabFile()
      getMZTabFile.
      uk.ac.ebi.pride.jmztab2.utils.errors.MZTabErrorList parse​(OutputStream out)
      Create a new MZTabParserContext and MZTabErrorList for the given file URI.
      uk.ac.ebi.pride.jmztab2.utils.errors.MZTabErrorList parse​(OutputStream out, uk.ac.ebi.pride.jmztab2.utils.errors.MZTabErrorType.Level level)
      Create a new MZTabParserContext and MZTabErrorList for the given file URI.
      uk.ac.ebi.pride.jmztab2.utils.errors.MZTabErrorList parse​(OutputStream out, uk.ac.ebi.pride.jmztab2.utils.errors.MZTabErrorType.Level level, int maxErrorCount)
      Create a new MZTabParserContext and MZTabErrorList for the given file URI.
    • Method Detail

      • parse

        public uk.ac.ebi.pride.jmztab2.utils.errors.MZTabErrorList parse​(OutputStream out,
                                                                         uk.ac.ebi.pride.jmztab2.utils.errors.MZTabErrorType.Level level,
                                                                         int maxErrorCount)
                                                                  throws IOException
        Create a new MZTabParserContext and MZTabErrorList for the given file URI. Parsing output and errors are written to the provided OutputStream.
        Parameters:
        out - the output stream for parsing messages
        level - the minimum error level to report errors for
        maxErrorCount - the maximum number of errors to report in the MZTabErrorList return by getErrorList()
        Returns:
        the error list
        Throws:
        IOException - if any io related errors occur.
      • parse

        public uk.ac.ebi.pride.jmztab2.utils.errors.MZTabErrorList parse​(OutputStream out,
                                                                         uk.ac.ebi.pride.jmztab2.utils.errors.MZTabErrorType.Level level)
                                                                  throws IOException
        Create a new MZTabParserContext and MZTabErrorList for the given file URI. Parsing output and errors are written to the provided OutputStream. Reports up to MZTabProperties.MAX_ERROR_COUNT errors.
        Parameters:
        out - the output stream for parsing messages
        level - the minimum error level to report errors for
        Returns:
        the error list
        Throws:
        IOException - if any io related errors occur.
      • parse

        public uk.ac.ebi.pride.jmztab2.utils.errors.MZTabErrorList parse​(OutputStream out)
                                                                  throws IOException
        Create a new MZTabParserContext and MZTabErrorList for the given file URI. Parsing output and errors are written to the provided OutputStream. Reports up to MZTabProperties.MAX_ERROR_COUNT errors on level MZTabProperties.LEVEL.
        Parameters:
        out - the output stream for parsing messages
        Returns:
        the error list
        Throws:
        IOException - if any io related errors occur.
      • getErrorList

        public uk.ac.ebi.pride.jmztab2.utils.errors.MZTabErrorList getErrorList()

        Getter for the field errorList.

        Returns:
        a MZTabErrorList object.
      • checkColunitMapping

        protected void checkColunitMapping​(MZTabColumnFactory columnFactory,
                                           Optional<Collection<de.isas.mztab2.model.ColumnParameterMapping>> columnParameterMapping,
                                           de.isas.mztab2.model.Metadata.Properties colUnitProperty,
                                           de.isas.mztab2.model.MzTab.Properties mzTabSection)
      • getMZTabFile

        public de.isas.mztab2.model.MzTab getMZTabFile()

        getMZTabFile.

        Returns:
        a MzTab object.