net.ontopia.topicmaps.schema.utils
Class ExceptionValidationHandler

java.lang.Object
  extended by net.ontopia.topicmaps.schema.utils.ExceptionValidationHandler
All Implemented Interfaces:
ValidationHandlerIF

public class ExceptionValidationHandler
extends java.lang.Object
implements ValidationHandlerIF

PUBLIC: Validation handler implementation which throws an exception on every schema violation.


Constructor Summary
ExceptionValidationHandler()
           
 
Method Summary
 void endValidation()
          PUBLIC: Called after the validation of an entire topic map.
 void startValidation()
          PUBLIC: Called before the validation of an entire topic map begins.
 void violation(java.lang.String message, TMObjectIF container, java.lang.Object offender, ConstraintIF constraint)
          PUBLIC: Called when violations of the schema are discovered.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExceptionValidationHandler

public ExceptionValidationHandler()
Method Detail

violation

public void violation(java.lang.String message,
                      TMObjectIF container,
                      java.lang.Object offender,
                      ConstraintIF constraint)
               throws SchemaViolationException
Description copied from interface: ValidationHandlerIF
PUBLIC: Called when violations of the schema are discovered.

Specified by:
violation in interface ValidationHandlerIF
Parameters:
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.
Throws:
SchemaViolationException - Implementations may throw this exception if they wish to halt validation.

startValidation

public void startValidation()
Description copied from interface: ValidationHandlerIF
PUBLIC: Called before the validation of an entire topic map begins. When single topics or associations are validated this method is not called.

Specified by:
startValidation in interface ValidationHandlerIF

endValidation

public void endValidation()
Description copied from interface: ValidationHandlerIF
PUBLIC: Called after the validation of an entire topic map. When single topics or associations are validated this method is not called.

Specified by:
endValidation in interface ValidationHandlerIF


Copyright © 2000-2012 Ontopia.