edu.buffalo.nsf.xmlcqa.data.dtd
Class ValidationAutomaton

java.lang.Object
  extended byedu.buffalo.nsf.xmlcqa.data.dtd.ValidationAutomaton

public class ValidationAutomaton
extends java.lang.Object

Automaton checking the conformance of a token stream with a given DTD. The whole functionality of this class is is implemented with static methods. The main method is validate(TokenStream, DTD) which returns the number of detected errors (times the sequences of labels of children of a given node do not conform to the regular expression).

Author:
staworko

Constructor Summary
ValidationAutomaton()
           
 
Method Summary
static int validate(TokenStream ts, DTD d)
          Calculates the number of errors in ts w.r.t.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidationAutomaton

public ValidationAutomaton()
Method Detail

validate

public static int validate(TokenStream ts,
                           DTD d)
Calculates the number of errors in ts w.r.t. d. Result equal to 0 indicates stream conforming to the DTD.