KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > thaiopensource > validate > Schema


1 package com.thaiopensource.validate;
2
3 import com.thaiopensource.util.PropertyMap;
4
5 /**
6  * A schema that can be used to validate an XML document. A single <code>Schema</code> object
7  * is safe for concurrent access by multiple threads.
8  *
9  * @see SchemaReader
10  * @see Validator
11  *
12  * @author <a HREF="mailto:jjc@jclark.com">James Clark</a>
13  */

14 public interface Schema {
15   /**
16    * Creates a new <code>Validator</code> that can be used to validate XML documents with
17    * respect to this schema. The <code>PropertyMap</code> should contain a
18    * <code>ValidateProperty.ERROR_HANDLER</code> property, which will be
19    * used to report errors. If it does not, then an <code>ErrorHandler</code>
20    * will be used that ignores warnings and throws its argument on errors and fatal errors.
21    * Common properties are defined in <code>ValidateProperty</code>. Implementations
22    * may support additional properties.
23    *
24    * @param properties a <code>PropertyMap</code> specifying the properties of the
25    * <code>Validator</code> to be created
26    * @return a new <code>Validator</code> that can be used to validate an XML document
27    * with respect to this schema; never <code>null</code>
28    *
29    * @see ValidateProperty#ERROR_HANDLER
30    */

31   Validator createValidator(PropertyMap properties);
32   PropertyMap getProperties();
33 }
34
Popular Tags