|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This interface is used to define an alternate naming scheme for a topic. In XTM, a variant comprises a set of parameters (a context in which the variant is to be interpreted), and the actual variant name, which can be defined either as a character string or a reference to an external resource.
VariantContainer| Method Summary | |
void |
addParameter(Topic parameter)
Adds a parameter to the variant. |
VariantName |
createVariantName(java.lang.String id)
Creates a new VariantName as a child of this Variant. |
java.util.Collection |
getParameters()
Returns the parameters of this variant as an unmodifiable Collection of Topic objects. |
java.util.Collection |
getParameters(boolean getAll)
Returns the parameters of this variant and, if so specified, all ancestor variants, as an unmodifiable Collection of Topic objects. |
VariantContainer |
getParent()
Returns the object containing this variant. |
VariantName |
getVariantName()
Returns the name for this Variant. |
void |
setParameters(Topic[] parameters)
Sets the parameters of this variant, overwriting any existing parameters. |
void |
setVariantName(VariantName name)
Sets the VariantName contained by this Variant. |
| Methods inherited from interface org.tm4j.topicmap.VariantContainer |
addVariant, createVariant, getVariants, setVariants |
| Method Detail |
public VariantName getVariantName()
public void setVariantName(VariantName name)
throws java.beans.PropertyVetoException
name - The VariantName child to be added to this object, or
null to remove any existing child from this object.
java.beans.PropertyVetoException - If a VetoableChangeListener vetos the replacement of the name.
public VariantName createVariantName(java.lang.String id)
throws java.beans.PropertyVetoException,
DuplicateObjectIDException
id - the unique object id to be assigned to the new VariantName object. If
this parameter is null, the back-end will assign an ID to the
newly created object.
DuplicateObjectIDException - if id specifies and identifier
value already used in the containing TopicMap.
java.beans.PropertyVetoException - if to create a new VariantName for this Variant would
violate a constraint imposed by a VetoableChangeListener assigned to
this TopicMap.
public void addParameter(Topic parameter)
throws java.beans.PropertyVetoException
parameter - The topic reference to be used as a variant parameter.
java.beans.PropertyVetoException - If a VetoableChangeListener vetos the addition of parameterpublic java.util.Collection getParameters()
Topic objects. Note that this method
only provides the parameters specifically defined on
this Variant itself. In order to retrieve
a collection of all parameters defined on this variant
and its ancestors, use getParameters(boolean).
Topics defining this variant's
parameters.
If no parameters are currently defined on this
variant, the returned collection is empty;
it is never null.public java.util.Collection getParameters(boolean getAll)
Topic objects.
getAll - If true, then parameters from all ancestor containers
are returned. If false, just the parameters of this
Variant itself are returned.
Topics defining this variant's
parameters.
If no parameters are currently defined on this
variant (or ancestors), the returned collection is empty;
it is never null.
public void setParameters(Topic[] parameters)
throws java.beans.PropertyVetoException
parameters - the new set of parameters to be used with
this variant. If this is null,
all the existing parameters of this variant
are removed.
java.beans.PropertyVetoException - If the update of the parameters
was vetoed.public VariantContainer getParent()
BaseName, or, in case of variant nesting, another
Variant.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||