How to make an instance specification of a structured datatype in an UML profile [message #1758311] |
Mon, 27 March 2017 14:53 |
Benedikt Bauer Messages: 24 Registered: March 2017 |
Junior Member |
|
|
Let's assume I want to build a UML profile for my hypothetical shirt factory. Since I'm not a custom tailor but produce only some fixed sizes, I have a very limited set of sizes and for every size, several other parameters such as collar width, sleeve length and the like are directly correlated to each size. For example, a size M shirt has collar width a and sleeve length x, while a size L shirt has collar width b and sleeve length y and so on.
Now I would like to create a steretype "shirt" with one of the assigned properties being the shirt size as an enumerationof all my shirt sizes from S to XXL to choose my size. However, the enumeration shall not only contain the string literals S to XXL but also the dependent other values.
My current approach is to have a class stereotype "shirt" and a data type "shirtSize", which has the properties "collar width", "sleeve length" and so on. Then I want to create an instance specification for every one of my sizes where I specify the values as they are defined in my "shirtSize" data type. For that, I create an instance specification named according to one of my sizes, e.g. "M" and typed with my "shirtSize" data type.
Now, I would expect, that I can somehow access the properties that are defined in the "shirtSize" data type to assign actual values to them. However, I can't find such a possibility. Can someone give me a hint or tell me whether I just have taken a wrong turn somewhere in my thought model?
Thanks a lot.
|
|
|
|
|
|
Re: How to make an instance specification of a structured datatype in an UML profile [message #1758397 is a reply to message #1758378] |
Tue, 28 March 2017 12:04 |
Benedikt Bauer Messages: 24 Registered: March 2017 |
Junior Member |
|
|
Hi Ed,
looks like we had a different perception of "computable". using it your way, I can of course find an algorithm that determines y from x.
However, the things I had in mind was something like a "struct" in c, a "dict" or "namedtuple" in python or a rather simple class in most object-oriented languages, that just holds some values in an easily acessible way. IAL, a concept, that allows me to define an abstract thing -- for clarity I avoid terms like object, class, structure and the like -- to classify a certain type of information that always has the same type of elements.
As I have thought abit longer about my problem, it boils down to the question: When I create a UML instance specification of some object that has abstract member elements (attributes), I set this object as classifier of the instance specification. Now for me the obvious workflow would be to have some type of interface where I can assign actual values to the member elements defined in the classifying object. Instead, the only way I see is to generate and type all the instance values by hand, which -- in my opinion -- carries the whole idea of having a classifying object ad absurdum.
I hope my pain did get a bit clearer now.
Cheers
Benedikt
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03522 seconds