org.tm4j.topicmap.utils
Class ScopeWalkerFilter

java.lang.Object
  extended byorg.tm4j.topicmap.utils.WalkerFilterAdapter
      extended byorg.tm4j.topicmap.utils.ScopeWalkerFilter
All Implemented Interfaces:
WalkerFilter, WalkerHandler
Direct Known Subclasses:
InScopeWalkerFilter

public class ScopeWalkerFilter
extends WalkerFilterAdapter

A WalkerFilter implementation that filters out all scoped objects that do not match the specified predicate. This class can be used to implement a variety of scope-based filters.

Author:
Kal Ahmed (kal@techquila.com)

Field Summary
 
Fields inherited from class org.tm4j.topicmap.utils.WalkerFilterAdapter
m_handler
 
Constructor Summary
ScopeWalkerFilter(uk.co.jezuk.mango.Predicate scopedObjectTester)
          Create a new ScopeWalkerFilter that filters out all ScopedObjects that do not pass the predicate.
 
Method Summary
 boolean startAssociation(Association assoc)
           
 boolean startBaseName(BaseName name)
           
 boolean startOccurrence(Occurrence occ)
           
 
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, startMember, startScope, startTopic, startTopicMap, startVariant
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScopeWalkerFilter

public ScopeWalkerFilter(uk.co.jezuk.mango.Predicate scopedObjectTester)
Create a new ScopeWalkerFilter that filters out all ScopedObjects that do not pass the predicate.

Parameters:
scopedObjectTester - the predicate used to evaluate ScopedObjects encountered during the walk.
Method Detail

startAssociation

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

startBaseName

public boolean startBaseName(BaseName name)
                      throws TopicMapProcessingException
Specified by:
startBaseName in interface WalkerHandler
Overrides:
startBaseName in class WalkerFilterAdapter
Throws:
TopicMapProcessingException

startOccurrence

public boolean startOccurrence(Occurrence occ)
                        throws TopicMapProcessingException
Specified by:
startOccurrence in interface WalkerHandler
Overrides:
startOccurrence in class WalkerFilterAdapter
Throws:
TopicMapProcessingException