X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=config%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fxmlrouter%2Fconfig%2FDocumentType.java;fp=config%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fxmlrouter%2Fconfig%2FDocumentType.java;h=edcf29421245ffadca65815638dbb75b135a7423;hb=f7f3bbbc63a9e177f56064d821dc5f502dee378e;hp=0000000000000000000000000000000000000000;hpb=9dbda773fb0f33b7022a044f0e4cbc0e64f1929e;p=xmlrouter diff --git a/config/src/main/java/org/wamblee/xmlrouter/config/DocumentType.java b/config/src/main/java/org/wamblee/xmlrouter/config/DocumentType.java new file mode 100644 index 0000000..edcf294 --- /dev/null +++ b/config/src/main/java/org/wamblee/xmlrouter/config/DocumentType.java @@ -0,0 +1,27 @@ +package org.wamblee.xmlrouter.config; + +import javax.xml.transform.dom.DOMSource; + +public interface DocumentType { + + /** + * Symbolic name for the document type. + * @return Name. + */ + String getName(); + + /** + * Checks if a document is of the given type. + * @param aSource Document + * @return True iff the document is of the given type. + */ + boolean isInstance(DOMSource aSource); + + /** + * Validates the document. Implementations that do not validate should simply + * return true always. + * @param aSource Document. + * @return True iff the document is valid. + */ + boolean validate(DOMSource aSource); +}