[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.modeling.mdt.uml2.uml] Re: EnumerationLiteral is an InstanceSpecification, so ...

Andy,

I don't think enumeration literals are meant to have slots - I suspect this 
is (yet another) case of "unintended inheritance", i.e. as in other areas of 
the specification, inheritance was used to reuse a certain aspect of the 
general classifier with little regard to what the implications/semantics 
were of inheriting that classifier's other characteristics.

If you're talking instances, then a single value would be represented by an 
instance value (instance of InstanceValue) that references a given 
enumeration literal (instance of EnumerationLiteral). A multivalued property 
typed by an enumeration would be represented by a slot that have multiple 
instance values (which in turn reference enumeration literals).

Kenn

"Andreas Maier" <maiera@xxxxxxxxxx> wrote in message 
news:emdvev$37o$1@xxxxxxxxxxxxxxxxxxxx
> Kenn,
> on 1., I think my question boils down to whether or not I can have 
> multiple slots and values on an EnumerationLiteral. There is no 
> restriction in the UML 2.1 Superstructure spec that would disallow this 
> and I would like to find out whether or not this is a bug in the spec.
>
> An Enumeration is used as a datatype by let's say a property. I could well 
> imagine that such a datatype could be of a multi-valued nature, i.e. a 
> single EnumerationLiteral has multiple Slots&Values.
>
> On a simpler point: If I look only at single-valued enumerations, which 
> UML metaclass attribute or association of EnumerationLiteral represents 
> the single value ? The specification association, or an entry in the slot 
> (array) association ?
>
> Andy
>
>
> Kenn Hussey wrote:
>> Andreas,
>>
>> 1. While it is a specialization of InstanceSpecification, it is really 
>> intended to be a run-time representation (instance) of an enumeration 
>> (only).
>>
>> 2. I'm not sure...
>>
>> Kenn
>>
>> "Andreas Maier" <maiera@xxxxxxxxxx> wrote in message 
>> news:embt43$8tc$1@xxxxxxxxxxxxxxxxxxxx
>>> ... the flexibility this introduces causes me to raise a few questions:
>>>
>>> 1. Is there any restriction as to what datatype an Enumeration can be
>>> used for ? Specifically, can it be any arbitrarily complex class ?
>>>
>>> 2. Can EnumerationLiterals be defined to represent a range ? (If the
>>> answer to question 1. is that classes can be used, then that should be
>>> possible ...)
>>>
>>> Andy
>>