-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting Multiplicities for a Reference Variable #4
Comments
Hi @ialazzon, Thanks for the ticket, once again, as you probably saw, the way of setting a cardinality for a import pyuml2.uml as uml2
# cardinality 0..*
p = uml2.Property()
p.lowerValue = uml2.LiteralInteger(value=0)
p.upperValue = uml2.LiteralUnlimitedNatural(value=-1) # will be encoded and serialized as "*"
# cardinality 1..5
p = uml2.Property()
p.lowerValue = uml2.LiteralInteger(value=1)
p.upperValue = uml2.LiteralInteger(value=5) |
How can one set the multiplicity for a reference? For example, let authors be a reference variable in class Book to Person. A book can have zero or more authors. How to set the multiplicity lower and upper bounds for the variable authors in class Book?
Thank you for your help.
The text was updated successfully, but these errors were encountered: