org.tm4j.topicmap.utils
Class TypeInstanceAssociationFilter

java.lang.Object
  extended byorg.tm4j.topicmap.utils.WalkerFilterAdapter
      extended byorg.tm4j.topicmap.utils.TypeInstanceAssociationFilter
All Implemented Interfaces:
WalkerFilter, WalkerHandler

public class TypeInstanceAssociationFilter
extends WalkerFilterAdapter

This filter will skip all associations which are an XTM TYPE-INSTANCE association and will skip the topics which are used to define that association type and the roles of that association type.

Note This filter does not check for the uses of the topics before removing them. Therefore, if this filter is used with a topic map which makes use of the XTM defined subjects for purposes other than duplicating the topic <instanceOf> construct, then the filtered topic map may be left internally inconsistent.


Field Summary
 
Fields inherited from class org.tm4j.topicmap.utils.WalkerFilterAdapter
m_handler
 
Constructor Summary
TypeInstanceAssociationFilter()
           
 
Method Summary
protected  boolean isTypeInstanceTopic(Topic t)
           
 boolean startAssociation(Association a)
           
 boolean startTopic(Topic t)
           
 
Methods inherited from class org.tm4j.topicmap.utils.WalkerFilterAdapter
endAssociation, endBaseName, endMember, endOccurrence, endScope, endTopic, endTopicMap, endVariant, getHandler, onParameter, onPlayer, onRoleSpec, onSubject, onSubjectIndicator, onTheme, onType, onVariantName, setHandler, startBaseName, startMember, startOccurrence, startScope, startTopicMap, startVariant
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeInstanceAssociationFilter

public TypeInstanceAssociationFilter()
Method Detail

startTopic

public boolean startTopic(Topic t)
                   throws TopicMapProcessingException
Specified by:
startTopic in interface WalkerHandler
Overrides:
startTopic in class WalkerFilterAdapter
Throws:
TopicMapProcessingException

startAssociation

public boolean startAssociation(Association a)
                         throws TopicMapProcessingException
Specified by:
startAssociation in interface WalkerHandler
Overrides:
startAssociation in class WalkerFilterAdapter
Throws:
TopicMapProcessingException

isTypeInstanceTopic

protected boolean isTypeInstanceTopic(Topic t)
Parameters:
t - The topic to be checked.
Returns:
true if t represents one of the XTM subjects used for representing type-instance relationships. Otherwise, false is returned.