Class MTDLineParser

    • Method Detail

      • parse

        public void parse​(int lineNumber,
                          String mtdLine,
                          uk.ac.ebi.pride.jmztab2.utils.errors.MZTabErrorList errorList)
                   throws uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
        We assume that user before call this method, have parse the raw line is not empty line and start with section prefix. Most of e, we use parseNormalMetadata(String, String) to parse defineLabel into Metadata Element.
        Overrides:
        parse in class MZTabLineParser
        Parameters:
        lineNumber - a int.
        mtdLine - a String object.
        errorList - a MZTabErrorList object.
        Throws:
        uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException - if any.
      • handleIdConfidenceMeasure

        protected void handleIdConfidenceMeasure​(String defineLabel,
                                                 Matcher matcher,
                                                 String valueLabel)
                                          throws uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
        Throws:
        uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
      • handleColunit

        protected void handleColunit​(String defineLabel,
                                     String valueLabel)
                              throws uk.ac.ebi.pride.jmztab2.utils.errors.MZTabErrorOverflowException
        Throws:
        uk.ac.ebi.pride.jmztab2.utils.errors.MZTabErrorOverflowException
      • handleDatabase

        protected void handleDatabase​(String defineLabel,
                                      Matcher matcher,
                                      MetadataElement element,
                                      String valueLabel)
                               throws uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
        Throws:
        uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
      • handleCv

        protected void handleCv​(String defineLabel,
                                Matcher matcher,
                                MetadataElement element,
                                String valueLabel)
                         throws uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
        Throws:
        uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
      • handleStudyVariable

        protected void handleStudyVariable​(String defineLabel,
                                           Matcher matcher,
                                           MetadataElement element,
                                           String valueLabel)
                                    throws uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException,
                                           uk.ac.ebi.pride.jmztab2.utils.errors.MZTabErrorOverflowException
        Throws:
        uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
        uk.ac.ebi.pride.jmztab2.utils.errors.MZTabErrorOverflowException
      • handleAssay

        protected void handleAssay​(Matcher matcher,
                                   String defineLabel,
                                   MetadataElement element,
                                   String valueLabel)
                            throws uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
        Throws:
        uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
      • handleSample

        protected void handleSample​(String defineLabel,
                                    Matcher matcher,
                                    MetadataElement element,
                                    String valueLabel)
                             throws uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
        Throws:
        uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
      • handleCustom

        protected void handleCustom​(String defineLabel,
                                    Matcher matcher,
                                    String valueLabel)
                             throws uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
        Throws:
        uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
      • handleDerivatizationAgent

        protected void handleDerivatizationAgent​(String defineLabel,
                                                 Matcher matcher,
                                                 String valueLabel)
                                          throws uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
        Throws:
        uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
      • handleMsRun

        protected void handleMsRun​(String defineLabel,
                                   Matcher matcher,
                                   MetadataElement element,
                                   String valueLabel)
                            throws uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
        Throws:
        uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
      • handleSmallMolecule

        protected void handleSmallMolecule​(MetadataElement element,
                                           Matcher matcher,
                                           String defineLabel,
                                           String valueLabel)
                                    throws uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
        Throws:
        uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
      • handleQuantificationMethod

        protected void handleQuantificationMethod​(String defineLabel,
                                                  String valueLabel)
                                           throws uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
        Throws:
        uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
      • handleExternalStudyUri

        protected void handleExternalStudyUri​(String defineLabel,
                                              Matcher matcher,
                                              String valueLabel)
                                       throws uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
        Throws:
        uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
      • handleUri

        protected void handleUri​(String defineLabel,
                                 Matcher matcher,
                                 String valueLabel,
                                 boolean mandatory)
                          throws uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
        Throws:
        uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
      • handleContact

        protected void handleContact​(String defineLabel,
                                     Matcher matcher,
                                     MetadataElement element,
                                     String valueLabel)
                              throws uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
        Throws:
        uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
      • handlePublication

        protected void handlePublication​(String defineLabel,
                                         Matcher matcher,
                                         String valueLabel)
                                  throws uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
        Throws:
        uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
      • handleSoftware

        protected void handleSoftware​(String defineLabel,
                                      Matcher matcher,
                                      MetadataElement element,
                                      String valueLabel)
                               throws uk.ac.ebi.pride.jmztab2.utils.errors.MZTabErrorOverflowException,
                                      uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
        Throws:
        uk.ac.ebi.pride.jmztab2.utils.errors.MZTabErrorOverflowException
        uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
      • handleInstrument

        protected void handleInstrument​(String defineLabel,
                                        Matcher matcher,
                                        MetadataElement element,
                                        String valueLabel)
                                 throws uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
        Throws:
        uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
      • handleSampleProcessing

        protected void handleSampleProcessing​(String defineLabel,
                                              Matcher matcher,
                                              String valueLabel)
                                       throws uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
        Throws:
        uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
      • handleDescription

        protected void handleDescription​(String defineLabel,
                                         String valueLabel)
                                  throws uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
        Throws:
        uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
      • handleTitle

        protected void handleTitle​(String defineLabel,
                                   String valueLabel)
                            throws uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
        Throws:
        uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
      • handleMzTab

        protected void handleMzTab​(MetadataElement element,
                                   Matcher matcher,
                                   String defineLabel,
                                   String valueLabel)
                            throws uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
        Throws:
        uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
      • refineNormalMetadata

        public void refineNormalMetadata()
                                  throws uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException
        Refine the metadata, and check whether missing some important information. fixed_mode, variable_mode must provide in the Complete file. Detail information see specification 5.5
        Throws:
        uk.ac.ebi.pride.jmztab2.utils.errors.MZTabException - if any.
      • getMetadata

        public de.isas.mztab2.model.Metadata getMetadata()

        Getter for the field metadata.

        Returns:
        a Metadata object.
      • handleParam

        public void handleParam​(String defineLabel,
                                String valueLabel,
                                uk.ac.ebi.pride.jmztab2.utils.errors.MZTabErrorType errorType,
                                int lineNumber,
                                Consumer<de.isas.mztab2.model.Parameter> consumer)
                         throws uk.ac.ebi.pride.jmztab2.utils.errors.MZTabErrorOverflowException

        handleParam.

        Parameters:
        defineLabel - a String object.
        valueLabel - a String object.
        errorType - a MZTabErrorType object.
        lineNumber - a int.
        consumer - a Consumer object.
        Throws:
        uk.ac.ebi.pride.jmztab2.utils.errors.MZTabErrorOverflowException - if any.