org.jboss.soa.esb.listeners.config
Class MockXmlValidatorImpl

java.lang.Object
  extended by org.jboss.soa.esb.listeners.config.MockXmlValidatorImpl
All Implemented Interfaces:
XmlValidator

public class MockXmlValidatorImpl
extends java.lang.Object
implements XmlValidator


Constructor Summary
MockXmlValidatorImpl()
           
 
Method Summary
 java.util.Collection<java.lang.String> getValidationResults()
          If the validation fails, more details can be obtained about the reasons why.
 org.w3c.dom.Document getXMLDocument()
          After validation the parsed document can be obtained for further processing.
 boolean validate(org.xml.sax.InputSource xmlInputSource)
          Validates an xml for it's wellformedness.
 boolean validate(org.xml.sax.InputSource xmlInputSource, javax.xml.transform.stream.StreamSource validationSource)
          Validates an xml using the xsd or dtd given in the second argument.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockXmlValidatorImpl

public MockXmlValidatorImpl()
Method Detail

getValidationResults

public java.util.Collection<java.lang.String> getValidationResults()
Description copied from interface: XmlValidator
If the validation fails, more details can be obtained about the reasons why.

Specified by:
getValidationResults in interface XmlValidator
Returns:
Collection Strings

getXMLDocument

public org.w3c.dom.Document getXMLDocument()
Description copied from interface: XmlValidator
After validation the parsed document can be obtained for further processing.

Specified by:
getXMLDocument in interface XmlValidator
Returns:
Document, the parsed XML Document.

validate

public boolean validate(org.xml.sax.InputSource xmlInputSource)
                 throws XmlValidatorException
Description copied from interface: XmlValidator
Validates an xml for it's wellformedness.

Specified by:
validate in interface XmlValidator
Parameters:
xmlInputSource - of the xml that needs to be validated.
Returns:
boolean, true if it passed validation, false if it failed.
Throws:
XmlValidatorException

validate

public boolean validate(org.xml.sax.InputSource xmlInputSource,
                        javax.xml.transform.stream.StreamSource validationSource)
                 throws XmlValidatorException
Description copied from interface: XmlValidator
Validates an xml using the xsd or dtd given in the second argument.

Specified by:
validate in interface XmlValidator
Parameters:
xmlInputSource - of the xml that needs to be validated.
validationSource - to the xsd or dtd.
Returns:
boolean, true if it passed validation, false if it failed.
Throws:
XmlValidatorException