aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.4.3/libjava/classpath/external/relaxngDatatype/org/relaxng/datatype/DatatypeStreamingValidator.java
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.4.3/libjava/classpath/external/relaxngDatatype/org/relaxng/datatype/DatatypeStreamingValidator.java')
-rwxr-xr-xgcc-4.4.3/libjava/classpath/external/relaxngDatatype/org/relaxng/datatype/DatatypeStreamingValidator.java46
1 files changed, 46 insertions, 0 deletions
diff --git a/gcc-4.4.3/libjava/classpath/external/relaxngDatatype/org/relaxng/datatype/DatatypeStreamingValidator.java b/gcc-4.4.3/libjava/classpath/external/relaxngDatatype/org/relaxng/datatype/DatatypeStreamingValidator.java
new file mode 100755
index 000000000..995205731
--- /dev/null
+++ b/gcc-4.4.3/libjava/classpath/external/relaxngDatatype/org/relaxng/datatype/DatatypeStreamingValidator.java
@@ -0,0 +1,46 @@
+package org.relaxng.datatype;
+
+/**
+ * Datatype streaming validator.
+ *
+ * <p>
+ * The streaming validator is an optional feature that is useful for
+ * certain Datatypes. It allows the caller to incrementally provide
+ * the literal.
+ *
+ * @author <a href="mailto:jjc@jclark.com">James Clark</a>
+ * @author <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
+ */
+public interface DatatypeStreamingValidator {
+
+ /**
+ * Passes an additional fragment of the literal.
+ *
+ * <p>
+ * The application can call this method several times, then call
+ * the isValid method (or the checkValid method) to check the validity
+ * of the accumulated characters.
+ */
+ void addCharacters( char[] buf, int start, int len );
+
+ /**
+ * Tells if the accumulated literal is valid with respect to
+ * the underlying Datatype.
+ *
+ * @return
+ * True if it is valid. False if otherwise.
+ */
+ boolean isValid();
+
+ /**
+ * Similar to the isValid method, but this method throws
+ * Exception (with possibly diagnostic information), instead of
+ * returning false.
+ *
+ * @exception DatatypeException
+ * If the callee supports the diagnosis and the accumulated
+ * literal is invalid, then this exception that possibly
+ * contains diagnosis information is thrown.
+ */
+ void checkValid() throws DatatypeException;
+}