org.tm4j.topicmap.unified
Class UnifiedTopicMap

java.lang.Object
  extended byorg.tm4j.topicmap.unified.UnifiedTopicMap
All Implemented Interfaces:
java.util.EventListener, java.beans.PropertyChangeListener, TopicMap, TopicMapObject

public class UnifiedTopicMap
extends java.lang.Object
implements TopicMap, java.beans.PropertyChangeListener

Implements a unified topic navigation structure over multiple seperate TopicMap objects. The current implementation allows seamless access to all topics using the standard TopicMap interface. In addition, topics from different topic maps which should be merged by their subject or subject indicators are represented as a single structure using the UnifiedTopic class.

Author:
Kal Ahmed, Harald Kuhn (getProvider)
See Also:
UnifiedTopic

Constructor Summary
UnifiedTopicMap(Locator baseLocator)
           
UnifiedTopicMap(Locator baseLocator, boolean notifyEvents)
           
 
Method Summary
 void addAddedTheme(Topic theme)
          Adds an added theme to the topic map.
 void addExternalRef(Locator ref)
          Adds an external reference from this topic map to another topic map.
 void addMergeMap(Locator ref, Topic[] addThemes)
          Adds a new mergeMap directive to this topic map.
 void addMultiValuePropertyChangeListener(MultiValuePropertyChangeListener l)
          Adds a MultiValue Property Change Listener.
 void addMultiValuePropertyChangeListener(java.lang.String propName, MultiValuePropertyChangeListener l)
          Adds a MultiValue Property Change Listener.
 void addPropertyChangeListener(java.beans.PropertyChangeListener l)
          Adds a Property Change Listener.
 void addPropertyChangeListener(java.lang.String propName, java.beans.PropertyChangeListener l)
          Adds a Property Change Listener.
 void addSourceLocator(Locator loc)
          Adds a locator to the set of locators of the XML or other resources which contributed to this topic map object.
 void addTopicMap(TopicMap tm)
           
 void addVetoableChangeListener(java.beans.VetoableChangeListener l)
           
 Association createAssociation(java.lang.String id)
          Creates a new Association in this TopicMap.
 Association createAssociation(java.lang.String id, Locator resourceLocator, Topic type, Topic[] themes)
          Creates a new Association in this topic map
 Topic createTopic(java.lang.String id)
          Creates a new Topic in this TopicMap.
 void destroy()
          Permanently removes this object from the topic map.
 void fireMultiValuePropertyChange(MultiValuePropertyChangeEvent ev)
          Notifies the MultiValue Property Change Listeners of a property change.
 void fireMultiValuePropertyChange(java.lang.String propName, int operation, java.lang.Object operand)
          Notifies the MultiValue Property Change Listeners of a property change to this object
 void firePropertyChange(java.beans.PropertyChangeEvent ev)
          Notifies the Property Change Listeners of a property change.
 void firePropertyChange(java.lang.String propName, java.lang.Object oldVal, java.lang.Object newVal)
          Notifies a Property Change Listener of a property change.
 void fireVetoableChange(java.beans.PropertyChangeEvent ev)
           
 void fireVetoableChange(java.lang.String propertyName, java.lang.Object oldVal, java.lang.Object newVal)
           
 java.util.Collection getAddedThemes()
          Get a list of the Topic objects defining the added themes of the topic map.
 java.util.Collection getAssociations()
          Get a list of the Associations contained in the topic map.
 java.util.Iterator getAssociationsIterator()
          Get an iterator over all of the Associations in the topic map.
 Locator getBaseLocator()
          Returns the Locator for the address of the source which generated the topic map.
 java.util.Set getExternalRefs()
          Returns all of the unresolved external references from this topic map.
 TopicMapFactory getFactory()
          Get the concrete implementation of the TopicMapFactory interface which partners with the concrete implementation of this interface.
 java.lang.String getID()
          Returns the object ID of the TopicMapObject.
 IndexManager getIndexManager()
          Returns the IndexManager object which handles access to all of the indexes for this topic map.
 LocatorFactory getLocatorFactory()
          Get the concrete implementation of the LocatorFactory interface which partners with the concrete implementation of this interface.
 java.util.Collection getMergedTopics(Topic t)
           
 java.util.Collection getMergedTopics(UnifiedTopic t)
           
 java.util.Set getMergeMapAddedThemes(Locator mapLoc)
          Returns the collection of themes to be added to the external topic map resource when it is merged with this map.
 java.util.Collection getMergeMapLocators()
          Returns an unmodifiable Map of the unresolved mergeMap directives contained within this topic map.
 java.lang.String getName()
          getName Get the name of the topic map.
 TopicMapObject getObjectByID(java.lang.String id)
          Gets the object with the specified unique identifier.
 TopicMapObject getObjectByResourceLocator(Locator loc)
          Gets the TopicMapObject which was generated from the specified resource.
 TopicMapObject getObjectBySourceLocator(Locator loc)
          Gets the TopicMapObject which was generated from the specified resource.
 java.util.Collection getObjects()
          Gets all the objects in the topic map.
 java.lang.Boolean getProperty(java.lang.String propertyName)
          Returns the value of the specified property for one of the underlying topic maps.
 TopicMapProvider getProvider()
          Returns the TopicMapProvider implementation which provides this TopicMap
 Locator getResourceLocator()
          Returns the Locator of the XML or other resource which caused the creation of this topic map object.
 java.util.Set getSourceLocators()
          Returns the Locators of the XML or other resources which contributed to this topic map object.
 Topic getTopicByID(java.lang.String id)
          Returns the UnifiedTopic which wraps the topic object specified by the id string.
 Topic getTopicBySubject(Locator subject)
          Get the topic which is bound to the specified subject
 Topic getTopicBySubjectIndicator(Locator subjectIndicator)
          Get the topic which is bound to the subject indicated by the specified resource.
 int getTopicCount()
          Returns a count of the total number of raw topics in all underlying topic maps.
 TopicMap getTopicMap()
          Returns a handle to the topic map which this object is part of.
 TopicMap getTopicMap(java.lang.String id)
           
 java.util.Collection getTopicMaps()
           
 java.util.Set getTopics()
          Returns the raw topics in all of the underlying topic maps.
 java.util.Iterator getTopicsIterator()
          Get an Iterator over the Topics in this map.
 java.util.Set getUnifiedTopics()
           
 java.util.Collection getUnifiedTopics(java.util.Collection rawTopics)
           
 TopicMapUtils getUtils()
          Get the concrete implementation of the TopicMapUtils interface which partners with the concrete implementation of this interface.
 boolean hasMergeMap()
           
 boolean hasMergeMap(Locator loc)
          Determine whether or not the specified resource is listed in an unresolved mergeMap directive for this topic map.
 void propertyChange(java.beans.PropertyChangeEvent ev)
           
 void removeAssociation(Association assoc)
           
 void removeExternalRef(Locator ref)
          Removes a resource from the list of external references of this topic map.
 void removeMergeMap(Locator mapLoc)
          Removes an unresolved mergeMap directive from this topic map.
 void removeMultiValuePropertyChangeListener(MultiValuePropertyChangeListener l)
          Removes a MultiValue Property Change Listener.
 void removePropertyChangeListener(java.beans.PropertyChangeListener l)
          Removes a Property Change Listener.
 void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
          Removes a Property Change listener for a specific property
 void removeSourceLocator(Locator loc)
          Removes a locator from the set of locators of the XML or other resources which contributed to this topic map object.
 void removeTopic(Topic t)
           
 void removeVetoableChangeListener(java.beans.VetoableChangeListener l)
           
 void setBaseLocator(Locator base)
          Sets the Locator of the source which generated this topic map.
 void setID(java.lang.String id)
          Sets the object ID of the TopicMapObject.
 void setName(java.lang.String name)
          setName Set the name of the topic map.
 void setResourceLocator(Locator loc)
          Sets the Locator of the XML or other resource which caused the creation of this topic map object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnifiedTopicMap

