Package net.ontopia.topicmaps.entry
Interface TopicMapReferenceIF
- All Superinterfaces:
AutoCloseable
- All Known Subinterfaces:
MTopicMapReference
- All Known Implementing Classes:
AbstractOntopolyURLReference,AbstractTopicMapReference,AbstractURLTopicMapReference,CTMTopicMapReference,LTMTopicMapReference,MergeReference,RDBMSTopicMapReference,RDFTopicMapReference,StoreFactoryReference,TMXMLTopicMapReference,XTMTopicMapReference
PUBLIC: Represents a reference to a topic map. A topic map
reference is used to get hold of TopicMapStoreIF instances.
A reference is always considered to be open once it has been constructed. It can also be reopened if it has been closed, but not if it has been deleted.
The most common TopicMapReferenceIF implementations (such as the one for RDBMS topic maps) are thread-safe.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear()EXPERIMENTAL: Closes all open stores and clears the topic map by removing all data.voidclose()PUBLIC: Closes all open stores and the reference itself.createStore(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.booleanPUBLIC: Returns true if the topic map has been deleted.booleanisOpen()PUBLIC: Returns true if the reference is open.voidopen()PUBLIC: Opens the 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.voidstoreClosed(TopicMapStoreIF store) INTERNAL: Callback from the specified TopicMapStoreIF after it has been closed.
-
Method Details
-
getId
String getId()PUBLIC: Gets the id of the reference. -
setId
INTERNAL: Sets the id of the reference. Warning: Intended for internal use only. The reference should throw anUnsupportedOperationExceptionif it does not support setting the id. -
getTitle
String getTitle()PUBLIC: Gets the title of the reference. -
setTitle
PUBLIC: Sets the title of the reference. -
getSource
TopicMapSourceIF getSource()PUBLIC: Gets the source to which the reference belongs.- Since:
- 1.3.2
-
setSource
PUBLIC: Sets the source to which the reference belongs. The reference should throw anUnsupportedOperationExceptionif it does not support setting the source.- Since:
- 1.3.2
-
createStore
PUBLIC: Creates a topic map store that lets you access the referenced topic map.- Throws:
IOException- Since:
- 1.3.2
-
isOpen
boolean isOpen()PUBLIC: Returns true if the reference is open.- Since:
- 1.3.2
-
open
void open()PUBLIC: Opens the reference.- Since:
- 2.1
-
close
void close()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:
closein interfaceAutoCloseable- Since:
- 1.3.2
-
isDeleted
boolean isDeleted()PUBLIC: Returns true if the topic map has been deleted.- Since:
- 2.1
-
delete
void delete()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.- Since:
- 1.3.2
-
clear
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.- Throws:
IOException- Since:
- 2.1.1
-
storeClosed
INTERNAL: Callback from the specified TopicMapStoreIF after it has been closed. Warning: Intended for internal use only.- Since:
- 1.3.2
-