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
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
FieldsModifier and TypeFieldDescriptionprotected booleanprotected TopicMapStoreFactoryIFprotected TopicMapStoreFactoryIFFields inherited from class net.ontopia.topicmaps.entry.AbstractTopicMapReference
deleted, id, isopen, listeners, source, title, topic_listeners -
Constructor Summary
ConstructorsConstructorDescriptionStoreFactoryReference(String id, String title, TopicMapStoreFactoryIF sfactory) StoreFactoryReference(String id, String title, TopicMapStoreFactoryIF sfactory_rw, TopicMapStoreFactoryIF sfactory_ro) -
Method Summary
Modifier and TypeMethodDescriptioncreateStore(boolean readonly) PUBLIC: Creates a topic map store that lets you access the referenced topic map.booleanINTERNAL: Returns the flag that specifies if the reference should deregister itself from the topic map source when the referenced store is being closed.voidsetDereferenceOnClose(boolean deref_on_close) INTERNAL: Sets the dereference on close flag.voidstoreClosed(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 Details
-
sfactory_rw
-
sfactory_ro
-
deref_on_close
protected boolean deref_on_close
-
-
Constructor Details
-
StoreFactoryReference
-
StoreFactoryReference
public StoreFactoryReference(String id, String title, TopicMapStoreFactoryIF sfactory_rw, TopicMapStoreFactoryIF sfactory_ro)
-
-
Method Details
-
createStore
Description copied from interface:TopicMapReferenceIFPUBLIC: Creates a topic map store that lets you access the referenced topic map.- Specified by:
createStorein interfaceTopicMapReferenceIF- Specified by:
createStorein 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
Description copied from interface:TopicMapReferenceIFINTERNAL: Callback from the specified TopicMapStoreIF after it has been closed. Warning: Intended for internal use only.- Specified by:
storeClosedin interfaceTopicMapReferenceIF- Overrides:
storeClosedin classAbstractTopicMapReference
-