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 void
error(SAXParseException e)
EntityResolver
getEntityResolver()
List<Exception>
getErrors()
boolean
isFailOnValidationError()
InputSource
resolveEntity(String publicId, String systemId)
InputSource
resolveEntity(String name, String publicId, String baseURI, String systemId)
void
setEntityResolver(EntityResolver entityResolver)
void
setFailOnValidationError(boolean failOnValidationError)
void
startDocument()
-
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:
resolveEntity
in interfaceEntityResolver
- Overrides:
resolveEntity
in classDefaultHandler2
- Throws:
IOException
SAXException
-
resolveEntity
public InputSource resolveEntity(String name, String publicId, String baseURI, String systemId) throws SAXException, IOException
- Specified by:
resolveEntity
in interfaceEntityResolver2
- Overrides:
resolveEntity
in classDefaultHandler2
- Throws:
SAXException
IOException
-
startDocument
public void startDocument() throws SAXException
- Specified by:
startDocument
in interfaceContentHandler
- Overrides:
startDocument
in classDefaultHandler
- Throws:
SAXException
-
error
public void error(SAXParseException e) throws SAXException
- Specified by:
error
in interfaceErrorHandler
- Overrides:
error
in classDefaultHandler
- Throws:
SAXException
-
-