Package net.ontopia.topicmaps.entry
Class StoreFactoryReference
- java.lang.Object
-
- net.ontopia.topicmaps.entry.AbstractTopicMapReference
-
- net.ontopia.topicmaps.entry.StoreFactoryReference
-
- All Implemented Interfaces:
AutoCloseable
,TopicMapReferenceIF
public class StoreFactoryReference extends AbstractTopicMapReference
INTERNAL: A topic map reference that uses a topic map store factory to create stores. To create a reference for an in-memory topic map wrap it in the SameStoreFactory.- Since:
- 1.3.2
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
deref_on_close
protected TopicMapStoreFactoryIF
sfactory_ro
protected TopicMapStoreFactoryIF
sfactory_rw
-
Fields inherited from class net.ontopia.topicmaps.entry.AbstractTopicMapReference
deleted, id, isopen, listeners, source, title, topic_listeners
-
-
Constructor Summary
Constructors Constructor Description StoreFactoryReference(String id, String title, TopicMapStoreFactoryIF sfactory)
StoreFactoryReference(String id, String title, TopicMapStoreFactoryIF sfactory_rw, TopicMapStoreFactoryIF sfactory_ro)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TopicMapStoreIF
createStore(boolean readonly)
PUBLIC: Creates a topic map store that lets you access the referenced topic map.boolean
getDereferenceOnClose()
INTERNAL: Returns the flag that specifies if the reference should deregister itself from the topic map source when the referenced store is being closed.void
setDereferenceOnClose(boolean deref_on_close)
INTERNAL: Sets the dereference on close flag.void
storeClosed(TopicMapStoreIF store)
INTERNAL: Callback from the specified TopicMapStoreIF after it has been closed.-
Methods inherited from class net.ontopia.topicmaps.entry.AbstractTopicMapReference
addTopicListener, clear, close, delete, getId, getSource, getTitle, getTopicListeners, isDeleted, isOpen, makeListenerArray, open, registerTopicListeners, removeTopicListener, setId, setSource, setTitle, setTopicListeners
-
-
-
-
Field Detail
-
sfactory_rw
protected TopicMapStoreFactoryIF sfactory_rw
-
sfactory_ro
protected TopicMapStoreFactoryIF sfactory_ro
-
deref_on_close
protected boolean deref_on_close
-
-
Constructor Detail
-
StoreFactoryReference
public StoreFactoryReference(String id, String title, TopicMapStoreFactoryIF sfactory)
-
StoreFactoryReference
public StoreFactoryReference(String id, String title, TopicMapStoreFactoryIF sfactory_rw, TopicMapStoreFactoryIF sfactory_ro)
-
-
Method Detail
-
createStore
public TopicMapStoreIF createStore(boolean readonly) throws IOException
Description copied from interface:TopicMapReferenceIF
PUBLIC: Creates a topic map store that lets you access the referenced topic map.- Specified by:
createStore
in interfaceTopicMapReferenceIF
- Specified by:
createStore
in classAbstractTopicMapReference
- Throws:
IOException
-
getDereferenceOnClose
public boolean getDereferenceOnClose()
INTERNAL: Returns the flag that specifies if the reference should deregister itself from the topic map source when the referenced store is being closed. Default: true.Note that this only works when the source is of type DefaultTopicMapSource.
-
setDereferenceOnClose
public void setDereferenceOnClose(boolean deref_on_close)
INTERNAL: Sets the dereference on close flag.
-
storeClosed
public void storeClosed(TopicMapStoreIF store)
Description copied from interface:TopicMapReferenceIF
INTERNAL: Callback from the specified TopicMapStoreIF after it has been closed. Warning: Intended for internal use only.- Specified by:
storeClosed
in interfaceTopicMapReferenceIF
- Overrides:
storeClosed
in classAbstractTopicMapReference
-
-