de.topicmapslab.majortom.database.jdbc.index
Class JdbcTransitiveTypeInstanceIndex

java.lang.Object
  extended by de.topicmapslab.majortom.index.IndexImpl<T>
      extended by de.topicmapslab.majortom.index.core.BaseCachedIndexImpl<E>
          extended by de.topicmapslab.majortom.index.core.BaseCachedTypeInstanceIndexImpl<E>
              extended by de.topicmapslab.majortom.index.nonpaged.CachedTypeInstanceIndexImpl<JdbcTopicMapStore>
                  extended by de.topicmapslab.majortom.database.jdbc.index.JdbcTransitiveTypeInstanceIndex
All Implemented Interfaces:
de.topicmapslab.majortom.model.event.ITopicMapListener, de.topicmapslab.majortom.model.index.IIndex, de.topicmapslab.majortom.model.index.ITransitiveTypeInstanceIndex, de.topicmapslab.majortom.model.index.ITypeInstanceIndex, org.tmapi.index.Index, org.tmapi.index.TypeInstanceIndex

public class JdbcTransitiveTypeInstanceIndex
extends CachedTypeInstanceIndexImpl<JdbcTopicMapStore>
implements de.topicmapslab.majortom.model.index.ITransitiveTypeInstanceIndex

Author:
Sven Krosse

Constructor Summary
JdbcTransitiveTypeInstanceIndex(JdbcTopicMapStore store)
           
 
Method Summary
 java.util.Collection<org.tmapi.core.Association> doGetAssociations(java.util.Collection<? extends org.tmapi.core.Topic> types)
          Returns all association items typed by one of the given types.
 java.util.Collection<org.tmapi.core.Association> doGetAssociations(org.tmapi.core.Topic type)
          Return all associations of the given type within the given range
 java.util.Collection<org.tmapi.core.Topic> doGetAssociationTypes()
          Returns all association types of the topic map.
 java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> doGetCharacteristics(java.util.Collection<? extends org.tmapi.core.Topic> types)
          Returns all characteristics typed by one of given types.
 java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> doGetCharacteristics(org.tmapi.core.Topic type)
          Returns all characteristics being typed by the given of topic type.
 java.util.Collection<org.tmapi.core.Topic> doGetCharacteristicTypes()
          Returns all characteristic types contained by the topic map.
 java.util.Collection<org.tmapi.core.Name> doGetNames(java.util.Collection<? extends org.tmapi.core.Topic> types)
          Returns all names typed by one of the given types.
 java.util.Collection<org.tmapi.core.Name> doGetNames(org.tmapi.core.Topic type)
          Return all names of the given type within the given range.
 java.util.Collection<org.tmapi.core.Topic> doGetNameTypes()
          Return all name types of the topic map within the given range.
 java.util.Collection<org.tmapi.core.Occurrence> doGetOccurrences(java.util.Collection<? extends org.tmapi.core.Topic> types)
          Returns all occurrences typed by one of the given types.
 java.util.Collection<org.tmapi.core.Occurrence> doGetOccurrences(org.tmapi.core.Topic type)
          Return all occurrences of the given type within the given range.
 java.util.Collection<org.tmapi.core.Topic> doGetOccurrenceTypes()
          Return all occurrence types of the topic map within the given range.
 java.util.Collection<org.tmapi.core.Role> doGetRoles(java.util.Collection<? extends org.tmapi.core.Topic> types)
          Returns all association roles typed by one of the given types.
 java.util.Collection<org.tmapi.core.Role> doGetRoles(org.tmapi.core.Topic type)
          Return all roles of the given type within the given range.
 java.util.Collection<org.tmapi.core.Topic> doGetRoleTypes()
          Return all role types of the topic map within the given range.
 java.util.Collection<org.tmapi.core.Topic> doGetTopics(java.util.Collection<org.tmapi.core.Topic> types, boolean all)
          Returns all instances of at least one given type or of every given topic type.
 java.util.Collection<org.tmapi.core.Topic> doGetTopics(org.tmapi.core.Topic type)
          Returns all topic instances of the given topic type within the given range.
 java.util.Collection<org.tmapi.core.Topic> doGetTopicTypes()
          Returns all topic types of the topic map.
 java.util.Collection<org.tmapi.core.Association> getAssociations(org.tmapi.core.Topic... types)
          
 java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getCharacteristics(org.tmapi.core.Topic... types)
          
 java.util.Collection<org.tmapi.core.Name> getNames(org.tmapi.core.Topic... types)
          
 java.util.Collection<org.tmapi.core.Occurrence> getOccurrences(org.tmapi.core.Topic... types)
          
 java.util.Collection<org.tmapi.core.Role> getRoles(org.tmapi.core.Topic... types)
          
 java.util.Collection<org.tmapi.core.Topic> getTopics(java.util.Collection<org.tmapi.core.Topic> types)
          
 java.util.Collection<org.tmapi.core.Topic> getTopics(org.tmapi.core.Topic... types)
          
 java.util.Collection<org.tmapi.core.Topic> getTopics(org.tmapi.core.Topic[] types, boolean all)
          
 void topicMapChanged(java.lang.String id, de.topicmapslab.majortom.model.event.TopicMapEventType event, org.tmapi.core.Construct notifier, java.lang.Object newValue, java.lang.Object oldValue)
          
 
