Package org.geotools.xsd.impl
Class ValidatorHandler
- Object
-
- DefaultHandler
-
- DefaultHandler2
-
- ValidatorHandler
-
- All Implemented Interfaces:
ContentHandler,DTDHandler,EntityResolver,ErrorHandler,DeclHandler,EntityResolver2,LexicalHandler
public class ValidatorHandler extends DefaultHandler2
Handler for validating a document.This class is used by the parser to validate while parsing.
- Author:
- Justin Deoliveira, OpenGeo
-
-
Constructor Summary
Constructors Constructor Description ValidatorHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiderror(SAXParseException e)EntityResolvergetEntityResolver()List<Exception>getErrors()booleanisFailOnValidationError()InputSourceresolveEntity(String publicId, String systemId)InputSourceresolveEntity(String name, String publicId, String baseURI, String systemId)voidsetEntityResolver(EntityResolver entityResolver)voidsetFailOnValidationError(boolean failOnValidationError)voidstartDocument()-
Methods inherited from class DefaultHandler2
attributeDecl, comment, elementDecl, endCDATA, endDTD, endEntity, externalEntityDecl, getExternalSubset, internalEntityDecl, startCDATA, startDTD, startEntity
-
Methods inherited from class DefaultHandler
characters, endDocument, endElement, endPrefixMapping, fatalError, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startElement, startPrefixMapping, unparsedEntityDecl, warning
-
-
-
-
Method Detail
-
setFailOnValidationError
public void setFailOnValidationError(boolean failOnValidationError)
-
isFailOnValidationError
public boolean isFailOnValidationError()
-
setEntityResolver
public void setEntityResolver(EntityResolver entityResolver)
-
getEntityResolver
public EntityResolver getEntityResolver()
-
resolveEntity
public InputSource resolveEntity(String publicId, String systemId) throws IOException, SAXException
- Specified by:
resolveEntityin interfaceEntityResolver- Overrides:
resolveEntityin classDefaultHandler2- Throws:
IOExceptionSAXException
-
resolveEntity
public InputSource resolveEntity(String name, String publicId, String baseURI, String systemId) throws SAXException, IOException
- Specified by:
resolveEntityin interfaceEntityResolver2- Overrides:
resolveEntityin classDefaultHandler2- Throws:
SAXExceptionIOException
-
startDocument
public void startDocument() throws SAXException- Specified by:
startDocumentin interfaceContentHandler- Overrides:
startDocumentin classDefaultHandler- Throws:
SAXException
-
error
public void error(SAXParseException e) throws SAXException
- Specified by:
errorin interfaceErrorHandler- Overrides:
errorin classDefaultHandler- Throws:
SAXException
-
-