de.topicmapslab.majortom.index.nonpaged
Class CachedSupertypeSubtypeIndexImpl<T extends de.topicmapslab.majortom.model.store.ITopicMapStore>

java.lang.Object
  extended by de.topicmapslab.majortom.index.IndexImpl<T>
      extended by de.topicmapslab.majortom.index.core.BaseCachedIndexImpl<T>
          extended by de.topicmapslab.majortom.index.core.BaseCachedSupertypeSubtypeIndexImpl<T>
              extended by de.topicmapslab.majortom.index.nonpaged.CachedSupertypeSubtypeIndexImpl<T>
All Implemented Interfaces:
de.topicmapslab.majortom.model.event.ITopicMapListener, de.topicmapslab.majortom.model.index.IIndex, de.topicmapslab.majortom.model.index.ISupertypeSubtypeIndex, org.tmapi.index.Index
Direct Known Subclasses:
JdbcSupertypeSubtypeIndex

public abstract class CachedSupertypeSubtypeIndexImpl<T extends de.topicmapslab.majortom.model.store.ITopicMapStore>
extends BaseCachedSupertypeSubtypeIndexImpl<T>
implements de.topicmapslab.majortom.model.index.ISupertypeSubtypeIndex

Implementation of IPagedSupertypeSubtypeIndex.

Author:
Sven Krosse

Nested Class Summary
 
Nested classes/interfaces inherited from class de.topicmapslab.majortom.index.core.BaseCachedSupertypeSubtypeIndexImpl
BaseCachedSupertypeSubtypeIndexImpl.Type
 
Constructor Summary
CachedSupertypeSubtypeIndexImpl(T store)
          constructor
 
Method Summary
protected abstract  java.util.Collection<org.tmapi.core.Topic> doGetDirectSubtypes(org.tmapi.core.Topic type)
          Returns all topic types being a direct subtype of the given topic type.
protected abstract  java.util.Collection<org.tmapi.core.Topic> doGetDirectSupertypes(org.tmapi.core.Topic type)
          Returns all topic types being a direct supertype of the given topic type.
protected abstract  java.util.Collection<org.tmapi.core.Topic> doGetSubtypes()
          Returns all topic types being a subtype of a topic type contained by the topic map.
protected abstract  java.util.Collection<org.tmapi.core.Topic> doGetSubtypes(java.util.Collection<? extends org.tmapi.core.Topic> types, boolean all)
          Returns all topic types being a subtype of at least one given type or of every given topic type.
protected abstract  java.util.Collection<org.tmapi.core.Topic> doGetSubtypes(org.tmapi.core.Topic type)
          Returns all topic types being a subtype of the given topic type.
protected abstract  java.util.Collection<org.tmapi.core.Topic> doGetSupertypes()
          Returns all topic types being a supertype of a topic type contained by the topic map.
protected abstract  java.util.Collection<org.tmapi.core.Topic> doGetSupertypes(java.util.Collection<? extends org.tmapi.core.Topic> types, boolean all)
          Returns all topic types being a supertype of at least one given type or of every given topic type.
