net.ontopia.topicmaps.entry
Class AbstractTopicMapReference

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

public abstract class AbstractTopicMapReference
extends java.lang.Object
implements TopicMapReferenceIF

INTERNAL: An abstract topic map reference class that contains methods that handles the id and title properties. Subclasses should implement the createStore method.


Constructor Summary
AbstractTopicMapReference(java.lang.String id, java.lang.String title)
           
 
Method Summary
 void addTopicListener(TopicMapListenerIF listener)
          INTERNAL: Add topic listener to reference.
 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.
abstract  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.
 java.lang.String getId()
          PUBLIC: Gets the id of the reference.
 TopicMapSourceIF getSource()
          PUBLIC: Gets the source to which the reference belongs.
 java.lang.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 registerTopicListeners(java.lang.String listenerList)
          INTERNAL: Register topic listener from list of listener implementations.
 void removeTopicListener(TopicMapListenerIF listener)
          INTERNAL: Remove topic listener from reference.
 void setId(java.lang.String id)
          INTERNAL: Sets the id of the reference.
 void setSource(TopicMapSourceIF source)
          PUBLIC: Sets the source to which the reference belongs.
 void setTitle(java.lang.String title)
          PUBLIC: Sets the title of the reference.
 void storeClosed(TopicMapStoreIF store)
          INTERNAL: Callback from the specified TopicMapStoreIF after it has been closed.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractTopicMapReference

public AbstractTopicMapReference(java.lang.String id,
                                 java.lang.String title)
Method Detail

getId

public java.lang.String getId()
Description copied from interface: TopicMapReferenceIF
PUBLIC: Gets the id of the reference.

Specified by:
getId in interface TopicMapReferenceIF

setId

public void setId(java.lang.String id)
Description copied from interface: TopicMapReferenceIF
INTERNAL: Sets the id of the reference. Warning: Intended for internal use only. The reference should throw an UnsupportedOperationException if it does not support setting the id.

Specified by:
setId in interface TopicMapReferenceIF

getTitle

public java.lang.String getTitle()
Description copied from interface: TopicMapReferenceIF
PUBLIC: Gets the title of the reference.

Specified by:
getTitle in interface TopicMapReferenceIF

setTitle

public void setTitle(java.lang.String title)
Description copied from interface: TopicMapReferenceIF
PUBLIC: Sets the title of the reference.

Specified by:
setTitle in interface TopicMapReferenceIF

getSource

public TopicMapSourceIF getSource()
Description copied from interface: TopicMapReferenceIF
PUBLIC: Gets the source to which the reference belongs.

Specified by:
getSource in interface TopicMapReferenceIF

setSource

public void setSource(TopicMapSourceIF source)
Description copied from interface: TopicMapReferenceIF
PUBLIC: Sets the source to which the reference belongs. The reference should throw an UnsupportedOperationException if it does not support setting the source.

Specified by:
setSource in interface TopicMapReferenceIF

isOpen

public boolean isOpen()
Description copied from interface: TopicMapReferenceIF
PUBLIC: Returns true if the reference is open.

Specified by:
isOpen in interface TopicMapReferenceIF

open

public void open()
Description copied from interface: TopicMapReferenceIF
PUBLIC: Opens the reference.

Specified by:
open in interface TopicMapReferenceIF

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 interface TopicMapReferenceIF

isDeleted

public boolean isDeleted()
Description copied from interface: TopicMapReferenceIF
PUBLIC: Returns true if the topic map has been deleted.

Specified by:
isDeleted in interface TopicMapReferenceIF

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 interface TopicMapReferenceIF

clear

public void clear()
           throws java.io.IOException
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 interface TopicMapReferenceIF
Throws:
java.io.IOException

createStore

public abstract 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
Throws:
java.io.IOException

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

addTopicListener

public void addTopicListener(TopicMapListenerIF listener)
INTERNAL: Add topic listener to reference.


removeTopicListener

public void removeTopicListener(TopicMapListenerIF listener)
INTERNAL: Remove topic listener from reference.


registerTopicListeners

public void registerTopicListeners(java.lang.String listenerList)
INTERNAL: Register topic listener from list of listener implementations.



Copyright © 2000-2010 Ontopia.