public UnifiedTopicMap(Locator baseLocator)

UnifiedTopicMap

public UnifiedTopicMap(Locator baseLocator,
                       boolean notifyEvents)
Method Detail

getProvider

public TopicMapProvider getProvider()
Description copied from interface: TopicMap
Returns the TopicMapProvider implementation which provides this TopicMap

Specified by:
getProvider in interface TopicMap
Returns:
a implementation of the TopicMapProvider interface

addTopicMap

public void addTopicMap(TopicMap tm)
                 throws UnifiedTopicMapException
Throws:
UnifiedTopicMapException

getTopicMap

public TopicMap getTopicMap(java.lang.String id)

getTopicMaps

public java.util.Collection getTopicMaps()

getUnifiedTopics

public java.util.Collection getUnifiedTopics(java.util.Collection rawTopics)

getMergedTopics

public java.util.Collection getMergedTopics(UnifiedTopic t)

getMergedTopics

public java.util.Collection getMergedTopics(Topic t)

addAddedTheme

public void addAddedTheme(Topic theme)
Description copied from interface: TopicMap
Adds an added theme to the topic map.

Specified by:
addAddedTheme in interface TopicMap

addExternalRef

public void addExternalRef(Locator ref)
Description copied from interface: TopicMap
Adds an external reference from this topic map to another topic map. An external reference represents a element which addresses a Topic which is not contained within the resource addressed by the baseLocator property of this topic map.

