public class LoggingValidationContext extends ValidationContext implements ValidationListener
ValidationContext
which implements the
ValidationListener
interface to track his own validation process.
A instance of this class creates a SBMLErrorLog
which contains a
SBMLError
object for every broken constraint.
The level and version parameter are used to determine which rules will be checked.
For more informations about the SBML specifications look up sbml.org
Modifier and Type | Field and Description |
---|---|
private SBMLErrorLog |
log |
logger
Constructor and Description |
---|
LoggingValidationContext(int level,
int version) |
LoggingValidationContext(int level,
int version,
AnyConstraint<java.lang.Object> rootConstraint,
java.util.Set<SBMLValidator.CHECK_CATEGORY> categories) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the loaded constraints
|
void |
clearErrorLog()
Clears the error log.
|
void |
didValidate(ValidationContext ctx,
AnyConstraint<?> c,
java.lang.Object o,
boolean success)
This function will be called after the constraint c had validate the object
o.
|
SBMLErrorLog |
getErrorLog()
Gets the
SBMLErrorLog of this context. |
private void |
logFailure(int id) |
void |
willValidate(ValidationContext ctx,
AnyConstraint<?> c,
java.lang.Object o)
This function will be called before the constraint will validate the
object.
|
addValidationListener, didValidate, enableCheckCategories, enableCheckCategory, getCheckCategories, getConstraintType, getHashMap, getLevel, getLevelAndVersion, getRootConstraint, getValidateRecursivly, getVersion, isLevelAndVersionEqualTo, isLevelAndVersionGreaterEqualThan, isLevelAndVersionGreaterThan, isLevelAndVersionLesserEqualThan, isLevelAndVersionLessThan, loadConstraints, loadConstraints, loadConstraints, loadConstraintsForAttribute, removeValidationListener, setLevel, setLevelAndVersion, setRootConstraint, setValidateRecursivly, setVersion, validate, validate, willValidate
private SBMLErrorLog log
public LoggingValidationContext(int level, int version)
public LoggingValidationContext(int level, int version, AnyConstraint<java.lang.Object> rootConstraint, java.util.Set<SBMLValidator.CHECK_CATEGORY> categories)
public void clear()
ValidationContext
clear
in class ValidationContext
public void clearErrorLog()
public SBMLErrorLog getErrorLog()
SBMLErrorLog
of this context.private void logFailure(int id)
public void willValidate(ValidationContext ctx, AnyConstraint<?> c, java.lang.Object o)
ValidationListener
willValidate
in interface ValidationListener
public void didValidate(ValidationContext ctx, AnyConstraint<?> c, java.lang.Object o, boolean success)
ValidationListener
didValidate
in interface ValidationListener