org.tm4j.topicmap.unified
Class UnifiedBaseName

java.lang.Object
  extended byorg.tm4j.topicmap.unified.UnifiedTopicMapObject
      extended byorg.tm4j.topicmap.unified.UnifiedScopedObject
          extended byorg.tm4j.topicmap.unified.UnifiedBaseName
All Implemented Interfaces:
BaseName, ScopedObject, TopicMapObject, VariantContainer

public class UnifiedBaseName
extends UnifiedScopedObject
implements BaseName


Field Summary
 
Fields inherited from class org.tm4j.topicmap.unified.UnifiedTopicMapObject
m_tm
 
Constructor Summary
UnifiedBaseName(UnifiedTopicMap tm, BaseName base)
           
 
Method Summary
 void addVariant(Variant v)
          Adds a new child variant to this object.
 Variant createVariant(java.lang.String id)
          Creates a new child variant of this object.
 java.lang.String getData()
          Returns the data string for this name.
 Topic getParent()
          Returns the Topic object which contains this BaseName.
 java.util.Collection getVariants()
          Returns the child Variants as an unmodifiable collection of Variant objects.
 void setData(java.lang.String s)
          Sets the data string for this name.
 void setParent(Topic t)
           
 void setVariants(Variant[] v)
          Sets the child variants of this object.
 
Methods inherited from class org.tm4j.topicmap.unified.UnifiedScopedObject
addTheme, dispose, getScope, inScope, inScope, removeTheme, setScope
 
Methods inherited from class org.tm4j.topicmap.unified.UnifiedTopicMapObject
addMultiValuePropertyChangeListener, addMultiValuePropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, addSourceLocator, addVetoableChangeListener, destroy, equals, fireMultiValuePropertyChange, fireMultiValuePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, getBaseObject, getID, getResourceLocator, getSourceLocators, getTopicMap, hashCode, removeMultiValuePropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener, removeSourceLocator, removeVetoableChangeListener, setID, setResourceLocator, unsupported
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
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
 

Constructor Detail

UnifiedBaseName

public UnifiedBaseName(UnifiedTopicMap tm,
                       BaseName base)
Method Detail

getData

public java.lang.String getData()
Description copied from interface: BaseName
Returns the data string for this name.

Specified by:
getData in interface BaseName
Returns:
The data string.

setData

public void setData(java.lang.String s)
Description copied from interface: BaseName
Sets the data string for this name.

Specified by:
setData in interface BaseName
Parameters:
s - the new data string.

getParent

public Topic getParent()
Description copied from interface: BaseName
Returns the Topic object which contains this BaseName.

Specified by:
getParent in interface 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.

setParent

public void setParent(Topic t)

getVariants

public java.util.Collection getVariants()
Description copied from interface: VariantContainer
Returns the child Variants as an unmodifiable collection of Variant objects. Note that this method will not descend any nesting of variants inside variants, but will instead only return the immediate child variants of this VariantContainer.

Specified by:
getVariants in interface VariantContainer
Returns:
The collection of direct child Variants. If no child variants are currently defined on this object, the returned collection is empty; it is never null.

addVariant

public void addVariant(Variant v)
Description copied from interface: VariantContainer
Adds a new child variant to this object.

Specified by:
addVariant in interface VariantContainer
Parameters:
v - the new child Variant.

setVariants

public void setVariants(Variant[] v)
Description copied from interface: VariantContainer
Sets the child variants of this object. All existing child variants are previously removed.

Specified by:
setVariants in interface VariantContainer
Parameters:
v - the new set of child variants this object contains. If this is null, all the existing variants contained in this object are removed.

createVariant

public Variant createVariant(java.lang.String id)
Description copied from interface: VariantContainer
Creates a new child variant of this object.

Specified by:
createVariant in interface VariantContainer
Parameters:
id - the unique identifier to be assigned to the newly created Variant. If null is passed in, then the backend will generate a unique identifier for the new Variant.
Returns:
the newly created Variant. The new Variant has no data or dataLocator set and no parameters specified.