[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.uml2] Re: Proper use of Substitution within data models

Hi Tas,

>From what you are describing Substitution seems appropriate.   You might
also consider a straight Realization (not InterfaceRealization ) or
Dependency if you want to be less specific.

I don't think Substitution specifically applies to Components.   There is
discussion about ports and interfaces in the spec in the area of
Substitution, but keep in mind that any StructuredClassifier can have ports
( ports are properties tucked away in the
StructuredClassifier::ownedAttribute collection ).    The spec talks about
that relationship going between generic Classifiers.

If you use substitution you could type your property in the high-level
container with the contract classifier.   Then specify that all the related
types conform to the contract classifier.   Is this what you had in mind?

Let me know how you finally decide to do this but what you are talking about
seems reasonable.

Cheers,

- James.




"Tas Frangoullides" <tas.frangoullides@xxxxxxxxxxxxxxxxxx> wrote in message
news:1a380360a07048b7407b822c550fead6$1@xxxxxxxxxxxxxxxxxx
> Hi,
>
> I have a question that relates more to the UML and its correct usage
> rather than the use of the UML2 API. Please let me know if this newsgroup
> is not right place for it. Is the modeling newsgroup better?
>
> I have an abstract data model which will be programatically transformed to
> XML Schema using well defined mappings rules. One of the concepts I need
> to represent is a high-level container class with a property that contains
> items whose type could be one of a number of unrelated types.  By
> unrelated I mean that they do not have a common ancenstor via
> generalization. I don't want to use generalization becuase it feels like
> the wrong relationship semanticly.
>
> I am wondering what constructs to use. Substitution seems to be the right
> choice here but the definitions in the spec lean towards a software
> component which makes me question the choice. Is it still appropriate for
> data only modelling. I am also not sure about the approach becuase I need
> to create a new abstract class to act as the contract for substitution,
> this class then needs to be identified as special during transformation.
> I'd also need to prevent attributes and operations from being defined on
> this class becuase its not meaningful for what I'm trying to do, so maybe
> I'd need a stereotype... all this makes me wonder if I'm on the right
> track.
>
> Any pointers?
>
> Thanks,
>
> Tas.
>
>