org.ceryle.tm
Class TMAPITopicUtils

java.lang.Object
  extended by org.ceryle.tm.TMAPITopicUtils

public class TMAPITopicUtils
extends Object

Provides an utility class equivalent to TopicUtils for the TMAPI interface (since that API seemingly/lamely does not provide a test for Topic equivalency).

Author:
Murray Altheim

Constructor Summary
TMAPITopicUtils()
           
 
Method Summary
static boolean areEquivalent(org.tmapi.core.Topic topic1, org.tmapi.core.Topic topic2)
          Determines topic equivalency.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TMAPITopicUtils

public TMAPITopicUtils()
Method Detail

areEquivalent

public static boolean areEquivalent(org.tmapi.core.Topic topic1,
                                    org.tmapi.core.Topic topic2)
Determines topic equivalency. Two topics are considered equal if one or more of the following conditions hold
  1. The topics are from the same parent topic map and have already been merged (not pertinent, since in TMAPI this is impossible).
  2. The resourceLocator of the topics are equal
  3. The resourceLocator of one of the topics is equal to one of the subjectIndicators of the other topic.
  4. The subject of the topics are equal
  5. The topics have one or more subjectIndicators in common
  6. The topics have one or more base names with the same base name string in equivalent scopes.



The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.