[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.modeling.mdt.uml2.uml] Re: How to specify XOR generalisation?

Florian,

Yes, I believe you would use a disjoint generalization set to express this. 
There is similar example on page 80 of ptc.06-04-02 that shows how a Person 
can be either Male or Female...

Kenn

"Florian Georg" <florian.georg@xxxxxxxxxx> wrote in message 
news:em8kot$cqq$1@xxxxxxxxxxxxxxxxxxxx
> Hello,
> I'm wondering how to express a xor generalization in the UML2 model.
>
> e.g. Person <|-- Natural Person, Legal Person
> Meaning that a person can be a natural or legal person, but not both at 
> the same time.
>
> Do I have to use OCL constraints for that, or are there other 
> possibilities (e.g. generalization Sets) to express this relation in a 
> model?
>
> thanks in advance,
> Florian