| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Represents the topic map topic name construct. In XTM, this construct is represented by
 the <baseName> element.
| Method Summary | |
 void | 
addScopingTopic(Topic topic)
Adds the scoping topic topic to the collection of Topics
 that define the scope of this name. | 
 Variant | 
createVariant(Locator resource,
              java.util.Collection scope)
Creates a variant of this topic name with the specified external resource locator and scopes.  | 
 Variant | 
createVariant(java.lang.String value,
              java.util.Collection scope)
Creates a variant of this topic name with the specified inline data string and scopes.  | 
 Topic | 
getReifier()
Returns the Topic that reifies this topic name.  | 
 Topic | 
getTopic()
Returns the Topic which contains this TopicName.  | 
 Topic | 
getType()
OPTIONAL: Returns the Topic that defines the type of this topic name.  | 
 java.lang.String | 
getValue()
Returns the name string of the TopicName  | 
 java.util.Set | 
getVariants()
Returns the variants defined for this TopicName.  | 
 void | 
remove()
Removes this TopicName from the collection of TopicNames managed by the parent Topic.  | 
 void | 
removeScopingTopic(Topic topic)
Removes a topic from the set which defines the scope/parameters for this object.  | 
 void | 
setType(Topic type)
OPTIONAL: Sets the Topic that defines the type of this topic name.  | 
 void | 
setValue(java.lang.String value)
Define the name string for this TopicName.  | 
| Methods inherited from interface org.tmapi.core.ScopedObject | 
getScope | 
| Methods inherited from interface org.tmapi.core.TopicMapObject | 
addSourceLocator, equals, getObjectId, getSourceLocators, getTopicMap, hashCode, removeSourceLocator | 
| Method Detail | 
public Topic getTopic()
public java.lang.String getValue()
null if this TopicName has no value.
public void setValue(java.lang.String value)
              throws MergeException
null value indicates that there is no name string for this TopicName.
value - The name string to be assigned to the TopicName.
MergeException - if the processor detects that a merge is required 
   and either automerge is disabled or automerge is enabled but the merge
   cannot be completed for some other reason.public java.util.Set getVariants()
null.
public Variant createVariant(java.lang.String value,
                             java.util.Collection scope)
value - The inline data string for the variant. Pass
         null for no string.scope - The scope for the Variant to be created. Must
          be a collection of Topic objects.
public Variant createVariant(Locator resource,
                             java.util.Collection scope)
resource - The locator of the external resource for the
          variant. Pass null for no reference.scope - The scope for the Variant to be created. Must
          be a collection of Topic objects.
public Topic getReifier()
null if the topic name 
         is not reified.public Topic getType()
null
null if the topic name does not
         have a type specified.
public void setType(Topic type)
             throws java.lang.UnsupportedOperationException,
                    MergeException
type - A Topic instance or null
              to remove any existing type.
java.lang.UnsupportedOperationException - if the processor
         does not support the XTM 1.1 model.
MergeException - if the processor detects that a merge is required 
   and either automerge is disabled or automerge is enabled but the merge
   cannot be completed for some other reason.
public void remove()
            throws TMAPIException
remove in interface TopicMapObjectTMAPIException - if the object cannot be removed from the container. Derived
   interfaces may define specific circumstances under which a subclass of TMAPIException
   must be raised. 
   Implementations MUST NOT use a TMAPIException to
   wrap a failure raised in the underlying engine - such errors must always be wrapped in a
   TMAPIRuntimeException.
public void addScopingTopic(Topic topic)
                     throws MergeException
topic to the collection of Topics
 that define the scope of this name.
addScopingTopic in interface ScopedObjecttopic - the scoping topic to be added to the scope of this name.
MergeException - if the processor detects that a merge is required
   and either automerge is disabled or automerge is enabled but the merge
   cannot be completed for some other reason.
public void removeScopingTopic(Topic topic)
                        throws MergeException
removeScopingTopic in interface ScopedObjecttopic - The topic to be remove from the set.
MergeException - if the processor detects that a merge is required
   and either automerge is disabled or automerge is enabled but the merge
   cannot be completed for some other reason.
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||