|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The base interface for an object which may contain a list of child Variants.
Rather than only allowing for variants being defined as children of
base names, XTM also provides the possibility of nesting variants, thus establishing
a context hierarchy in which variants at lower levels inherit
the parameter contexts of their ancestors. TM4J deals with
this provision by providing this interface being
the parent interface for both BaseName
and Variant
.
BaseName
,
Variant
Method Summary | |
void |
addVariant(Variant variant)
Adds a new child variant to this object. |
Variant |
createVariant(java.lang.String id)
Creates a new child variant of this object. |
java.util.Collection |
getVariants()
Returns the child Variants as an unmodifiable collection of Variant objects. |
void |
setVariants(Variant[] variants)
Sets the child variants of this object. |
Method Detail |
public java.util.Collection getVariants()
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
.
Variant
s.
If no child variants are currently defined on this
object, the returned collection is empty;
it is never null
.public void setVariants(Variant[] variants) throws java.beans.PropertyVetoException
variants
- the new set of child variants this object
contains. If this is null
,
all the existing variants contained
in this object are removed.
java.beans.PropertyVetoException
public void addVariant(Variant variant) throws java.beans.PropertyVetoException
variant
- the new child Variant
.
java.beans.PropertyVetoException
public Variant createVariant(java.lang.String id) throws DuplicateObjectIDException, java.beans.PropertyVetoException
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.
DuplicateObjectIDException
- if id
specifies and identifier
value already used in the containing TopicMap.
java.beans.PropertyVetoException
- if to create a new Variant for this object would
violate a constraint imposed by a VetoableChangeListener assigned to
the containing TopicMap.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |