net.ontopia.topicmaps.core.events
Class AbstractTopicMapListener

java.lang.Object
  extended by net.ontopia.topicmaps.core.events.AbstractTopicMapListener
All Implemented Interfaces:
TopicMapListenerIF

public abstract class AbstractTopicMapListener
extends java.lang.Object
implements TopicMapListenerIF

PUBLIC: Base class for topic map listeners. Subclass this abstract listener class if you want to create your own listener implementation. Subclassing this class will make sure that any extensions to the TopicMapListenerIF interface will be catered for in the future, preventing inconsistencies. Methods implemented by this abstract class have empty method bodies.

Since:
3.4.3

Constructor Summary
AbstractTopicMapListener()
           
 
Method Summary
 void objectAdded(TMObjectIF snapshot)
          PUBLIC: Callback method called when a topic map object has been added to the topic map.
 void objectModified(TMObjectIF snapshot)
          PUBLIC: Callback method called when a topic map object has been modified.
 void objectRemoved(TMObjectIF snapshot)
          PUBLIC: Callback method called when a topic map object has been removed from the topic map.
 void setReference(TopicMapReferenceIF ref)
          INTERNAL: Callback method called when listener is being registered or unregistered with a topic map reference.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractTopicMapListener

public AbstractTopicMapListener()
Method Detail

objectAdded

public void objectAdded(TMObjectIF snapshot)
Description copied from interface: TopicMapListenerIF
PUBLIC: Callback method called when a topic map object has been added to the topic map. The callback will be made after the transaction has been committed.

The snapshot of a TMObjectIF given as the first argument is very minimal as it only holds the object ID of the topic map object. To get more information about the object, look it up in your own transaction using the object ID.

Specified by:
objectAdded in interface TopicMapListenerIF

objectModified

public void objectModified(TMObjectIF snapshot)
Description copied from interface: TopicMapListenerIF
PUBLIC: Callback method called when a topic map object has been modified. The callback will be made after the transaction has been committed.

The snapshot of a TMObjectIF given as the first argument is very minimal as it only holds the object ID of the topic map object. To get more information about the object, look it up in your own transaction using the object ID.

Specified by:
objectModified in interface TopicMapListenerIF

objectRemoved

public void objectRemoved(TMObjectIF snapshot)
Description copied from interface: TopicMapListenerIF
PUBLIC: Callback method called when a topic map object has been removed from the topic map. The callback will be made after the transaction has been committed.

The snapshot of a TMObjectIF given as the first argument will contain a snapshot view of the topic map object at the time the object was removed from the topic map. If the snapshot object was a topic then it will include all directly contained information, except association roles, at the time when the topic was removed through the method TopicMapIF.removeTopic(TopicIF). The data included are: the object ID, the topic types, all topic names and their complete data including their variant names, all occurrences and all their complete data. Note that any topic references in this snapshot will only be stubs and thus only contain the topic's object ID.

Specified by:
objectRemoved in interface TopicMapListenerIF

setReference

public void setReference(TopicMapReferenceIF ref)
INTERNAL: Callback method called when listener is being registered or unregistered with a topic map reference.



Copyright © 2000-2009 Ontopia.