Package com.thaiopensource.validate
Class CombineValidator
- java.lang.Object
-
- com.thaiopensource.validate.CombineValidator
-
-
Constructor Summary
Constructors Constructor Description CombineValidator(Validator v1, Validator v2)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContentHandlergetContentHandler()Returns the ContentHandler that will receive the XML document.DTDHandlergetDTDHandler()Returns a DTDHandler.voidreset()Cleans up after validating a document.
-
-
-
Method Detail
-
reset
public void reset()
Description copied from interface:ValidatorCleans up after validating a document. After completing validation of a document,resetmust be called. After calling reset(), another document may be validated. Calling this method may create new ContentHandler and DTDHandler objects or may simply reinitialize the state of the existing objects.
-
getContentHandler
public ContentHandler getContentHandler()
Description copied from interface:ValidatorReturns the ContentHandler that will receive the XML document. Information about the XML document to be validated must be reported by calling methods on the returned ContentHandler. When validation of an XML document has been completed (either endDocument() has been called or validation has been abandoned prematurely), reset() must be called. If no calls are made on the ContentHandler, then reset() need not be called. Implementations should allocate resources that require cleanup (e.g. threads, open files) lazily, typically in startDocument(). This method does not change the state of the Validator: the same object will always be returned unlessresetis called.- Specified by:
getContentHandlerin interfaceValidator- Returns:
- a ContentHandler, never
null - See Also:
Validator.reset()
-
getDTDHandler
public DTDHandler getDTDHandler()
Description copied from interface:ValidatorReturns a DTDHandler. Information about the DTD must be reported by calling methods on the returned object, unlessnullis returned. The same object will always be returned unlessresetis called: this method does not change the state of the Validator.- Specified by:
getDTDHandlerin interfaceValidator- Returns:
- a DTDHandler, maybe
nullif DTD information is not significant to theValidator
-
-