org.tmapi.core
Interface Name

All Superinterfaces:
Construct, Reifiable, Scoped, Typed

public interface Name
extends Typed, Scoped, Reifiable

Represents a topic name item.

Version:
$Rev: 123 $ - $Date: 2009-10-01 19:17:03 +0200 (Do, 01 Okt 2009) $
Author:
The TMAPI Project

Method Summary
 Variant createVariant(Locator value, java.util.Collection<Topic> scope)
          Creates a Variant of this topic name with the specified IRI value and scope.
 Variant createVariant(Locator value, Topic... scope)
          Creates a Variant of this topic name with the specified IRI value and scope.
 Variant createVariant(java.lang.String value, java.util.Collection<Topic> scope)
          Creates a Variant of this topic name with the specified string value and scope.
 Variant createVariant(java.lang.String value, Locator datatype, java.util.Collection<Topic> scope)
          Creates a Variant of this topic name with the specified value, datatype, and scope.
 Variant createVariant(java.lang.String value, Locator datatype, Topic... scope)
          Creates a Variant of this topic name with the specified value, datatype, and scope.
 Variant createVariant(java.lang.String value, Topic... scope)
          Creates a Variant of this topic name with the specified string value and scope.
 Topic getParent()
          Returns the Topic to which this name belongs.
 java.lang.String getValue()
          Returns the value of this name.
 java.util.Set<Variant> getVariants()
          Returns the Variants defined for this name.
 void setValue(java.lang.String value)
          Sets the value of this name.
 
Methods inherited from interface org.tmapi.core.Typed
getType, setType
 
Methods inherited from interface org.tmapi.core.Scoped
addTheme, getScope, removeTheme
 
Methods inherited from interface org.tmapi.core.Reifiable
getReifier, setReifier
 
Methods inherited from interface org.tmapi.core.Construct
addItemIdentifier, equals, getId, getItemIdentifiers, getTopicMap, hashCode, remove, removeItemIdentifier
 

Method Detail

getParent

Topic getParent()
Returns the Topic to which this name belongs.

Specified by:
getParent in interface Construct
Returns:
The topic to which this name belongs.
See Also:
Construct.getParent()

getValue

java.lang.String getValue()
Returns the value of this name.

Returns:
A string representing the value of this name.

setValue

void setValue(java.lang.String value)
              throws ModelConstraintException
Sets the value of this name. The previous value is overridden.

Parameters:
value - The name string to be assigned to the name.
Throws:
ModelConstraintException - If the the value is null.

getVariants

java.util.Set<Variant> getVariants()
Returns the Variants defined for this name. The return value may be empty but must never be null.

Returns:
An unmodifable set of Variants.

createVariant

Variant createVariant(java.lang.String value,
                      Topic... scope)
                      throws ModelConstraintException
Creates a Variant of this topic name with the specified string value and scope.

The newly created Variant will have the datatype xsd:string.

The newly created Variant will contain all themes from the parent name and the themes specified in scope.

Parameters:
value - The string value.
scope - An array (length >= 1) of themes.
Returns:
The newly created Variant.
Throws:
ModelConstraintException - If the value is null, or the scope of the variant would not be a true superset of the name's scope.

createVariant

Variant createVariant(java.lang.String value,
                      java.util.Collection<Topic> scope)
                      throws ModelConstraintException
Creates a Variant of this topic name with the specified string value and scope.

The newly created Variant will have the datatype xsd:string.

The newly created Variant will contain all themes from the parent name and the themes specified in scope.

Parameters:
value - The string value.
scope - A collection (size >= 1) of themes.
Returns:
The newly created Variant.
Throws:
ModelConstraintException - If the value is null, or the scope of the variant would not be a true superset of the name's scope.

createVariant

Variant createVariant(Locator value,
                      Topic... scope)
                      throws ModelConstraintException
Creates a Variant of this topic name with the specified IRI value and scope.

The newly created Variant will have the datatype xsd:anyURI.

The newly created Variant will contain all themes from the parent name and the themes specified in scope.

Parameters:
value - A locator which represents an IRI.
scope - An array (length >= 1) of themes.
Returns:
The newly created Variant.
Throws:
ModelConstraintException - If the value is null, or the scope of the variant would not be a true superset of the name's scope.

createVariant

Variant createVariant(Locator value,
                      java.util.Collection<Topic> scope)
                      throws ModelConstraintException
Creates a Variant of this topic name with the specified IRI value and scope.

The newly created Variant will have the datatype xsd:anyURI.

The newly created Variant will contain all themes from the parent name and the themes specified in scope.

Parameters:
value - A locator which represents an IRI.
scope - A collection (size >= 1) of themes.
Returns:
The newly created Variant.
Throws:
ModelConstraintException - If the value is null, or the scope of the variant would not be a true superset of the name's scope.

createVariant

Variant createVariant(java.lang.String value,
                      Locator datatype,
                      Topic... scope)
                      throws ModelConstraintException
Creates a Variant of this topic name with the specified value, datatype, and scope.

The newly created Variant will have the datatype specified by datatype.

The newly created Variant will contain all themes from the parent name and the themes specified in scope.

Parameters:
value - A lexical string representation of the value.
datatype - A locator indicating the datatype of the value.
scope - An array (length >= 1) of themes.
Returns:
The newly created Variant.
Throws:
ModelConstraintException - If the value or datatype is null, or the scope of the variant would not be a true superset of the name's scope.

createVariant

Variant createVariant(java.lang.String value,
                      Locator datatype,
                      java.util.Collection<Topic> scope)
                      throws ModelConstraintException
Creates a Variant of this topic name with the specified value, datatype, and scope.

The newly created Variant will have the datatype specified by datatype.

The newly created Variant will contain all themes from the parent name and the themes specified in scope.

Parameters:
value - A lexical string representation of the value.
datatype - A locator indicating the datatype of the value.
scope - A collection (size >= 1) of themes.
Returns:
The newly created Variant.
Throws:
ModelConstraintException - If the value or datatype is null, or the scope of the variant would not be a true superset of the name's scope.