< prev index next >

src/java.xml/share/classes/javax/xml/validation/Validator.java

Print this page




  31 import javax.xml.transform.Source;
  32 
  33 import org.w3c.dom.ls.LSResourceResolver;
  34 import org.xml.sax.ErrorHandler;
  35 import org.xml.sax.SAXException;
  36 import org.xml.sax.SAXNotRecognizedException;
  37 import org.xml.sax.SAXNotSupportedException;
  38 
  39 /**
  40  * A processor that checks an XML document against {@link Schema}.
  41  *
  42  * <p>
  43  * A validator object is not thread-safe and not reentrant.
  44  * In other words, it is the application's responsibility to make
  45  * sure that one {@link Validator} object is not used from
  46  * more than one thread at any given time, and while the {@code validate}
  47  * method is invoked, applications may not recursively call
  48  * the {@code validate} method.
  49  *
  50  *
  51  * @author  <a href="mailto:Kohsuke.Kawaguchi@Sun.com">Kohsuke Kawaguchi</a>
  52  * @since 1.5
  53  */
  54 public abstract class Validator {
  55 
  56     /**
  57      * Constructor for derived classes.
  58      *
  59      * <p>The constructor does nothing.
  60      *
  61      * <p>Derived classes must create {@link Validator} objects that have
  62      * {@code null} {@link ErrorHandler} and
  63      * {@code null} {@link LSResourceResolver}.
  64      */
  65     protected Validator() {
  66     }
  67 
  68         /**
  69          * Reset this {@code Validator} to its original configuration.
  70          *
  71          * <p>{@code Validator} is reset to the same state as when it was created with




  31 import javax.xml.transform.Source;
  32 
  33 import org.w3c.dom.ls.LSResourceResolver;
  34 import org.xml.sax.ErrorHandler;
  35 import org.xml.sax.SAXException;
  36 import org.xml.sax.SAXNotRecognizedException;
  37 import org.xml.sax.SAXNotSupportedException;
  38 
  39 /**
  40  * A processor that checks an XML document against {@link Schema}.
  41  *
  42  * <p>
  43  * A validator object is not thread-safe and not reentrant.
  44  * In other words, it is the application's responsibility to make
  45  * sure that one {@link Validator} object is not used from
  46  * more than one thread at any given time, and while the {@code validate}
  47  * method is invoked, applications may not recursively call
  48  * the {@code validate} method.
  49  *
  50  *
  51  * @author  Kohsuke Kawaguchi
  52  * @since 1.5
  53  */
  54 public abstract class Validator {
  55 
  56     /**
  57      * Constructor for derived classes.
  58      *
  59      * <p>The constructor does nothing.
  60      *
  61      * <p>Derived classes must create {@link Validator} objects that have
  62      * {@code null} {@link ErrorHandler} and
  63      * {@code null} {@link LSResourceResolver}.
  64      */
  65     protected Validator() {
  66     }
  67 
  68         /**
  69          * Reset this {@code Validator} to its original configuration.
  70          *
  71          * <p>{@code Validator} is reset to the same state as when it was created with


< prev index next >