de.topicmapslab.majortom.redis.store.index
Class RedisSupertypeSubtypeIndex

java.lang.Object
  extended by de.topicmapslab.majortom.index.IndexImpl<RedisTopicMapStore>
      extended by de.topicmapslab.majortom.redis.store.index.RedisSupertypeSubtypeIndex
All Implemented Interfaces:
de.topicmapslab.majortom.model.index.IIndex, de.topicmapslab.majortom.model.index.ISupertypeSubtypeIndex, org.tmapi.index.Index

public class RedisSupertypeSubtypeIndex
extends IndexImpl<RedisTopicMapStore>
implements de.topicmapslab.majortom.model.index.ISupertypeSubtypeIndex


Field Summary
private  RedisHandler redis
           
 
Constructor Summary
RedisSupertypeSubtypeIndex(RedisTopicMapStore store)
          constructor
 
Method Summary
 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)
          
private  java.util.Collection<org.tmapi.core.Topic> getSubtypes(org.tmapi.core.Topic type, java.util.Set<org.tmapi.core.Topic> known)
          Utility method to handle traversal super-type-sub-type relation
 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)
          
private  java.util.Collection<org.tmapi.core.Topic> getSupertypes(org.tmapi.core.Topic type, java.util.Set<org.tmapi.core.Topic> known)
          Utility method to handle traversal super-type-sub-type relation
 
Methods inherited from class de.topicmapslab.majortom.index.IndexImpl
clear, close, getTopicMapStore, isAutoUpdated, isOpen, open, 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
 

Field Detail

redis

private RedisHandler redis
Constructor Detail

RedisSupertypeSubtypeIndex

public RedisSupertypeSubtypeIndex(RedisTopicMapStore store)
constructor

Parameters:
store - the redis topic map store
Method Detail

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

private java.util.Collection<org.tmapi.core.Topic> getSupertypes(org.tmapi.core.Topic type,
                                                                 java.util.Set<org.tmapi.core.Topic> known)
Utility method to handle traversal super-type-sub-type relation

Parameters:
type - the type
known - list known super types to avoid cycles
Returns:
the set of found super types

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

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

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

private java.util.Collection<org.tmapi.core.Topic> getSubtypes(org.tmapi.core.Topic type,
                                                               java.util.Set<org.tmapi.core.Topic> known)
Utility method to handle traversal super-type-sub-type relation

Parameters:
type - the type
known - list known sub types to avoid cycles
Returns:
the set of found sub types

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

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