| java.lang.Object org.jibx.binding.model.TreeContext org.jibx.binding.model.ValidationContext
ValidationContext | public class ValidationContext extends TreeContext (Code) | | Tracks the validation state. This includes the current validation phase, as
well as order-dependent state information collected while walking the tree
structure of a binding model. Collects all errors and warnings and maintains
a summary of the severity of the problems found.
author: Dennis M. Sosnoski version: 1.0 |
Inner Class :protected class PrevalidationVisitor extends ModelVisitor | |
Inner Class :protected class ValidationVisitor extends ModelVisitor | |
ValidationContext | public ValidationContext(IClassLocator iloc)(Code) | | Constructor.
Parameters: iloc - class locator |
addError | public void addError(String msg)(Code) | | Add error item for current element. Adds an error item to the problem
list, which is a definite problem that still allows validation to
proceed. This form of the call can only be used during a tree tour being
controlled by this context.
Parameters: msg - problem description |
addError | public void addError(String msg, Object obj)(Code) | | Add error item. Adds an error item to the problem list, which is a
definite problem that still allows validation to proceed.
Parameters: msg - problem description Parameters: obj - source object for validation error |
addFatal | public void addFatal(String msg)(Code) | | Add fatal item for current element. Adds a fatal item to the problem
list, which is a severe problem that blocks further validation within the
tree branch involved. This form of the call can only be used during a
tree tour being controlled by this context.
Parameters: msg - problem description |
addFatal | public void addFatal(String msg, Object obj)(Code) | | Add fatal item. Adds a fatal item to the problem list, which is a severe
problem that blocks further validation within the tree branch involved.
The object associated with a fatal error should always be an element.
Parameters: msg - problem description Parameters: obj - source object for validation error (should be an element) |
addProblem | public void addProblem(ValidationProblem problem)(Code) | | Add problem report. The problem is added and counted as appropriate.
Parameters: problem - details of problem report |
addWarning | public void addWarning(String msg)(Code) | | Add warning item for current element. Adds a warning item to the problem
list, which is a possible problem that still allows reasonable operation.
This form of the call can only be used during a tree tour being
controlled by this context.
Parameters: msg - problem description |
addWarning | public void addWarning(String msg, Object obj)(Code) | | Add warning item. Adds a warning item to the problem list, which is a
possible problem that still allows reasonable operation.
Parameters: msg - problem description Parameters: obj - source object for validation error |
getErrorCount | public int getErrorCount()(Code) | | Get number of error problems reported.
error problem count |
getFatalCount | public int getFatalCount()(Code) | | Get number of fatal problems reported.
fatal problem count |
getProblems | public ArrayList getProblems()(Code) | | Get list of problems.
problem list |
getWarningCount | public int getWarningCount()(Code) | | Get number of warning problems reported.
warning problem count |
prevalidate | public void prevalidate(BindingElement root)(Code) | | Prevalidate binding model tree. This calls the prevalidate method for
each element in the tree, in preorder traversal order.
Parameters: root - binding node of tree to be prevalidated |
validate | public void validate(BindingElement root)(Code) | | Validate binding model tree. This calls the validate method for each
element in the tree, in postorder traversal order.
Parameters: root - binding node of tree to be prevalidated |
|
|