Package com.ctc.wstx.dtd
Class DFAValidator
- java.lang.Object
-
- com.ctc.wstx.dtd.StructValidator
-
- com.ctc.wstx.dtd.DFAValidator
-
public final class DFAValidator extends StructValidator
Validator class that is based on a DFA constructed from DTD content specification.
-
-
Constructor Summary
Constructors Constructor Description DFAValidator(DFAState initialState)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringfullyValid()Method called when the end element of the scope this validator validates is encountered.StructValidatornewInstance()Method that should be called to get the actual usable validator instance, from the 'template' validator.StringtryToValidate(PrefixedName elemName)Method called when a new (start) element is encountered within the scope of parent element this validator monitors.
-
-
-
Constructor Detail
-
DFAValidator
public DFAValidator(DFAState initialState)
-
-
Method Detail
-
newInstance
public StructValidator newInstance()
Description copied from class:StructValidatorMethod that should be called to get the actual usable validator instance, from the 'template' validator.- Specified by:
newInstancein classStructValidator
-
tryToValidate
public String tryToValidate(PrefixedName elemName)
Description copied from class:StructValidatorMethod called when a new (start) element is encountered within the scope of parent element this validator monitors.- Specified by:
tryToValidatein classStructValidator- Returns:
- Null if element is valid in its current position; error message if not.
-
fullyValid
public String fullyValid()
Description copied from class:StructValidatorMethod called when the end element of the scope this validator validates is encountered. It should make sure that the content model is valid, and if not, to construct an error message.- Specified by:
fullyValidin classStructValidator- Returns:
- Null if the content model for the element is valid; error message if not.
-
-