Specified by:
addExternalRef in interface TopicMap
Parameters:
ref -

The external locator to be added. If the referenced resource is already contained as an external reference or as a merge map, it will not be added. For the purposes of this check, the fragment and query parts of a URILocator are ignored, and only the reference to the complete document will be stored

For example if the reference is to http://www.tm4j.org/example.xtm#topic1, the locator which is tested for and stored will be http://www.tm4j.org/example.xtm This means that multiple references to different topics in the same external topic map will only ever create one external reference.

For other locator notations the complete address is used for this test.


addMergeMap

public void addMergeMap(Locator ref,
                        Topic[] addThemes)
Description copied from interface: TopicMap
Adds a new mergeMap directive to this topic map.

Specified by:
addMergeMap in interface TopicMap
Parameters:
ref - The Locator of the external topic map to be merged
addThemes - An array of Topic objects containing the themes to be added to the topic map when it is merged. Null if there are no themes to be added.

getAddedThemes

public java.util.Collection getAddedThemes()
Description copied from interface: TopicMap
Get a list of the Topic objects defining the added themes of the topic map.

Specified by:
getAddedThemes in interface TopicMap
Returns:
An unmodifiable Collection of the Topic objects defining the added themes of the topic map.
See Also:
Topic

getAssociations

public java.util.Collection getAssociations()
Description copied from interface: TopicMap
Get a list of the Associations contained in the topic map.

Specified by:
getAssociations in interface TopicMap
Returns:
An unmodifiable list of the associations contained in the topic map.
See Also:
Association

getAssociationsIterator

public java.util.Iterator getAssociationsIterator()
Description copied from interface: TopicMap
Get an iterator over all of the Associations in the topic map. The iterator returned may be more efficiently implemented than calling getAssociations().getIterator(). The iterator returned must be read-only, and will not allow any deletions. The Iterator is not guarunteed to be immune to ConcurrentModificationExceptions if the topic map is modified in some way during the iteration.

Specified by:
getAssociationsIterator in interface TopicMap
Returns:
a read-only Iterator of Association objects.

getBaseLocator

public Locator getBaseLocator()
Description copied from interface: TopicMap
Returns the Locator for the address of the source which generated the topic map. URI references withing the topic map will be resolved relative to this locator.

Specified by:
getBaseLocator in interface TopicMap
Returns:
The base resource locator of the topic map.

getExternalRefs

public java.util.Set getExternalRefs()
Description copied from interface: TopicMap
Returns all of the unresolved external references from this topic map.

Specified by:
getExternalRefs in interface TopicMap

getFactory

public TopicMapFactory getFactory()
Description copied from interface: TopicMap
Get the concrete implementation of the TopicMapFactory interface which partners with the concrete implementation of this interface.

Specified by:
getFactory in interface TopicMap

getIndexManager

public IndexManager getIndexManager()
Description copied from interface: TopicMap
Returns the IndexManager object which handles access to all of the indexes for this topic map.

Specified by:
getIndexManager in interface TopicMap

getLocatorFactory

public LocatorFactory getLocatorFactory()
Description copied from interface: TopicMap
Get the concrete implementation of the LocatorFactory interface which partners with the concrete implementation of this interface. The returned factory will produce Locator objects which may be used with TopicMapObjects in this topic map.

Specified by:
getLocatorFactory in interface TopicMap

getMergeMapAddedThemes

public java.util.Set getMergeMapAddedThemes(Locator mapLoc)
Description copied from interface: TopicMap
Returns the collection of themes to be added to the external topic map resource when it is merged with this map.