Methods inherited from class de.topicmapslab.majortom.index.nonpaged.CachedTypeInstanceIndexImpl
getAssociations, getAssociations, getAssociationTypes, getCharacteristics, getCharacteristics, getCharacteristicTypes, getNames, getNames, getNameTypes, getOccurrences, getOccurrences, getOccurrenceTypes, getRoles, getRoles, getRoleTypes, getTopics, getTopics, getTopicTypes
 
Methods inherited from class de.topicmapslab.majortom.index.core.BaseCachedTypeInstanceIndexImpl
cache, cache, cache, cache, cacheNumberOfConstructs, clear, clearCache, clearDependentCache, close, open, read, read, read, read, readNumberOfConstructs
 
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.ITypeInstanceIndex
getAssociations, getCharacteristics, getCharacteristics, getCharacteristicTypes, getNames, getOccurrences, getRoles, getTopics
 
Methods inherited from interface org.tmapi.index.TypeInstanceIndex
getAssociations, getAssociationTypes, getNames, getNameTypes, getOccurrences, getOccurrenceTypes, getRoles, getRoleTypes, getTopics, getTopicTypes
 
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

JdbcTransitiveTypeInstanceIndex

public JdbcTransitiveTypeInstanceIndex(JdbcTopicMapStore store)
Parameters:
store -
Method Detail

getAssociations

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

Specified by:
getAssociations in interface de.topicmapslab.majortom.model.index.ITypeInstanceIndex
Overrides:
getAssociations in class CachedTypeInstanceIndexImpl<JdbcTopicMapStore>

doGetAssociations

public java.util.Collection<org.tmapi.core.Association> doGetAssociations(java.util.Collection<? extends org.tmapi.core.Topic> types)
Returns all association items typed by one of the given types.

Specified by:
doGetAssociations in class CachedTypeInstanceIndexImpl<JdbcTopicMapStore>
Parameters:
types - the topic types
Returns:
a Collection of all association items typed by one of the given types within the given range

doGetCharacteristicTypes

public java.util.Collection<org.tmapi.core.Topic> doGetCharacteristicTypes()
Returns all characteristic types contained by the topic map.

Specified by:
doGetCharacteristicTypes in class CachedTypeInstanceIndexImpl<JdbcTopicMapStore>
Returns:
a Collection of all types within the given range

doGetCharacteristics

public java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> doGetCharacteristics(org.tmapi.core.Topic type)
Returns all characteristics being typed by the given of topic type.

Specified by:
doGetCharacteristics in class CachedTypeInstanceIndexImpl<JdbcTopicMapStore>
Parameters:
type - the topic type
Returns:
a Collection of all characteristics typed by the given type within the given range

