org.tm4j.topicmap
Interface BaseName

All Superinterfaces:
ScopedObject, TopicMapObject, VariantContainer
All Known Implementing Classes:
UnifiedBaseName

public interface BaseName
extends ScopedObject, VariantContainer

This interface describes a base name associated with a topic. A base name is the base form of a topic name; it is always a string. Base names can be scoped, meaning that the name is valid only within certain constraints. A popular way of using scoped base names is to define natural languages as scopes and to thereby be able to name a topic in various languages. One of the trickier implications of this is the Topic Naming Constraint, stating that if in a topic map context there are two topics with identical names in identical scopes, they must be merged. Basic names can also contain Variants, which need not necessarily represent strings. Scopes and variants can be addressed by implementing classes by using the methods of the parent ScopedObject and VariantContainer interfaces, respectively.

For more information about topic names, see the XTM 1.0 Specification..

Author:
Kal Ahmed

Method Summary
 java.lang.String getData()
          Returns the data string for this name.
 Topic getParent()
          Returns the Topic object which contains this BaseName.
 void setData(java.lang.String data)
          Sets the data string for this name.
 
Methods inherited from interface org.tm4j.topicmap.ScopedObject
addTheme, dispose, getScope, inScope, inScope, removeTheme, setScope
 
Methods inherited from interface org.tm4j.topicmap.TopicMapObject
addMultiValuePropertyChangeListener, addMultiValuePropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, addSourceLocator, addVetoableChangeListener, destroy, fireMultiValuePropertyChange, fireMultiValuePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getID, getResourceLocator, getSourceLocators, getTopicMap, removeMultiValuePropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener, removeSourceLocator, removeVetoableChangeListener, setID, setResourceLocator
 
Methods inherited from interface org.tm4j.topicmap.VariantContainer
addVariant, createVariant, getVariants, setVariants
 

Method Detail

getData

public java.lang.String getData()
Returns the data string for this name.

Returns:
The data string.

setData

public void setData(java.lang.String data)
             throws java.beans.PropertyVetoException
Sets the data string for this name.

Parameters:
data - the new data string.
Throws:
java.beans.PropertyVetoException - If a listener vetos the update

getParent

public Topic getParent()
Returns the Topic object which contains this BaseName.

Returns:
This BaseName's parent object. Since XTM allows BaseNames only to be contained within Topics, this must always be an object of a class which implements Topic.