org.tmapi.core
Class SubjectLocatorClashException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended byorg.tmapi.core.TMAPIRuntimeException
                  extended byorg.tmapi.core.MergeException
                      extended byorg.tmapi.core.SubjectLocatorClashException
All Implemented Interfaces:
java.io.Serializable

public class SubjectLocatorClashException
extends MergeException

Thrown when two topics cannot be merged because the XTM 1.0 model does not allow a Topic to have more than one value for the subjectLocators property.

This exception can only ever be thrown by a processor with the XTM 1.0 model feature enabled. If the automerge feature is disabled, then this exception can only ever be thrown by the methods Topic.mergeIn(Topic) and TopicMap.mergeIn(TopicMap).

The exception indicates that the processor attempted to perform the merger of two Topics as required for consistency with the Topic Maps Data Model, but found that the merge could not be completed due to the XTM 1.0 constraint that a Topic can only have a single subjectLocator property value.

The attempted merge reported by this exception MUST NOT be completed by the processor.

Author:
Kal Ahmed (kal@techquila.com)
See Also:
Serialized Form

Constructor Summary
SubjectLocatorClashException(java.util.Set clashTopics, java.lang.String msg)
          Constructs a new exception instance that reports a subject locator clash when merging the topics contained in the set clashTopics.
SubjectLocatorClashException(Topic firstMergedTopic, Topic secondMergedTopic, java.lang.String msg)
          Constructs a new exception instance that reports a subject locator clash when merging the topics firstMergedTopic and secondMergedTopic.
 
Method Summary
 java.util.Set getTopics()
          Returns the topics involved in the clash of subjectLocator property values.
 
Methods inherited from class org.tmapi.core.TMAPIRuntimeException
getCause
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, 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
 

Constructor Detail

SubjectLocatorClashException

public SubjectLocatorClashException(java.util.Set clashTopics,
                                    java.lang.String msg)
Constructs a new exception instance that reports a subject locator clash when merging the topics contained in the set clashTopics.

Parameters:
clashTopics - the topics which clashed
msg - a message string describing the exception

SubjectLocatorClashException

public SubjectLocatorClashException(Topic firstMergedTopic,
                                    Topic secondMergedTopic,
                                    java.lang.String msg)
Constructs a new exception instance that reports a subject locator clash when merging the topics firstMergedTopic and secondMergedTopic.

Parameters:
firstMergedTopic - one of the topics involved in the clash
secondMergedTopic - another of the topics involved in the clash
msg - a message string describing the exception
Method Detail

getTopics

public java.util.Set getTopics()
Returns the topics involved in the clash of subjectLocator property values.

Returns:
a Set of Topic instances