getCharacteristics

public java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> getCharacteristics(org.tmapi.core.Topic... types)

Specified by:
getCharacteristics in interface de.topicmapslab.majortom.model.index.ITypeInstanceIndex
Overrides:
getCharacteristics in class CachedTypeInstanceIndexImpl<JdbcTopicMapStore>

doGetCharacteristics

public java.util.Collection<de.topicmapslab.majortom.model.core.ICharacteristics> doGetCharacteristics(java.util.Collection<? extends org.tmapi.core.Topic> types)
Returns all characteristics typed by one of given types.

Specified by:
doGetCharacteristics in class CachedTypeInstanceIndexImpl<JdbcTopicMapStore>
Parameters:
types - the topic types
Returns:
a Collection of all characteristics typed by one of the given types within the given range

getNames

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

Specified by:
getNames in interface de.topicmapslab.majortom.model.index.ITypeInstanceIndex
Overrides:
getNames in class CachedTypeInstanceIndexImpl<JdbcTopicMapStore>

doGetNames

public java.util.Collection<org.tmapi.core.Name> doGetNames(java.util.Collection<? extends org.tmapi.core.Topic> types)
Returns all names typed by one of the given types.

Specified by:
doGetNames in class CachedTypeInstanceIndexImpl<JdbcTopicMapStore>
Parameters:
types - the topic types
Returns:
a Collection of all names typed by one of the given types within the given range

getOccurrences

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

Specified by:
getOccurrences in interface de.topicmapslab.majortom.model.index.ITypeInstanceIndex
Overrides:
getOccurrences in class CachedTypeInstanceIndexImpl<JdbcTopicMapStore>

doGetOccurrences

public java.util.Collection<org.tmapi.core.Occurrence> doGetOccurrences(java.util.Collection<? extends org.tmapi.core.Topic> types)
Returns all occurrences typed by one of the given types.

Specified by:
doGetOccurrences in class CachedTypeInstanceIndexImpl<JdbcTopicMapStore>
Parameters:
types - the topic types
Returns:
a Collection of all occurrences typed by one of the given types within the given range

getRoles

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

Specified by:
getRoles in interface de.topicmapslab.majortom.model.index.ITypeInstanceIndex
Overrides:
getRoles in class CachedTypeInstanceIndexImpl<JdbcTopicMapStore>

doGetRoles

public java.util.Collection<org.tmapi.core.Role> doGetRoles(java.util.Collection<? extends org.tmapi.core.Topic> types)
Returns all association roles typed by one of the given types.

Specified by:
doGetRoles in class CachedTypeInstanceIndexImpl<JdbcTopicMapStore>
Parameters:
types - the topic types
Returns:
a Collection of all association roles typed by one of the given types within the given range

getTopics

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

Specified by:
getTopics in interface de.topicmapslab.majortom.model.index.ITypeInstanceIndex
Overrides:
getTopics in class CachedTypeInstanceIndexImpl<JdbcTopicMapStore>

getTopics

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

Specified by:
getTopics in interface de.topicmapslab.majortom.model.index.ITypeInstanceIndex
Overrides:
getTopics in class CachedTypeInstanceIndexImpl<JdbcTopicMapStore>

doGetTopics

public java.util.Collection<org.tmapi.core.Topic> doGetTopics(java.util.Collection<org.tmapi.core.Topic> types,
                                                              boolean all)
Returns all instances of at least one given type or of every given topic type.

Specified by:
doGetTopics in class CachedTypeInstanceIndexImpl<JdbcTopicMapStore>
Parameters:
types - the topic types
all - flag indicates if the found instances should be typed by every given type
Returns:
a Collection of all instances typed by at least one or every of the given types within the given range

doGetAssociationTypes

public java.util.Collection<org.tmapi.core.Topic> doGetAssociationTypes()
Returns all association types of the topic map.

