|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
The generic base interface for topic map objects. All of the interfaces that represent constructs from the topic map are derived from this interface. For a more detailed discussion of the purpose of this interface and its capablities, see the section titled TopicMapObject in the TM4J Developer's Guide.
Note: TM4J provides a generic way for any client application
to detect changes made in a topic map, which involves the use of
properties and the java.beans.PropertyChangeListener
interface.
For more in-depth information about using properties in TM4J,
and for a discussion of available properties, see the
Property
Change Listeners section in the TM4J Developer's Guide.
| Method Summary | |
void |
addMultiValuePropertyChangeListener(MultiValuePropertyChangeListener listener)
Adds a MultiValue Property Change Listener. |
void |
addMultiValuePropertyChangeListener(java.lang.String propertyName,
MultiValuePropertyChangeListener listener)
Adds a MultiValue Property Change Listener. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a Property Change Listener. |
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
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 |
addVetoableChangeListener(java.beans.VetoableChangeListener listener)
|
void |
destroy()
Permanently removes this object from the topic map. |
void |
fireMultiValuePropertyChange(MultiValuePropertyChangeEvent propertyChange)
Notifies the MultiValue Property Change Listeners of a property change. |
void |
fireMultiValuePropertyChange(java.lang.String propertyName,
int operation,
java.lang.Object operand)
Notifies the MultiValue Property Change Listeners of a property change to this object |
void |
firePropertyChange(java.beans.PropertyChangeEvent propertyChange)
Notifies the Property Change Listeners of a property change. |
void |
firePropertyChange(java.lang.String propertyName,
java.lang.Object oldVal,
java.lang.Object newVal)
Notifies a Property Change Listener of a property change. |
void |
fireVetoableChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
|
java.lang.String |
getID()
Returns the object ID of the TopicMapObject. |
Locator |
getResourceLocator()
Deprecated. From 0.9.0 use getSourceLocators() |
java.util.Set |
getSourceLocators()
Returns the Locators of the XML or other resources which contributed to this topic map object. |
TopicMap |
getTopicMap()
Returns a handle to the topic map which this object is part of. |
void |
removeMultiValuePropertyChangeListener(MultiValuePropertyChangeListener listener)
Removes a MultiValue Property Change Listener. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
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 |
removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
|
void |
setID(java.lang.String id)
Sets the object ID of the TopicMapObject. |
void |
setResourceLocator(Locator loc)
Deprecated. From 0.9.0 use addSourceLocator(Locator) |
| Method Detail |
public void setID(java.lang.String id)
throws DuplicateObjectIDException,
DuplicateResourceLocatorException
id - the new internal object ID.
DuplicateObjectIDException - If an attempt is made to
set the object's ID to a value already assigned to
an object in the same TopicMap.
DuplicateResourceLocatorException - If the resource locator of the
object being updated clashes with the resource locator of
an existing object.public java.lang.String getID()
getResourceLocator().
setID(java.lang.String)public Locator getResourceLocator()
getSourceLocators()
public void setResourceLocator(Locator loc)
throws DuplicateResourceLocatorException
addSourceLocator(Locator)
loc - the creating Locator.
DuplicateResourceLocatorException - if loc is already
assigned as a resource locator to some other topic map object.public java.util.Set getSourceLocators()
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.
public void addSourceLocator(Locator loc)
throws DuplicateResourceLocatorException
loc - the locator of the contributing resource
DuplicateResourceLocatorException - if loc is already
assigned as a resource locator to some other topic map object in the
same TopicMap.public void removeSourceLocator(Locator loc)
loc - the locator to be removedpublic TopicMap getTopicMap()
public void addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
propertyName - The property whose changes the listener monitors.listener - The new listener to be registered. It only listens
for changes in the property specified by propertyName.public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener - The new listener to be registered. It listens
for changes in all available properties.public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener - The listener to be removed.
public void removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
propertyName - The property that the listener should be removed fromlistener - The listener to be removed
public void firePropertyChange(java.lang.String propertyName,
java.lang.Object oldVal,
java.lang.Object newVal)
oldVal equals newVal,
no property change event is actually fired.
propertyName - 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.public void firePropertyChange(java.beans.PropertyChangeEvent propertyChange)
propertyChange - The PropertyChangeEvent to be fired.
The Property Change Listener is
responsible for handling changes to this
particular property is selected automatically.
public void addMultiValuePropertyChangeListener(java.lang.String propertyName,
MultiValuePropertyChangeListener listener)
propertyName - The property whose changes the listener monitors.listener - The new listener to be registered. It only listens
for changes in the property specified by propertyName.public void addMultiValuePropertyChangeListener(MultiValuePropertyChangeListener listener)
listener - The new listener to be registered. It listens
for changes in all available properties.public void removeMultiValuePropertyChangeListener(MultiValuePropertyChangeListener listener)
listener - The listener to be removed.
public void fireMultiValuePropertyChange(java.lang.String propertyName,
int operation,
java.lang.Object operand)
propertyName - The name of the property modified.operation - The type of modification to the property. Allowed values are
specified in the class
MultiValuePropertyChangeEventoperand - 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.public void fireMultiValuePropertyChange(MultiValuePropertyChangeEvent propertyChange)
propertyChange - The MultiValuePropertyChangeEvent to be fired.
The MultiValue Property Change Listener is
responsible for handling changes to this
particular property is selected automatically.public void addVetoableChangeListener(java.beans.VetoableChangeListener listener)
public void removeVetoableChangeListener(java.beans.VetoableChangeListener listener)
public void fireVetoableChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
throws java.beans.PropertyVetoException
java.beans.PropertyVetoException
public void destroy()
throws IntegrityViolationException,
java.beans.PropertyVetoException
IntegrityViolationException - If this object is still referenced from
one or more other topic map objects.
java.beans.PropertyVetoException - if the removal of the object (or one of its children) from
the topic map was vetoed by a listener. Depending upon the back-end implementation
used, the object or its children may or may not have been modified.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||