Package org.fugerit.java.doc.base.parser
Interface DocParser
-
- All Known Implementing Classes:
AbstractDocParser
,DocXmlParser
public interface DocParser
Class implementing the parsing and validation of doc source- Author:
- fugerit
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getSourceType()
Returns the source type handled by this parserDocBase
parse(InputStream is)
Parse a sourceDocBase
parse(Reader reader)
Parse a sourceint
validate(Reader reader)
Validate a sourceDocValidationResult
validateResult(Reader reader)
Validate a sourceint
validateVersion(Reader reader)
Validate a source, it tries to find the xsd version and validate against the specific versionDocValidationResult
validateVersionResult(Reader reader)
Validate a source, it tries to find the xsd version and validate against the specific version
-
-
-
Method Detail
-
getSourceType
int getSourceType()
Returns the source type handled by this parser- Returns:
- the
int
representation of the source type handled by this parserDocFacadeSource
-
parse
DocBase parse(InputStream is) throws DocException
Parse a source- Parameters:
is
- the source stream- Returns:
- the parsed document
- Throws:
DocException
- in case of problems
-
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
-
validateResult
DocValidationResult validateResult(Reader reader) throws DocException
Validate a source- Parameters:
reader
- the source reader- Returns:
- the result of the validation
- 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
-
-