public class HTMLValidationHandler extends Object implements ValidationHandlerIF
Modifier and Type | Field and Description |
---|---|
protected int |
errors |
protected Writer |
out |
Constructor and Description |
---|
HTMLValidationHandler(Writer out) |
Modifier and Type | Method and Description |
---|---|
void |
endValidation()
PUBLIC: Called after the validation of an entire topic map.
|
int |
getErrors() |
protected String |
printAssociationRole(AssociationRoleIF role) |
protected String |
printConstraint(ConstraintIF constraint) |
protected String |
printMatcher(TMObjectMatcherIF matcher) |
protected void |
printScope(Collection scope) |
protected String |
printScopeSpec(ScopeSpecification scopespec) |
protected String |
printTopic(TopicIF topic) |
protected String |
printTypes(TopicIF topic) |
protected String |
printTypeSpec(TypeSpecification typespec) |
protected String |
printTypeSpecs(Collection specs) |
void |
startValidation()
PUBLIC: Called before the validation of an entire topic map
begins.
|
void |
violation(String message,
TMObjectIF container,
Object offender,
ConstraintIF constraint)
PUBLIC: Called when violations of the schema are discovered.
|
protected Writer out
protected int errors
public HTMLValidationHandler(Writer out)
public void startValidation()
ValidationHandlerIF
startValidation
in interface ValidationHandlerIF
public void violation(String message, TMObjectIF container, Object offender, ConstraintIF constraint) throws SchemaViolationException
ValidationHandlerIF
violation
in interface ValidationHandlerIF
message
- A message describing the nature of the violation.container
- The container of the offending object.offender
- The object that violated the schema.constraint
- The constraint that was violated.SchemaViolationException
- Implementations may throw this
exception if they wish to halt validation.public void endValidation()
ValidationHandlerIF
endValidation
in interface ValidationHandlerIF
protected void printScope(Collection scope) throws IOException
IOException
protected String printConstraint(ConstraintIF constraint)
protected String printMatcher(TMObjectMatcherIF matcher)
protected String printTypeSpecs(Collection specs)
protected String printTypeSpec(TypeSpecification typespec)
protected String printScopeSpec(ScopeSpecification scopespec)
protected String printAssociationRole(AssociationRoleIF role)
public int getErrors()