Package net.ontopia.topicmaps.impl.basic
Class SubjectIdentityCache
- java.lang.Object
-
- net.ontopia.topicmaps.impl.utils.AbstractSubjectIdentityCache
-
- net.ontopia.topicmaps.impl.basic.SubjectIdentityCache
-
- All Implemented Interfaces:
Serializable
,EventListenerIF
public class SubjectIdentityCache extends AbstractSubjectIdentityCache implements Serializable
INTERNAL: Class that maintains indexes for use with the TopicMapIF locator lookup methods. This is especially useful in the cases where the topic map object cannot use queries to do the lookups. This class uses the event model to maintain its indexes.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.ontopia.topicmaps.impl.utils.AbstractSubjectIdentityCache
AbstractSubjectIdentityCache.EventHandler
-
-
Field Summary
Fields Modifier and Type Field Description protected CollectionFactoryIF
cfactory
protected long
counter
protected Map<String,TMObject>
id_objects
protected Map<LocatorIF,TMObjectIF>
source_locators
protected Map<LocatorIF,TopicIF>
subject_indicators
protected Map<LocatorIF,TopicIF>
subjects
protected TopicMapTransactionIF
txn
-
Fields inherited from class net.ontopia.topicmaps.impl.utils.AbstractSubjectIdentityCache
handlers
-
-
Constructor Summary
Constructors Constructor Description SubjectIdentityCache(TopicMapTransactionIF txn, CollectionFactoryIF cfactory)
-
Method Summary
-
Methods inherited from class net.ontopia.topicmaps.impl.utils.AbstractSubjectIdentityCache
processEvent, registerListeners
-
-
-
-
Field Detail
-
txn
protected TopicMapTransactionIF txn
-
cfactory
protected CollectionFactoryIF cfactory
-
counter
protected long counter
-
source_locators
protected Map<LocatorIF,TMObjectIF> source_locators
-
-
Constructor Detail
-
SubjectIdentityCache
public SubjectIdentityCache(TopicMapTransactionIF txn, CollectionFactoryIF cfactory)
-
-
Method Detail
-
refresh
public void refresh()
-
getObjectById
public TMObjectIF getObjectById(String object_id)
- Specified by:
getObjectById
in classAbstractSubjectIdentityCache
-
getObjectByItemIdentifier
public TMObjectIF getObjectByItemIdentifier(LocatorIF locator)
- Specified by:
getObjectByItemIdentifier
in classAbstractSubjectIdentityCache
-
getTopicBySubjectLocator
public TopicIF getTopicBySubjectLocator(LocatorIF locator)
- Specified by:
getTopicBySubjectLocator
in classAbstractSubjectIdentityCache
-
getTopicBySubjectIdentifier
public TopicIF getTopicBySubjectIdentifier(LocatorIF locator)
- Specified by:
getTopicBySubjectIdentifier
in classAbstractSubjectIdentityCache
-
getItemIdentifiers
public Collection<LocatorIF> getItemIdentifiers()
-
getSubjectIdentifiers
public Collection<LocatorIF> getSubjectIdentifiers()
-
_getObjectByItemIdentifier
protected TMObjectIF _getObjectByItemIdentifier(LocatorIF source_locator)
- Specified by:
_getObjectByItemIdentifier
in classAbstractSubjectIdentityCache
-
registerSourceLocator
protected void registerSourceLocator(LocatorIF source_locator, TMObjectIF object)
- Specified by:
registerSourceLocator
in classAbstractSubjectIdentityCache
-
unregisterSourceLocator
protected void unregisterSourceLocator(LocatorIF source_locator)
- Specified by:
unregisterSourceLocator
in classAbstractSubjectIdentityCache
-
_getTopicBySubjectIdentifier
protected TopicIF _getTopicBySubjectIdentifier(LocatorIF subject_indicator)
- Specified by:
_getTopicBySubjectIdentifier
in classAbstractSubjectIdentityCache
-
registerSubjectIndicator
protected void registerSubjectIndicator(LocatorIF subject_indicator, TopicIF object)
- Specified by:
registerSubjectIndicator
in classAbstractSubjectIdentityCache
-
unregisterSubjectIndicator
protected void unregisterSubjectIndicator(LocatorIF subject_indicator)
- Specified by:
unregisterSubjectIndicator
in classAbstractSubjectIdentityCache
-
_getTopicBySubjectLocator
protected TopicIF _getTopicBySubjectLocator(LocatorIF subject)
- Specified by:
_getTopicBySubjectLocator
in classAbstractSubjectIdentityCache
-
registerSubject
protected void registerSubject(LocatorIF subject, TopicIF object)
- Specified by:
registerSubject
in classAbstractSubjectIdentityCache
-
unregisterSubject
protected void unregisterSubject(LocatorIF subject)
- Specified by:
unregisterSubject
in classAbstractSubjectIdentityCache
-
registerObject
protected void registerObject(TMObjectIF o)
INTERNAL: Register the object with the identity map.- Overrides:
registerObject
in classAbstractSubjectIdentityCache
-
unregisterObject
protected void unregisterObject(TMObjectIF o)
INTERNAL: Unregister the object with the identity map.- Overrides:
unregisterObject
in classAbstractSubjectIdentityCache
-
-