Specified by:
getMergeMapAddedThemes in interface TopicMap
Parameters:
mapLoc - The Locator of the external topic map to be merged.
Returns:
If mapLocator specifies the locator of an external topic map to be merged into this topic map, a Set of Topic objects defining the themes to be added to the external topic map will be returned. Otherwise, null is returned.

getMergeMapLocators

public java.util.Collection getMergeMapLocators()
Description copied from interface: TopicMap
Returns an unmodifiable Map of the unresolved mergeMap directives contained within this topic map. The map key is the Locator of the external topic map to be merged The map value is a Scope object which contains the additional themes to be applied to the external map when it is merged.

Specified by:
getMergeMapLocators in interface TopicMap

hasMergeMap

public boolean hasMergeMap(Locator loc)
Description copied from interface: TopicMap
Determine whether or not the specified resource is listed in an unresolved mergeMap directive for this topic map.

Specified by:
hasMergeMap in interface TopicMap
Parameters:
loc - The Locator of the external topic map to test for
Returns:
True if the specified external resource is referenced from an unprocessed mergeMap directive, false otherwise.

getName

public java.lang.String getName()
Description copied from interface: TopicMap
getName Get the name of the topic map.

Specified by:
getName in interface TopicMap

getObjectByID

public TopicMapObject getObjectByID(java.lang.String id)
Description copied from interface: TopicMap
Gets the object with the specified unique identifier.

Specified by:
getObjectByID in interface TopicMap
Parameters:
id - The unique identifier of the object to be retrieved.
Returns:
The topic map object which has the specified identifier or null if no match is found.

getObjectByResourceLocator

public TopicMapObject getObjectByResourceLocator(Locator loc)
Deprecated.  

Description copied from interface: TopicMap
Gets the TopicMapObject which was generated from the specified resource.

Specified by:
getObjectByResourceLocator in interface TopicMap
Parameters:
loc - The Locator of the resource to look for.
Returns:
The topic map object which was created to represent the resource identified by locator

getObjectBySourceLocator

public TopicMapObject getObjectBySourceLocator(Locator loc)
Description copied from interface: TopicMap
Gets the TopicMapObject which was generated from the specified resource.

Specified by:
getObjectBySourceLocator in interface TopicMap
Parameters:
loc - The Locator of the resource to look for.
Returns:
The topic map object which was created to represent the resource identified by locator

getObjects

public java.util.Collection getObjects()
Description copied from interface: TopicMap
Gets all the objects in the topic map.

Specified by:
getObjects in interface TopicMap
Returns:
A Collection of all of the TopicMapObjects in the topic map.

getTopics

public java.util.Set getTopics()
Returns the raw topics in all of the underlying topic maps. NOTE this method DOES NOT return instances of the UnifiedTopic interface due to performance considerations. To get the set of UnifiedTopics in all of the underlying topic maps, call getUnifiedTopics()

Specified by:
getTopics in interface TopicMap
Returns:
An unmodifiable Set of all the topics in the topic map.

getTopicsIterator

public java.util.Iterator getTopicsIterator()
Description copied from interface: TopicMap
Get an Iterator over the Topics in this map. The iterator returned may be more efficiently implemented than calling getTopics().iterator(). The Iterator returned must be treated as read-only and should not allow delete() operations. The Iterator returned is not guarunteed to be immune to ConcurrentModificationExceptions if the topic map is modified in some way during the course of the iteration.

Specified by:
getTopicsIterator in interface TopicMap
Returns:
An iterator of Topic objects.

getUnifiedTopics

public java.util.Set getUnifiedTopics()

getTopicCount

public int getTopicCount()
Returns a count of the total number of raw topics in all underlying topic maps. This count may be larger than the size of the Collection returned by getUnifiedTopics() due to cross-topic-map merges.

Specified by:
getTopicCount in interface TopicMap
Returns:
The number of topics in the topic map

getTopicByID

public Topic getTopicByID(java.lang.String id)
Returns the UnifiedTopic which wraps the topic object specified by the id string.

Specified by:
getTopicByID in interface TopicMap
Parameters:
id - The identifier of the topic to be retrieved.
Returns:
The topic or null if no match is found

getTopicBySubject

public Topic getTopicBySubject(Locator subject)
Description copied from interface: TopicMap
Get the topic which is bound to the specified subject

Specified by:
getTopicBySubject in interface TopicMap
Parameters:
subject - The locator of the subject to which the topic is bound
Returns:
The topic bound to the specified subject or null if no match is found.