Specified by:
doGetAssociationTypes in class CachedTypeInstanceIndexImpl<JdbcTopicMapStore>
Returns:
the association types within the given range

doGetAssociations

public java.util.Collection<org.tmapi.core.Association> doGetAssociations(org.tmapi.core.Topic type)
Return all associations of the given type within the given range

Specified by:
doGetAssociations in class CachedTypeInstanceIndexImpl<JdbcTopicMapStore>
Parameters:
type - the type
Returns:
all associations of the type within the given range

doGetNameTypes

public java.util.Collection<org.tmapi.core.Topic> doGetNameTypes()
Return all name types of the topic map within the given range.

Specified by:
doGetNameTypes in class CachedTypeInstanceIndexImpl<JdbcTopicMapStore>
Returns:
all name types within the given range

doGetNames

public java.util.Collection<org.tmapi.core.Name> doGetNames(org.tmapi.core.Topic type)
Return all names of the given type within the given range.

Specified by:
doGetNames in class CachedTypeInstanceIndexImpl<JdbcTopicMapStore>
Parameters:
type - the type
Returns:
all names of the given type within the given range.

doGetOccurrenceTypes

public java.util.Collection<org.tmapi.core.Topic> doGetOccurrenceTypes()
Return all occurrence types of the topic map within the given range.

Specified by:
doGetOccurrenceTypes in class CachedTypeInstanceIndexImpl<JdbcTopicMapStore>
Returns:
all occurrence types within the given range

doGetOccurrences

public java.util.Collection<org.tmapi.core.Occurrence> doGetOccurrences(org.tmapi.core.Topic type)
Return all occurrences of the given type within the given range.

Specified by:
doGetOccurrences in class CachedTypeInstanceIndexImpl<JdbcTopicMapStore>
Parameters:
type - the type
Returns:
all occurrences of the given type within the given range.

doGetRoleTypes

public java.util.Collection<org.tmapi.core.Topic> doGetRoleTypes()
Return all role types of the topic map within the given range.

Specified by:
doGetRoleTypes in class CachedTypeInstanceIndexImpl<JdbcTopicMapStore>
Returns:
all role types of the topic map within the given range.

doGetRoles

public java.util.Collection<org.tmapi.core.Role> doGetRoles(org.tmapi.core.Topic type)
Return all roles of the given type within the given range.

Specified by:
doGetRoles in class CachedTypeInstanceIndexImpl<JdbcTopicMapStore>
Parameters:
type - the role type
Returns:
all roles of the given type within the given range

doGetTopicTypes

public java.util.Collection<org.tmapi.core.Topic> doGetTopicTypes()
Returns all topic types of the topic map.

Specified by:
doGetTopicTypes in class CachedTypeInstanceIndexImpl<JdbcTopicMapStore>
Returns:
the topic types within the given range

doGetTopics

public java.util.Collection<org.tmapi.core.Topic> doGetTopics(org.tmapi.core.Topic type)
Returns all topic instances of the given topic type within the given range.

Specified by:
doGetTopics in class CachedTypeInstanceIndexImpl<JdbcTopicMapStore>
Parameters:
type - the type
Returns:
the topic within the given range

getTopics

public java.util.Collection<org.tmapi.core.Topic> getTopics(org.tmapi.core.Topic[] types,
                                                            boolean all)

Specified by:
getTopics in interface org.tmapi.index.TypeInstanceIndex
Overrides:
getTopics in class CachedTypeInstanceIndexImpl<JdbcTopicMapStore>

topicMapChanged

public void topicMapChanged(java.lang.String id,
                            de.topicmapslab.majortom.model.event.TopicMapEventType event,
                            org.tmapi.core.Construct notifier,
                            java.lang.Object newValue,
                            java.lang.Object oldValue)

Specified by:
topicMapChanged in interface de.topicmapslab.majortom.model.event.ITopicMapListener
Overrides:
topicMapChanged in class BaseCachedTypeInstanceIndexImpl<JdbcTopicMapStore>