net.ontopia.topicmaps.entry
Class StoreFactoryReference

java.lang.Object
  extended by net.ontopia.topicmaps.entry.AbstractTopicMapReference
      extended by net.ontopia.topicmaps.entry.StoreFactoryReference
All Implemented Interfaces:
TopicMapReferenceIF
Direct Known Subclasses:
DefaultTopicMapReference

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
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
StoreFactoryReference(java.lang.String id, java.lang.String title, TopicMapStoreFactoryIF sfactory)
           
StoreFactoryReference(java.lang.String id, java.lang.String title, TopicMapStoreFactoryIF sfactory_rw, TopicMapStoreFactoryIF sfactory_ro)
           
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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(java.lang.String id,
                             java.lang.String title,
                             TopicMapStoreFactoryIF sfactory)

StoreFactoryReference

public StoreFactoryReference(java.lang.String id,
                             java.lang.String title,
                             TopicMapStoreFactoryIF sfactory_rw,
                             TopicMapStoreFactoryIF sfactory_ro)
Method Detail

createStore

public TopicMapStoreIF createStore(boolean readonly)
                            throws java.io.IOException
Description copied from interface: TopicMapReferenceIF
PUBLIC: Creates a topic map store that lets you access the referenced topic map.

Specified by:
createStore in interface TopicMapReferenceIF
Specified by:
createStore in class AbstractTopicMapReference
Throws:
java.io.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 interface TopicMapReferenceIF
Overrides:
storeClosed in class AbstractTopicMapReference


Copyright © 2000-2012 Ontopia.