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 interface TopicMapReferenceIF extends AutoCloseable
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.String
getId()
PUBLIC: Gets the id of the reference.TopicMapSourceIF
getSource()
PUBLIC: Gets the source to which the reference belongs.String
getTitle()
PUBLIC: Gets the title of the reference.boolean
isDeleted()
PUBLIC: Returns true if the topic map has been deleted.boolean
isOpen()
PUBLIC: Returns true if the reference is open.void
open()
PUBLIC: Opens the reference.void
setId(String id)
INTERNAL: Sets the id of the reference.void
setSource(TopicMapSourceIF source)
PUBLIC: Sets the source to which the reference belongs.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.
-
-
-
Method Detail
-
getId
String getId()
PUBLIC: Gets the id of the reference.
-
setId
void setId(String id)
INTERNAL: Sets the id of the reference. Warning: Intended for internal use only. The reference should throw anUnsupportedOperationException
if it does not support setting the id.
-
getTitle
String getTitle()
PUBLIC: Gets the title of the reference.
-
setTitle
void setTitle(String title)
PUBLIC: Sets the title of the reference.
-
getSource
TopicMapSourceIF getSource()
PUBLIC: Gets the source to which the reference belongs.- Since:
- 1.3.2
-
setSource
void setSource(TopicMapSourceIF source)
PUBLIC: Sets the source to which the reference belongs. The reference should throw anUnsupportedOperationException
if it does not support setting the source.- Since:
- 1.3.2
-
createStore
TopicMapStoreIF createStore(boolean readonly) throws IOException
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:
close
in 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
void clear() throws IOException
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
void storeClosed(TopicMapStoreIF store)
INTERNAL: Callback from the specified TopicMapStoreIF after it has been closed. Warning: Intended for internal use only.- Since:
- 1.3.2
-
-