protected abstract  java.util.Collection<org.tmapi.core.Topic> doGetSupertypes(org.tmapi.core.Topic type)
          Returns all topic types being a supertype of the given topic type.If the type is null the method returns all topics which have no super-types.
 java.util.Collection<org.tmapi.core.Topic> getDirectSubtypes(org.tmapi.core.Topic type)
          
 java.util.Collection<org.tmapi.core.Topic> getDirectSupertypes(org.tmapi.core.Topic type)
          
 java.util.Collection<org.tmapi.core.Topic> getSubtypes()
          
 java.util.Collection<org.tmapi.core.Topic> getSubtypes(java.util.Collection<? extends org.tmapi.core.Topic> types)
          
 java.util.Collection<org.tmapi.core.Topic> getSubtypes(java.util.Collection<? extends org.tmapi.core.Topic> types, boolean all)
          
 java.util.Collection<org.tmapi.core.Topic> getSubtypes(org.tmapi.core.Topic... types)
          
 java.util.Collection<org.tmapi.core.Topic> getSubtypes(org.tmapi.core.Topic type)
          
 java.util.Collection<org.tmapi.core.Topic> getSupertypes()
          
 java.util.Collection<org.tmapi.core.Topic> getSupertypes(java.util.Collection<? extends org.tmapi.core.Topic> types)
          
 java.util.Collection<org.tmapi.core.Topic> getSupertypes(java.util.Collection<? extends org.tmapi.core.Topic> types, boolean all)
          
 java.util.Collection<org.tmapi.core.Topic> getSupertypes(org.tmapi.core.Topic... types)
          
 java.util.Collection<org.tmapi.core.Topic> getSupertypes(org.tmapi.core.Topic type)
          
 
Methods inherited from class de.topicmapslab.majortom.index.core.BaseCachedSupertypeSubtypeIndexImpl
cache, cache, cacheNumberOfConstructs, clear, clearCache, close, open, read, read, readNumberOfConstructs, topicMapChanged
 
Methods inherited from class de.topicmapslab.majortom.index.core.BaseCachedIndexImpl
isCachingEnabled, isOnTransactionContext, isOnTransactionContext, isOnTransactionContext, isOnTransactionContext, isOnTransactionContext
 
Methods inherited from class de.topicmapslab.majortom.index.IndexImpl
getTopicMapStore, isAutoUpdated, isOpen, reindex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.topicmapslab.majortom.model.index.IIndex
clear
 
Methods inherited from interface org.tmapi.index.Index
close, isAutoUpdated, isOpen, open, reindex
 

Constructor Detail

CachedSupertypeSubtypeIndexImpl

public CachedSupertypeSubtypeIndexImpl(T store)
constructor

Parameters:
store - the internal topic map store
Method Detail

getDirectSubtypes

public java.util.Collection<org.tmapi.core.Topic> getDirectSubtypes(org.tmapi.core.Topic type)

Specified by:
getDirectSubtypes in interface de.topicmapslab.majortom.model.index.ISupertypeSubtypeIndex

getDirectSupertypes

public java.util.Collection<org.tmapi.core.Topic> getDirectSupertypes(org.tmapi.core.Topic type)

Specified by:
getDirectSupertypes in interface de.topicmapslab.majortom.model.index.ISupertypeSubtypeIndex

getSubtypes

public java.util.Collection<org.tmapi.core.Topic> getSubtypes()

Specified by:
getSubtypes in interface de.topicmapslab.majortom.model.index.ISupertypeSubtypeIndex

getSubtypes

public java.util.Collection<org.tmapi.core.Topic> getSubtypes(org.tmapi.core.Topic type)

Specified by:
getSubtypes in interface de.topicmapslab.majortom.model.index.ISupertypeSubtypeIndex

getSubtypes

public java.util.Collection<org.tmapi.core.Topic> getSubtypes(org.tmapi.core.Topic... types)

Specified by:
getSubtypes in interface de.topicmapslab.majortom.model.index.ISupertypeSubtypeIndex

getSubtypes

public java.util.Collection<org.tmapi.core.Topic> getSubtypes(java.util.Collection<? extends org.tmapi.core.Topic> types)

Specified by:
getSubtypes in interface de.topicmapslab.majortom.model.index.ISupertypeSubtypeIndex

getSubtypes

public java.util.Collection<org.tmapi.core.Topic> getSubtypes(java.util.Collection<? extends org.tmapi.core.Topic> types,
                                                              boolean all)

Specified by:
getSubtypes in interface de.topicmapslab.majortom.model.index.ISupertypeSubtypeIndex

getSupertypes

public java.util.Collection<org.tmapi.core.Topic> getSupertypes()

