Package org.fugerit.java.doc.base.parser
Class AbstractDocParser
java.lang.Object
org.fugerit.java.doc.base.parser.AbstractDocParser
- All Implemented Interfaces:
DocParser
- Direct Known Subclasses:
DocXmlParser
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the source type handled by this parserparse(InputStream is) Parse a sourceParse a sourceprotected abstract DocBaseparseWorker(Reader reader) intValidate a sourcevalidateResult(Reader reader) Validate a sourceintvalidateVersion(Reader reader) Validate a source, it tries to find the xsd version and validate against the specific versionvalidateVersionResult(Reader reader) Validate a source, it tries to find the xsd version and validate against the specific versionprotected abstract DocValidationResultvalidateWorker(Reader reader, boolean parseVersion)
-
Constructor Details
-
AbstractDocParser
protected AbstractDocParser(int sourceType)
-
-
Method Details
-
getSourceType
public int getSourceType()Description copied from interface:DocParserReturns the source type handled by this parser- Specified by:
getSourceTypein interfaceDocParser- Returns:
- the
intrepresentation of the source type handled by this parserDocFacadeSource
-
parse
Description copied from interface:DocParserParse a source- Specified by:
parsein interfaceDocParser- Parameters:
is- the source stream- Returns:
- the parsed document
- Throws:
DocException- in case of problems
-
parse
Description copied from interface:DocParserParse a source- Specified by:
parsein interfaceDocParser- Parameters:
reader- the source reader- Returns:
- the parsed document
- Throws:
DocException- in case of problems
-
validateResult
Description copied from interface:DocParserValidate a source- Specified by:
validateResultin interfaceDocParser- Parameters:
reader- the source reader- Returns:
- the result of the validation
- Throws:
DocException- in case of problems
-
validate
Description copied from interface:DocParserValidate a source- Specified by:
validatein interfaceDocParser- Parameters:
reader- the source reader- Returns:
- the result of the validation (
0in case of success) - Throws:
DocException- in case of problems
-
validateVersionResult
Description copied from interface:DocParserValidate a source, it tries to find the xsd version and validate against the specific version- Specified by:
validateVersionResultin interfaceDocParser- Parameters:
reader- the source reader- Returns:
- the result of the validation
- Throws:
DocException- in case of problems
-
validateVersion
Description copied from interface:DocParserValidate a source, it tries to find the xsd version and validate against the specific version- Specified by:
validateVersionin interfaceDocParser- Parameters:
reader- the source reader- Returns:
- the result of the validation as an
int(0in case of success) - Throws:
DocException- in case of problems
-
validateWorker
protected abstract DocValidationResult validateWorker(Reader reader, boolean parseVersion) throws DocException - Throws:
DocException
-
parseWorker
- Throws:
DocException
-