|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jibx.binding.model.TreeContext
org.jibx.binding.model.ValidationContext
public class ValidationContext
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.
| Nested Class Summary | |
|---|---|
protected class |
ValidationContext.PrevalidationVisitor
Inner class for handling prevalidation. |
protected class |
ValidationContext.ValidationVisitor
Inner class for handling validation. |
| Constructor Summary | |
|---|---|
ValidationContext(IClassLocator iloc)
Constructor. |
|
| Method Summary | |
|---|---|
void |
addError(String msg)
Add error item for current element. |
void |
addError(String msg,
Object obj)
Add error item. |
void |
addFatal(String msg)
Add fatal item for current element. |
void |
addFatal(String msg,
Object obj)
Add fatal item. |
void |
addProblem(ValidationProblem problem)
Add problem report. |
void |
addWarning(String msg)
Add warning item for current element. |
void |
addWarning(String msg,
Object obj)
Add warning item. |
IClass |
getClassInfo(String name)
Get class information. |
int |
getErrorCount()
Get number of error problems reported. |
int |
getFatalCount()
Get number of fatal problems reported. |
ArrayList |
getProblems()
Get list of problems. |
int |
getWarningCount()
Get number of warning problems reported. |
void |
prevalidate(BindingElement root)
Prevalidate binding model tree. |
void |
validate(BindingElement root)
Validate binding model tree. |
| Methods inherited from class org.jibx.binding.model.TreeContext |
|---|
addSkip, getBindingRoot, getChildContext, getContextObject, getCurrentDefinitions, getDefinitions, getFormatDefinitions, getNestingDepth, getParentContainer, getParentElement, getParentElement, getRequiredClassInfo, isInBinding, isLookupSupported, isOutBinding, isSkipped, peekElement, popNode, pushNode, setBindingRoot, setGlobalDefinitions, tourTree, tourTree |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ValidationContext(IClassLocator iloc)
iloc - class locator| Method Detail |
|---|
public void prevalidate(BindingElement root)
root - binding node of tree to be prevalidatedpublic void validate(BindingElement root)
root - binding node of tree to be prevalidatedpublic int getWarningCount()
public int getErrorCount()
public int getFatalCount()
public void addWarning(String msg)
msg - problem description
public void addWarning(String msg,
Object obj)
msg - problem descriptionobj - source object for validation errorpublic void addError(String msg)
msg - problem description
public void addError(String msg,
Object obj)
msg - problem descriptionobj - source object for validation errorpublic void addFatal(String msg)
msg - problem description
public void addFatal(String msg,
Object obj)
msg - problem descriptionobj - source object for validation error (should be an element)public void addProblem(ValidationProblem problem)
problem - details of problem reportpublic ArrayList getProblems()
public IClass getClassInfo(String name)
getClassInfo in class TreeContextname - fully-qualified name of class to be found
null if class not found
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||