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()
ValidationHandlerIFstartValidation in interface ValidationHandlerIFpublic void violation(String message, TMObjectIF container, Object offender, ConstraintIF constraint) throws SchemaViolationException
ValidationHandlerIFviolation in interface ValidationHandlerIFmessage - 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()
ValidationHandlerIFendValidation in interface ValidationHandlerIFprotected void printScope(Collection scope) throws IOException
IOExceptionprotected 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()