How to draw a constraint like this in PlantUML
Draw constraint in PlantUML
525 Views Asked by user877329 At
1
There are 1 best solutions below
Related Questions in UML
- steps to create a web app with backend and database and web
- How to present this example concept in UML: Using 2 LCD displays in C/C++
- In the UML diagram, in the Class diagram, what does stereotype mean <<compound>>?
- UML representation of containerized services
- uml class diagram for boxing match
- Polymorphism can be described as:
- Why am I getting a plantUML syntax error with a statechart in a package?
- System or external system as an actor in a use case?
- How to model statechart behavior inheritance using UML?
- Can we have an interface create objects of another interface in UML Class Diagrams?
- Is my relationships correct in my class diagram
- How to attach a Port shape to a class shape?
- How to correctly create a sequence diagram?
- How can I insert activity diagram image to an use case in Enterprise architect?
- Use case extends or include
Related Questions in TYPE-CONSTRAINTS
- Creating std subrange from boost archive iterators
- How can I type a generic function in TypeScript?
- How to specify a type family with multiparameter injectivity?
- How can I add a method to an interface already used in a union term?
- Consolidating 2 generic types into one for a generic function call
- Cannot return null in function whose return type is generic
- C# Recursion using reflection on a where type constraint
- Further constraining a type parameter in Golang (implementing generic List with Contains method)
- Why type parameter order is important when using components?
- Return an empty JSON object, valid JSON object, or list of JSON objects in Smithy
- F# type constrains subtyping
- Typescript: Type unwrapping properties of specific generic type
- Create many generic types with similar shape
- How to use an interface containing type constraint as generic
- How to define a superclass constraint for free monoids?
Related Questions in PLANTUML
- Unable to generate plantuml diagram when trying to use "iplantuml" in Jupyter Notebook within vscode
- Syntax error when trying to use "iplantuml" in Jupyter Notebook
- Why am I getting a plantUML syntax error with a statechart in a package?
- How do I show an array of values in plantuml?
- using plantuml %load_json in DocToolchain
- PlantUML in Visual Studio?
- Link map key to an entity that hasn't been defined yet in a PlantUML object diagram
- How to Cross-Reference Plantuml Diagram in Sphinx
- Repeat while loop after a condition in PlantUML activity diagram
- How do I position the interface on top?
- Issue with vertical alignment of UML elements from PlantUML
- How to center allign literals compartment title in Enum class diagram?
- Rendering PlantUML in Markdown in VscCode Preview and Gitlab
- PlantUML groups, rectangles, partitions, etc in Use Case diagrams
- How to integrate openiconic with plantuml.jar?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?

PlantUML technique 1
There's no easy way to do this, because PlantUML doesn't give a syntax that allows to relate lines. The best you could achieve is this:
You can achieve this by association two elements and creating a pair of the same elements, e.g.
(Account, Person).This creates a composite element with two line segments related by the dot. You can then relate both pairs with...to get a dotted line, and name this relation by adding a trailing: {xor}:PlantUML technique 2
Another alternative is to use a comment box to include the constraint. This is by the way the usual notation when attaching a constraint to an element. You can then combine the pairing techniques with a note attached to each of the pairs (source: this tutorial in French):
UML Design improvement
In reality such constraints should be minimized as much as possible, because they often only hide a missing abstraction. I would therefore not use the {xor} and rather consider :
By the way, the grouping of multiple inheritance relations is also achieved with pairing, as explained here.