initial versions.
[xmlrouter] / config / src / main / java / org / wamblee / xmlrouter / config / DocumentType.java
1 package org.wamblee.xmlrouter.config;
2
3 import javax.xml.transform.dom.DOMSource;
4
5 public interface DocumentType {
6     
7     /**
8      * Symbolic name for the document type. 
9      * @return Name. 
10      */
11     String getName();
12
13     /**
14      * Checks if a document is of the given type. 
15      * @param aSource Document
16      * @return True iff the document is of the given type. 
17      */
18     boolean isInstance(DOMSource aSource);
19     
20     /**
21      * Validates the document. Implementations that do not validate should simply
22      * return true always. 
23      * @param aSource Document.
24      * @return True iff the document is valid. 
25      */
26     boolean validate(DOMSource aSource);
27 }