[jboss-svn-commits] JBL Code SVN: r8245 - labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Dec 11 21:30:02 EST 2006
Author: kurt.stam at jboss.com
Date: 2006-12-11 21:30:00 -0500 (Mon, 11 Dec 2006)
New Revision: 8245
Modified:
labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/XmlValidator.java
Log:
Adding javadoc
Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/XmlValidator.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/XmlValidator.java 2006-12-11 22:47:10 UTC (rev 8244)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/XmlValidator.java 2006-12-12 02:30:00 UTC (rev 8245)
@@ -1,9 +1,12 @@
package org.jboss.soa.esb.listeners.config;
import java.io.InputStream;
+import java.util.Collection;
+import org.w3c.dom.Document;
import org.xml.sax.InputSource;
/**
+ * Interface for validating an xml given it's xsd or dtd.
*
* @author kstam
* @author ddegroff
@@ -11,9 +14,33 @@
*/
public interface XmlValidator
{
- boolean validate(InputSource xmlInputSource) throws XmlValidatorException;
-
- boolean validate(InputStream xmlInputSource, InputSource validationSource) throws XmlValidatorException;
-
- String getValidationResult();
+ /**
+ * Validates an xml for it's wellformedness.
+ *
+ * @param xmlInputSource of the xml that needs to be validated.
+ * @return boolean, true if it passed validation, false if it failed.
+ * @throws XmlValidatorException
+ */
+ public boolean validate(InputSource xmlInputSource) throws XmlValidatorException;
+ /**
+ * Validates an xml using the xsd or dtd given in the second argument.
+ *
+ * @param xmlInputSource of the xml that needs to be validated.
+ * @param validationSource to the xsd or dtd.
+ * @return boolean, true if it passed validation, false if it failed.
+ * @throws XmlValidatorException
+ */
+ public boolean validate(InputStream xmlInputSource, InputSource validationSource) throws XmlValidatorException;
+ /**
+ * If the validation fails, more details can be obtained about the reasons why.
+ *
+ * @return Collection Strings
+ */
+ public Collection<String> getValidationResults();
+ /**
+ * After validation the parsed document can be obtained for further processing.
+ *
+ * @return Document, the parsed XML Document.
+ */
+ public Document getXMLDocument();
}
More information about the jboss-svn-commits
mailing list