1 package org
.relaxng
.datatype
;
4 * Datatype streaming validator.
7 * The streaming validator is an optional feature that is useful for
8 * certain Datatypes. It allows the caller to incrementally provide
11 * @author <a href="mailto:jjc@jclark.com">James Clark</a>
12 * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
14 public interface DatatypeStreamingValidator
{
17 * Passes an additional fragment of the literal.
20 * The application can call this method several times, then call
21 * the isValid method (or the checkValid method) to check the validity
22 * of the accumulated characters.
24 void addCharacters( char[] buf
, int start
, int len
);
27 * Tells if the accumulated literal is valid with respect to
28 * the underlying Datatype.
31 * True if it is valid. False if otherwise.
36 * Similar to the isValid method, but this method throws
37 * Exception (with possibly diagnostic information), instead of
40 * @exception DatatypeException
41 * If the callee supports the diagnosis and the accumulated
42 * literal is invalid, then this exception that possibly
43 * contains diagnosis information is thrown.
45 void checkValid() throws DatatypeException
;