getTopicBySubjectIndicator

public Topic getTopicBySubjectIndicator(Locator subjectIndicator)
Description copied from interface: TopicMap
Get the topic which is bound to the subject indicated by the specified resource.

Specified by:
getTopicBySubjectIndicator in interface TopicMap
Parameters:
subjectIndicator - The locator of a resource which indicates the subject of the topic.
Returns:
The topic bound to the specified subject or null if no match is found.

getUtils

public TopicMapUtils getUtils()
Description copied from interface: TopicMap
Get the concrete implementation of the TopicMapUtils interface which partners with the concrete implementation of this interface.

Specified by:
getUtils in interface TopicMap

hasMergeMap

public boolean hasMergeMap()

removeAssociation

public void removeAssociation(Association assoc)

removeTopic

public void removeTopic(Topic t)

createTopic

public Topic createTopic(java.lang.String id)
Description copied from interface: TopicMap
Creates a new Topic in this TopicMap.

Specified by:
createTopic in interface TopicMap
Parameters:
id - the unique identifier to be assigned to the new Topic. If this parameter is null, then the Topic will be assigned a unique identifier by the back-end implementation.
Returns:
The new Topic object.

createAssociation

public Association createAssociation(java.lang.String id)
Description copied from interface: TopicMap
Creates a new Association in this TopicMap.

Specified by:
createAssociation in interface TopicMap
Parameters:
id - the unique identifier to be assigned to the new Association. If this parameter is null, then the Association will be assigned a unique identifier by the back-end implementation.
Returns:
The new Association object.

createAssociation

public Association createAssociation(java.lang.String id,
                                     Locator resourceLocator,
                                     Topic type,
                                     Topic[] themes)
                              throws DuplicateObjectIDException,
                                     DuplicateResourceLocatorException,
                                     java.beans.PropertyVetoException
Description copied from interface: TopicMap
Creates a new Association in this topic map

Specified by:
createAssociation in interface TopicMap
Parameters:
id - the unique identifier to be assigned to the new Association. If this parameter is null, then the Association will be assigned a unique identifier by the back-end implementation.
resourceLocator - the address of the syntactic item which describes this Association (e.g. the address of the XTM association element). This parameter may be NULL for Associations not created from a syntactic item with an address.
type - the topic which defines the class of associations to which the new Association instance belongs. This parameter may be NULL for untyped associations.
themes - the topics which define the scope of the new Association. This parameter may be NULL for Associations created in the unconstrained scope.
Returns:
the new Association object.
Throws:
DuplicateResourceLocatorException - if resourceLocator is the address of some other object in this TopicMap.
java.beans.PropertyVetoException - if a listener to the TopicMap vetoes the creation of this Association.
DuplicateObjectIDException - if id is already assigned to some other object in this TopicMap.

removeExternalRef

public void removeExternalRef(Locator ref)
Description copied from interface: TopicMap
Removes a resource from the list of external references of this topic map. Although this method is provided, applications wishing to maintain full XTM 1.0 Conformance should never call this method directly. Instead an external reference should be removed by calling TopicMapProvider.mergeTopicMap(TopicMap baseTopicMap, Locator externalTopicMap, Topic[] addedThemes)

Specified by:
removeExternalRef in interface TopicMap

removeMergeMap

public void removeMergeMap(Locator mapLoc)
Description copied from interface: TopicMap
Removes an unresolved mergeMap directive from this topic map.

Specified by:
removeMergeMap in interface TopicMap
Parameters:
mapLoc - The Locator of the external topic map reference to be removed.

setBaseLocator

public void setBaseLocator(Locator base)
Description copied from interface: TopicMap
Sets the Locator of the source which generated this topic map.

Specified by:
setBaseLocator in interface TopicMap
Parameters:
base - The base resource locator of the topic map.
See Also:
TopicMap.getBaseLocator()

setName

public void setName(java.lang.String name)
Description copied from interface: TopicMap
setName Set the name of the topic map.

Specified by:
setName in interface TopicMap
Parameters:
name - The name to be assigned to the topic map.

setID

public void setID(java.lang.String id)
Description copied from interface: TopicMapObject
Sets the object ID of the TopicMapObject. The object ID is an internal identifier assigned by the application to a topic map object. ID values must be unique for each object in the same topic map. Implementations are free to assign ID values in any way they see fit.

