Package net.ontopia.topicmaps.impl.rdbms
Class RDBMSTopicMapReference
- java.lang.Object
-
- net.ontopia.topicmaps.entry.AbstractTopicMapReference
-
- net.ontopia.topicmaps.impl.rdbms.RDBMSTopicMapReference
-
- All Implemented Interfaces:
AutoCloseable
,TopicMapReferenceIF
public class RDBMSTopicMapReference extends AbstractTopicMapReference
INTERNAL: RDBMS database topic map reference.
-
-
Field Summary
Fields Modifier and Type Field Description protected LocatorIF
base_address
static String
EXHAUSED_BLOCK
static String
EXHAUSED_FAIL
static String
EXHAUSED_GROW
protected StorePoolableObjectFactory
ofactory
protected org.apache.commons.pool2.impl.GenericObjectPool
pool
protected RDBMSTopicMapStore
rostore
protected StorageIF
storage
protected long
topicmap_id
-
Fields inherited from class net.ontopia.topicmaps.entry.AbstractTopicMapReference
deleted, id, isopen, listeners, source, title, topic_listeners
-
-
Constructor Summary
Constructors Constructor Description RDBMSTopicMapReference(String _id, String _title, StorageIF _storage, long _topicmap_id, LocatorIF _base_address)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected RDBMSTopicMapStore
_createStore(boolean readonly)
void
clear()
EXPERIMENTAL: Closes all open stores and clears the topic map by removing all data.void
close()
PUBLIC: Closes all open stores and the reference itself.TopicMapStoreIF
createStore(boolean readonly)
PUBLIC: Creates a topic map store that lets you access the referenced topic map.void
delete()
PUBLIC: Closes all open stores and deletes the topic map.LocatorIF
getBaseAddress()
INTERNAL: Returns the base address locator to be used when loading the topic map.long
getTopicMapId()
protected void
init()
void
open()
PUBLIC: Opens the reference.void
setBaseAddress(LocatorIF base_address)
INTERNAL: Sets the base address locator to be used when loading the topic map and persists it in the database.void
setTitle(String title)
PUBLIC: Sets the title of the reference.void
storeClosed(TopicMapStoreIF store)
INTERNAL: Callback from the specified TopicMapStoreIF after it has been closed.String
toString()
void
writeReport(Writer out, boolean dumpCaches)
-
Methods inherited from class net.ontopia.topicmaps.entry.AbstractTopicMapReference
addTopicListener, getId, getSource, getTitle, getTopicListeners, isDeleted, isOpen, makeListenerArray, registerTopicListeners, removeTopicListener, setId, setSource, setTopicListeners
-
-
-
-
Field Detail
-
EXHAUSED_BLOCK
public static final String EXHAUSED_BLOCK
- See Also:
- Constant Field Values
-
EXHAUSED_GROW
public static final String EXHAUSED_GROW
- See Also:
- Constant Field Values
-
EXHAUSED_FAIL
public static final String EXHAUSED_FAIL
- See Also:
- Constant Field Values
-
storage
protected StorageIF storage
-
topicmap_id
protected long topicmap_id
-
base_address
protected LocatorIF base_address
-
ofactory
protected StorePoolableObjectFactory ofactory
-
pool
protected org.apache.commons.pool2.impl.GenericObjectPool pool
-
rostore
protected RDBMSTopicMapStore rostore
-
-
Method Detail
-
_createStore
protected RDBMSTopicMapStore _createStore(boolean readonly)
-
init
protected void init()
-
open
public void open()
Description copied from interface:TopicMapReferenceIF
PUBLIC: Opens the reference.- Specified by:
open
in interfaceTopicMapReferenceIF
- Overrides:
open
in classAbstractTopicMapReference
-
createStore
public TopicMapStoreIF createStore(boolean readonly)
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
-
setTitle
public void setTitle(String title)
Description copied from interface:TopicMapReferenceIF
PUBLIC: Sets the title of the reference.- Specified by:
setTitle
in interfaceTopicMapReferenceIF
- Overrides:
setTitle
in classAbstractTopicMapReference
-
getBaseAddress
public LocatorIF getBaseAddress()
INTERNAL: Returns the base address locator to be used when loading the topic map.
-
setBaseAddress
public void setBaseAddress(LocatorIF base_address)
INTERNAL: Sets the base address locator to be used when loading the topic map and persists it in the database.
-
close
public void close()
Description copied from interface:TopicMapReferenceIF
PUBLIC: Closes all open stores and the reference itself. Note that topic map stores created through this reference are closed and dereferenced when the reference is closed. The reference can be reopened after it has been closed.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceTopicMapReferenceIF
- Overrides:
close
in classAbstractTopicMapReference
-
clear
public void clear()
Description copied from interface:TopicMapReferenceIF
EXPERIMENTAL: Closes all open stores and clears the topic map by removing all data. The reference is closed before the topic map is deleted. The reference can be reopened after the topic map has been deleted.- Specified by:
clear
in interfaceTopicMapReferenceIF
- Overrides:
clear
in classAbstractTopicMapReference
-
delete
public void delete()
Description copied from interface:TopicMapReferenceIF
PUBLIC: Closes all open stores and deletes the topic map. The reference is closed before the topic map is deleted. The reference cannot be reopened after the topic map has been deleted.- Specified by:
delete
in interfaceTopicMapReferenceIF
- Overrides:
delete
in classAbstractTopicMapReference
-
getTopicMapId
public long getTopicMapId()
-
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
-
writeReport
public void writeReport(Writer out, boolean dumpCaches) throws IOException
- Throws:
IOException
-
-