Package net.ontopia.topicmaps.entry
Class AbstractTopicMapReference
java.lang.Object
net.ontopia.topicmaps.entry.AbstractTopicMapReference
- All Implemented Interfaces:
AutoCloseable,TopicMapReferenceIF
- Direct Known Subclasses:
AbstractURLTopicMapReference,MergeReference,RDBMSTopicMapReference,StoreFactoryReference
INTERNAL: An abstract topic map reference class that contains
methods that handles the id and title properties. Subclasses should
implement the createStore method.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected Stringprotected booleanprotected List<TopicMapListenerIF>protected TopicMapSourceIFprotected Stringprotected TopicMapListenerIF[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTopicListener(TopicMapListenerIF listener) INTERNAL: Add topic listener to reference.voidclear()EXPERIMENTAL: Closes all open stores and clears the topic map by removing all data.voidclose()PUBLIC: Closes all open stores and the reference itself.abstract TopicMapStoreIFcreateStore(boolean readonly) PUBLIC: Creates a topic map store that lets you access the referenced topic map.voiddelete()PUBLIC: Closes all open stores and deletes the topic map.getId()PUBLIC: Gets the id of the reference.PUBLIC: Gets the source to which the reference belongs.getTitle()PUBLIC: Gets the title of the reference.protected TopicMapListenerIF[]booleanPUBLIC: Returns true if the topic map has been deleted.booleanisOpen()PUBLIC: Returns true if the reference is open.protected voidvoidopen()PUBLIC: Opens the reference.voidregisterTopicListeners(String listenerList) INTERNAL: Register topic listener from list of listener implementations.voidremoveTopicListener(TopicMapListenerIF listener) INTERNAL: Remove topic listener from reference.voidINTERNAL: Sets the id of the reference.voidsetSource(TopicMapSourceIF source) PUBLIC: Sets the source to which the reference belongs.voidPUBLIC: Sets the title of the reference.protected voidsetTopicListeners(TopicMapListenerIF[] topic_listeners) voidstoreClosed(TopicMapStoreIF store) INTERNAL: Callback from the specified TopicMapStoreIF after it has been closed.
-
Field Details
-
id
-
title
-
isopen
protected boolean isopen -
deleted
protected boolean deleted -
source
-
listeners
-
topic_listeners
-
-
Constructor Details
-
AbstractTopicMapReference
-
-
Method Details
-
getId
Description copied from interface:TopicMapReferenceIFPUBLIC: Gets the id of the reference.- Specified by:
getIdin interfaceTopicMapReferenceIF
-
setId
Description copied from interface:TopicMapReferenceIFINTERNAL: Sets the id of the reference. Warning: Intended for internal use only. The reference should throw anUnsupportedOperationExceptionif it does not support setting the id.- Specified by:
setIdin interfaceTopicMapReferenceIF
-
getTitle
Description copied from interface:TopicMapReferenceIFPUBLIC: Gets the title of the reference.- Specified by:
getTitlein interfaceTopicMapReferenceIF
-
setTitle
Description copied from interface:TopicMapReferenceIFPUBLIC: Sets the title of the reference.- Specified by:
setTitlein interfaceTopicMapReferenceIF
-
getSource
Description copied from interface:TopicMapReferenceIFPUBLIC: Gets the source to which the reference belongs.- Specified by:
getSourcein interfaceTopicMapReferenceIF
-
setSource
Description copied from interface:TopicMapReferenceIFPUBLIC: Sets the source to which the reference belongs. The reference should throw anUnsupportedOperationExceptionif it does not support setting the source.- Specified by:
setSourcein interfaceTopicMapReferenceIF
-
isOpen
public boolean isOpen()Description copied from interface:TopicMapReferenceIFPUBLIC: Returns true if the reference is open.- Specified by:
isOpenin interfaceTopicMapReferenceIF
-
open
public void open()Description copied from interface:TopicMapReferenceIFPUBLIC: Opens the reference.- Specified by:
openin interfaceTopicMapReferenceIF
-
close
public void close()Description copied from interface:TopicMapReferenceIFPUBLIC: 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:
closein interfaceAutoCloseable- Specified by:
closein interfaceTopicMapReferenceIF
-
isDeleted
public boolean isDeleted()Description copied from interface:TopicMapReferenceIFPUBLIC: Returns true if the topic map has been deleted.- Specified by:
isDeletedin interfaceTopicMapReferenceIF
-
delete
public void delete()Description copied from interface:TopicMapReferenceIFPUBLIC: 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:
deletein interfaceTopicMapReferenceIF
-
clear
Description copied from interface:TopicMapReferenceIFEXPERIMENTAL: 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:
clearin interfaceTopicMapReferenceIF- Throws:
IOException
-
createStore
Description copied from interface:TopicMapReferenceIFPUBLIC: Creates a topic map store that lets you access the referenced topic map.- Specified by:
createStorein interfaceTopicMapReferenceIF- Throws:
IOException
-
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
-
getTopicListeners
-
setTopicListeners
-
addTopicListener
INTERNAL: Add topic listener to reference. -
removeTopicListener
INTERNAL: Remove topic listener from reference. -
registerTopicListeners
INTERNAL: Register topic listener from list of listener implementations. -
makeListenerArray
protected void makeListenerArray()
-