Specified by:
getSupertypes in interface de.topicmapslab.majortom.model.index.ISupertypeSubtypeIndex

getSupertypes

public java.util.Collection<org.tmapi.core.Topic> getSupertypes(org.tmapi.core.Topic type)

Specified by:
getSupertypes in interface de.topicmapslab.majortom.model.index.ISupertypeSubtypeIndex

getSupertypes

public java.util.Collection<org.tmapi.core.Topic> getSupertypes(org.tmapi.core.Topic... types)

Specified by:
getSupertypes in interface de.topicmapslab.majortom.model.index.ISupertypeSubtypeIndex

getSupertypes

public java.util.Collection<org.tmapi.core.Topic> getSupertypes(java.util.Collection<? extends org.tmapi.core.Topic> types)

Specified by:
getSupertypes in interface de.topicmapslab.majortom.model.index.ISupertypeSubtypeIndex

getSupertypes

public java.util.Collection<org.tmapi.core.Topic> getSupertypes(java.util.Collection<? extends org.tmapi.core.Topic> types,
                                                                boolean all)

Specified by:
getSupertypes in interface de.topicmapslab.majortom.model.index.ISupertypeSubtypeIndex

doGetSupertypes

protected abstract java.util.Collection<org.tmapi.core.Topic> doGetSupertypes()
Returns all topic types being a supertype of a topic type contained by the topic map.

Returns:
a Collection of all supertypes within the given range

doGetSupertypes

protected abstract java.util.Collection<org.tmapi.core.Topic> doGetSupertypes(org.tmapi.core.Topic type)
Returns all topic types being a supertype of the given topic type.If the type is null the method returns all topics which have no super-types.

Parameters:
type - the topic type
Returns:
a Collection of all supertypes of the given type within the given range

doGetDirectSupertypes

protected abstract java.util.Collection<org.tmapi.core.Topic> doGetDirectSupertypes(org.tmapi.core.Topic type)
Returns all topic types being a direct supertype of the given topic type. If the type is null the method returns all topics which have no super-types.

Parameters:
type - the topic type
Returns:
a Collection of all supertypes of the given type within the given range

doGetSupertypes

protected abstract java.util.Collection<org.tmapi.core.Topic> doGetSupertypes(java.util.Collection<? extends org.tmapi.core.Topic> types,
                                                                              boolean all)
Returns all topic types being a supertype of at least one given type or of every given topic type.

Parameters:
types - the topic types
all - flag indicates if the found topic types should be an supertype of every given type
Returns:
a Collection of all supertypes of at least one of the given type within the given range

doGetSubtypes

protected abstract java.util.Collection<org.tmapi.core.Topic> doGetSubtypes()
Returns all topic types being a subtype of a topic type contained by the topic map.

Returns:
a Collection of all subtypes within the given range

doGetSubtypes

protected abstract java.util.Collection<org.tmapi.core.Topic> doGetSubtypes(org.tmapi.core.Topic type)
Returns all topic types being a subtype of the given topic type. If the type is null the method returns all topics which has no sub-types.

Parameters:
type - the topic type
Returns:
a Collection of all subtypes of the given type within the given range

doGetDirectSubtypes

protected abstract java.util.Collection<org.tmapi.core.Topic> doGetDirectSubtypes(org.tmapi.core.Topic type)
Returns all topic types being a direct subtype of the given topic type. If the type is null the method returns all topics which has no sub-types.

Parameters:
type - the topic type
Returns:
a Collection of all subtypes of the given type within the given range

doGetSubtypes

protected abstract java.util.Collection<org.tmapi.core.Topic> doGetSubtypes(java.util.Collection<? extends org.tmapi.core.Topic> types,
                                                                            boolean all)
Returns all topic types being a subtype of at least one given type or of every given topic type.

Parameters:
types - the topic types
all - flag indicates if the found topic types should be an subtype of every given type
Returns:
a Collection of all subtypes of at least one of the given type within the given range