Specified by:
setID in interface TopicMapObject
Parameters:
id - the new internal object ID.

getID

public java.lang.String getID()
Description copied from interface: TopicMapObject
Returns the object ID of the TopicMapObject. Note that implementations are free to assign ID values in any way they see fit. To get the Locator of the XTM element which is represented by this object, use TopicMapObject.getResourceLocator().

Specified by:
getID in interface TopicMapObject
Returns:
the internal object ID.
See Also:
TopicMapObject.setID(java.lang.String)

getResourceLocator

public Locator getResourceLocator()
Deprecated. use getSourceLocators()

Description copied from interface: TopicMapObject
Returns the Locator of the XML or other resource which caused the creation of this topic map object.

Specified by:
getResourceLocator in interface TopicMapObject
Returns:
The creating Locator.

getSourceLocators

public java.util.Set getSourceLocators()
Description copied from interface: TopicMapObject
Returns the Locators of the XML or other resources which contributed to this topic map object.

NOTE: under the dynamic merging model, calling getResourceLocators() on a Topic object will return the resourceLocator of the Topic itself, plust that of all Topics which it is merged with.

Specified by:
getSourceLocators in interface TopicMapObject
Returns:
an unmodifiable Set of Locator objects.

setResourceLocator

public void setResourceLocator(Locator loc)
Deprecated. use addSourceLocator(Locator)

Description copied from interface: TopicMapObject
Sets the Locator of the XML or other resource which caused the creation of this topic map object. Typically, this will be the Locator of an XTM element.

Specified by:
setResourceLocator in interface TopicMapObject
Parameters:
loc - the creating Locator.

addSourceLocator

public void addSourceLocator(Locator loc)
Description copied from interface: TopicMapObject
Adds a locator to the set of locators of the XML or other resources which contributed to this topic map object.

Specified by:
addSourceLocator in interface TopicMapObject
Parameters:
loc - the locator of the contributing resource

removeSourceLocator

public void removeSourceLocator(Locator loc)
Description copied from interface: TopicMapObject
Removes a locator from the set of locators of the XML or other resources which contributed to this topic map object.

Specified by:
removeSourceLocator in interface TopicMapObject
Parameters:
loc - the locator to be removed

getTopicMap

public TopicMap getTopicMap()
Description copied from interface: TopicMapObject
Returns a handle to the topic map which this object is part of.

Specified by:
getTopicMap in interface TopicMapObject
Returns:
This object's parent topic map.

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Description copied from interface: TopicMapObject
Adds a Property Change Listener. The listener is registered for all properties.

Specified by:
addPropertyChangeListener in interface TopicMapObject
Parameters:
l - The new listener to be registered. It listens for changes in all available properties.

addPropertyChangeListener

public void addPropertyChangeListener(java.lang.String propName,
                                      java.beans.PropertyChangeListener l)
Description copied from interface: TopicMapObject
Adds a Property Change Listener. The listener is registered for only one property.

Specified by:
addPropertyChangeListener in interface TopicMapObject
Parameters:
propName - The property whose changes the listener monitors.
l - The new listener to be registered. It only listens for changes in the property specified by propertyName.

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
Description copied from interface: TopicMapObject
Removes a Property Change Listener.

Specified by:
removePropertyChangeListener in interface TopicMapObject
Parameters:
l - The listener to be removed.

removePropertyChangeListener

public void removePropertyChangeListener(java.lang.String propertyName,
                                         java.beans.PropertyChangeListener listener)
Description copied from interface: TopicMapObject
Removes a Property Change listener for a specific property

Specified by:
removePropertyChangeListener in interface TopicMapObject
Parameters:
propertyName - The property that the listener should be removed from
listener - The listener to be removed

firePropertyChange

public void firePropertyChange(java.lang.String propName,
                               java.lang.Object oldVal,
                               java.lang.Object newVal)
Description copied from interface: TopicMapObject
Notifies a Property Change Listener of a property change. Note that if oldVal equals newVal, no property change event is actually fired.

Specified by:
firePropertyChange in interface TopicMapObject
Parameters:
propName - The property for which a property change is to be fired. The Property Change Listener responsible for handling changes to this particular property is selected automatically.
oldVal - The property's original value.
newVal - The property's new value.

firePropertyChange

public void firePropertyChange(java.beans.PropertyChangeEvent ev)
Description copied from interface: TopicMapObject
Notifies the Property Change Listeners of a property change.

