4

enter image description here

Please explain me, what {optional} means in ship description.

Is it some value from UML documentation or a mistake?

Geert Bellekens
  • 12,788
  • 2
  • 23
  • 50
J. Doe
  • 49
  • 1
  • 6

1 Answers1

5

I think (!) this is an invention of StarUML (since I suppose you used this tool to create it). UML does not have such a property modifier (see p. 111 of the UML specs for a complete list of valid keywords). Optionality is represented by adding a multiplicity [0..1] like this:

enter image description here

However, I guess everyone could easily recognize the same semantic from that {optional} property modifier.

qwerty_so
  • 35,448
  • 8
  • 62
  • 86
  • @granier I fostered the specs and there's nothing in that direction. Where did you see that? – qwerty_so Jan 02 '18 at 16:34
  • "A lower bound of zero means the Parameter is optional" section 9.4.3.4. for Feature and Operation inherits of Feature ... – granier Jan 02 '18 at 16:38
  • @granier That's what I say. But that property above does not exist. – qwerty_so Jan 02 '18 at 16:39
  • @Kilian i am not sure to understand what you mean by "that property above does not exist" which one ? What i cited is for Feature ... For property, for me, {optional} does not exist in the specification. – granier Jan 02 '18 at 17:04
  • @granier Where did I say "that property above does not exist"? – qwerty_so Jan 02 '18 at 17:07
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/162363/discussion-between-granier-and-thomas-kilian). – granier Jan 02 '18 at 17:08
  • I looked quickly to OCL specification, since text between parenthesis should be constraint. I did not find anything about a an optional keyword. – granier Jan 04 '18 at 09:53
  • See p. 111 of the specs: property modifiers are also enclosed in curly brackets. – qwerty_so Jan 04 '18 at 12:19
  • yes these modifiers may be seen as constraint, the last one is a constraint : ::= ‘readOnly’ | ‘union’ | ‘subsets’ | ‘redefines’ | ‘ordered’ | ‘unordered’ | ‘unique’ | ‘nonunique’ | ‘seq’ | ‘sequence’ | ‘id’ | . But anyway optional is neither defined as constraint in the specification nor in OCL specifiation. Or I miss something, which is possible. – granier Jan 04 '18 at 12:50