Interface DocParser

  • All Known Implementing Classes:
    AbstractDocParser, DocXmlParser

    public interface DocParser
    Class implementing the parsing and validation of doc source
    Author:
    fugerit
    • Method Detail

      • getSourceType

        int getSourceType()
        Returns the source type handled by this parser
        Returns:
        the int representation of the source type handled by this parser DocFacadeSource
      • parse

        DocBase parse​(Reader reader)
               throws DocException
        Parse a source
        Parameters:
        reader - the source reader
        Returns:
        the parsed document
        Throws:
        DocException - in case of problems
      • validate

        int validate​(Reader reader)
              throws DocException
        Validate a source
        Parameters:
        reader - the source reader
        Returns:
        the result of the validation (0 in case of success)
        Throws:
        DocException - in case of problems
      • validateVersionResult

        DocValidationResult validateVersionResult​(Reader reader)
                                           throws DocException
        Validate a source, it tries to find the xsd version and validate against the specific version
        Parameters:
        reader - the source reader
        Returns:
        the result of the validation
        Throws:
        DocException - in case of problems
      • validateVersion

        int validateVersion​(Reader reader)
                     throws DocException
        Validate a source, it tries to find the xsd version and validate against the specific version
        Parameters:
        reader - the source reader
        Returns:
        the result of the validation as an int (0 in case of success)
        Throws:
        DocException - in case of problems