Specified by:
firePropertyChange in interface TopicMapObject
Parameters:
ev - The PropertyChangeEvent to be fired. The Property Change Listener is responsible for handling changes to this particular property is selected automatically.

addMultiValuePropertyChangeListener

public void addMultiValuePropertyChangeListener(java.lang.String propName,
                                                MultiValuePropertyChangeListener l)
Description copied from interface: TopicMapObject
Adds a MultiValue Property Change Listener. The listener is registered for only one property.

Specified by:
addMultiValuePropertyChangeListener in interface TopicMapObject
Parameters:
propName - The property whose changes the listener monitors.
l - The new listener to be registered. It only listens for changes in the property specified by propertyName.

addMultiValuePropertyChangeListener

public void addMultiValuePropertyChangeListener(MultiValuePropertyChangeListener l)
Description copied from interface: TopicMapObject
Adds a MultiValue Property Change Listener. The listener is registered for all properties.

Specified by:
addMultiValuePropertyChangeListener in interface TopicMapObject
Parameters:
l - The new listener to be registered. It listens for changes in all available properties.

removeMultiValuePropertyChangeListener

public void removeMultiValuePropertyChangeListener(MultiValuePropertyChangeListener l)
Description copied from interface: TopicMapObject
Removes a MultiValue Property Change Listener.

Specified by:
removeMultiValuePropertyChangeListener in interface TopicMapObject
Parameters:
l - The listener to be removed.

fireMultiValuePropertyChange

public void fireMultiValuePropertyChange(java.lang.String propName,
                                         int operation,
                                         java.lang.Object operand)
Description copied from interface: TopicMapObject
Notifies the MultiValue Property Change Listeners of a property change to this object

Specified by:
fireMultiValuePropertyChange in interface TopicMapObject
Parameters:
propName - The name of the property modified.
operation - The type of modification to the property. Allowed values are specified in the class MultiValuePropertyChangeEvent
operand - The object or Collection of objects which were involved in the modification. For OP_CLEAR events, no operand is required. For OP_ADD_SINGLE or OP_REMOVE_SINGLE events, the operand must be the object added or removed. For OP_ADD_SET and OP_REMOVE_SET events, the operand must be a Collection of all the objects added or removed. For OP_SET events, the operand must be a collection of the new values assigned to the property.

fireMultiValuePropertyChange

public void fireMultiValuePropertyChange(MultiValuePropertyChangeEvent ev)
Description copied from interface: TopicMapObject
Notifies the MultiValue Property Change Listeners of a property change.

Specified by:
fireMultiValuePropertyChange in interface TopicMapObject
Parameters:
ev - The MultiValuePropertyChangeEvent to be fired. The MultiValue Property Change Listener is responsible for handling changes to this particular property is selected automatically.

addVetoableChangeListener

public void addVetoableChangeListener(java.beans.VetoableChangeListener l)
Specified by:
addVetoableChangeListener in interface TopicMapObject

removeVetoableChangeListener

public void removeVetoableChangeListener(java.beans.VetoableChangeListener l)
Specified by:
removeVetoableChangeListener in interface TopicMapObject

fireVetoableChange

public void fireVetoableChange(java.lang.String propertyName,
                               java.lang.Object oldVal,
                               java.lang.Object newVal)
                        throws java.beans.PropertyVetoException
Specified by:
fireVetoableChange in interface TopicMapObject
Throws:
java.beans.PropertyVetoException

fireVetoableChange

public void fireVetoableChange(java.beans.PropertyChangeEvent ev)
                        throws java.beans.PropertyVetoException
Throws:
java.beans.PropertyVetoException

destroy

public void destroy()
Description copied from interface: TopicMapObject
Permanently removes this object from the topic map. Depending upon the backend implementation, this method may also free up the memory or other storage space used by the object. An object may only be destroyed after all references to it from other objects have been removed. If the object detects that there is an existing reference still held to it, then an IntegrityViolationException is thrown

Specified by:
destroy in interface TopicMapObject

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent ev)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener

getProperty

public java.lang.Boolean getProperty(java.lang.String propertyName)
Returns the value of the specified property for one of the underlying topic maps. The choice of which topic map's property value is returned is completely arbitrary.

Specified by:
getProperty in interface TopicMap
Parameters:
propertyName -
Returns:
the value of the specified property or null if this property is not set on the topic map.