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 CollectionFactoryIFcfactoryprotected longcounterprotected Map<String,TMObject>id_objectsprotected Map<LocatorIF,TMObjectIF>source_locatorsprotected Map<LocatorIF,TopicIF>subject_indicatorsprotected Map<LocatorIF,TopicIF>subjectsprotected TopicMapTransactionIFtxn-
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:
getObjectByIdin classAbstractSubjectIdentityCache
-
getObjectByItemIdentifier
public TMObjectIF getObjectByItemIdentifier(LocatorIF locator)
- Specified by:
getObjectByItemIdentifierin classAbstractSubjectIdentityCache
-
getTopicBySubjectLocator
public TopicIF getTopicBySubjectLocator(LocatorIF locator)
- Specified by:
getTopicBySubjectLocatorin classAbstractSubjectIdentityCache
-
getTopicBySubjectIdentifier
public TopicIF getTopicBySubjectIdentifier(LocatorIF locator)
- Specified by:
getTopicBySubjectIdentifierin classAbstractSubjectIdentityCache
-
getItemIdentifiers
public Collection<LocatorIF> getItemIdentifiers()
-
getSubjectIdentifiers
public Collection<LocatorIF> getSubjectIdentifiers()
-
_getObjectByItemIdentifier
protected TMObjectIF _getObjectByItemIdentifier(LocatorIF source_locator)
- Specified by:
_getObjectByItemIdentifierin classAbstractSubjectIdentityCache
-
registerSourceLocator
protected void registerSourceLocator(LocatorIF source_locator, TMObjectIF object)
- Specified by:
registerSourceLocatorin classAbstractSubjectIdentityCache
-
unregisterSourceLocator
protected void unregisterSourceLocator(LocatorIF source_locator)
- Specified by:
unregisterSourceLocatorin classAbstractSubjectIdentityCache
-
_getTopicBySubjectIdentifier
protected TopicIF _getTopicBySubjectIdentifier(LocatorIF subject_indicator)
- Specified by:
_getTopicBySubjectIdentifierin classAbstractSubjectIdentityCache
-
registerSubjectIndicator
protected void registerSubjectIndicator(LocatorIF subject_indicator, TopicIF object)
- Specified by:
registerSubjectIndicatorin classAbstractSubjectIdentityCache
-
unregisterSubjectIndicator
protected void unregisterSubjectIndicator(LocatorIF subject_indicator)
- Specified by:
unregisterSubjectIndicatorin classAbstractSubjectIdentityCache
-
_getTopicBySubjectLocator
protected TopicIF _getTopicBySubjectLocator(LocatorIF subject)
- Specified by:
_getTopicBySubjectLocatorin classAbstractSubjectIdentityCache
-
registerSubject
protected void registerSubject(LocatorIF subject, TopicIF object)
- Specified by:
registerSubjectin classAbstractSubjectIdentityCache
-
unregisterSubject
protected void unregisterSubject(LocatorIF subject)
- Specified by:
unregisterSubjectin classAbstractSubjectIdentityCache
-
registerObject
protected void registerObject(TMObjectIF o)
INTERNAL: Register the object with the identity map.- Overrides:
registerObjectin classAbstractSubjectIdentityCache
-
unregisterObject
protected void unregisterObject(TMObjectIF o)
INTERNAL: Unregister the object with the identity map.- Overrides:
unregisterObjectin classAbstractSubjectIdentityCache
-
-