net.ontopia.topicmaps.schema.core
Class SchemaViolationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by net.ontopia.topicmaps.schema.core.SchemaViolationException
All Implemented Interfaces:
java.io.Serializable

public class SchemaViolationException
extends java.lang.Exception

PUBLIC: This exception is thrown when topic maps violate their schemas.

See Also:
Serialized Form

Field Summary
protected  ConstraintIF constraint
           
protected  TMObjectIF container
           
protected  java.lang.Object offender
           
 
Constructor Summary
SchemaViolationException(java.lang.String message, TMObjectIF container, java.lang.Object offender, ConstraintIF constraint)
          Creates new exception.
 
Method Summary
 ConstraintIF getConstraint()
          PUBLIC: Returns the constraint that was violated.
 TMObjectIF getContainer()
          PUBLIC: Returns the owner of the offending object.
 java.lang.Object getOffender()
          PUBLIC: Returns the object that violated the schema.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

container

protected TMObjectIF container

offender

protected java.lang.Object offender

constraint

protected ConstraintIF constraint
Constructor Detail

SchemaViolationException

public SchemaViolationException(java.lang.String message,
                                TMObjectIF container,
                                java.lang.Object offender,
                                ConstraintIF constraint)
Creates new exception.

Parameters:
message - A message describing the nature of the violation.
offender - The object that violated the schema.
container - The container of the offending object.
constraint - The schema constraint that was violated.
Method Detail

getContainer

public TMObjectIF getContainer()
PUBLIC: Returns the owner of the offending object.


getOffender

public java.lang.Object getOffender()
PUBLIC: Returns the object that violated the schema. May be null.


getConstraint

public ConstraintIF getConstraint()
PUBLIC: Returns the constraint that was violated. May be null.



Copyright © 2000-2012 Ontopia.