"2nd Order" UML Parsing Analysis: use a «wrapper» Component as a container for the source text, and relate it to model elements using a Relationship
The full UMLTM Parsing Analysis recipe can only be exploited when the relationship between source text and model elements can be traced. A relatable parsing container for snippets of source text is needed, from which one can draw a Relationship such as a Dependency, Association, or ComponentRealization, depending on the container and purpose.
To this end, a Classifier (such as a Component or Artifact) can be used, where the NamedElement.name is typically used to carry one sentence of source text
(usually combined with suitable styling of the element so that the name reads like regular text).
The Class is not well suited, because it is not a good graphical container for logical grouping, and if source text is to be related to Class elements it can be confusing to use a Class for the model and the source text.
The Artifact (being generally associated with external software artifacts) offers itself, however it is not able to sufficiently graphically and logically group a wide range of elements, and does not nest well.
Best by far is the UML Component, which can be happily misappropriated for this purpose in some UML tools.
I call UML Components used this way parsing «wrapper» Components, because they graphically "wrap" other model elements. When they are also only used to logically group other model elements (without "stealing" physical ownership of the graphically grouped elements), I call them logical «wrapper» Components:
IMPORTANT: UML Components misappropriated in this fashion for UMLTM Parsing Analysis SHOULD be clearly stereotyped by a «wrapper» stereotype, or an extending sub-stereotype, such as «source» as an indicator of the source of the "parsed" text snippet that names the Component used as a relatable parsing container.
Thus, a «source» Component is a special kind of «wrapper» Component, one that provides a logical context for relating other UML model elements to the text that names the Component, and which also can provide a graphical grouping of those elements within the boundary of the Component.
In many UML tools, some types of elements that are graphically contained/placed inside a Component will be related to that Component automatically by a ComponentRealization, so that 1 analysis model element can be easily traced to zero or more parsing «source» Components.
This is the fundamental idea behind "2nd Order" UMLTM Parsing Analysis. And it is very useful and powerful !
- Login to post comments
Zones
- IT zone
- UML zone
- Galleries meta-index: overview of all UML and SysML gallery groups
- UML metaclasses and metamodel overview
- UML Parsing Analysis zone
- Galleries index: UML Parsing Analysis examples
- Tutorial: the UML Parsing Analysis recipe(s)
- "0th order" UML Parsing Analysis: source text in UML text boxes as cosmetic "parsing container", no Relationships.
- "1st order" UML Parsing Analysis: stereotyped Comment as a simple source text container related to UML model elements by "handles"
- "2nd Order" UML Parsing Analysis: use a «wrapper» Component as a container for the source text, and relate it to model elements using a Relationship
- External: MagicDraw UML eSchool: UML Parsing Analysis tutorial trail
- Examples
- Gallery: UML Parsing Analysis demonstration: Wikipedia Shapes (from 2009)
- UML Parsing Analysis: notes and reusable policies
- Gallery: UML Parsing Analysis: miscellaneous examples and supplementary diagrams
- UML tools zone
- SysML zone
- UML: notes
- Galleries index: some miscellaneous (and curious) UML galleries
- Tutorial: some UML modelling and diagramming tips, tricks, and best practices
- Tutorial: the UML2 Component as a logical and graphical «wrapper» (MagicDraw-centric)
- UML for Software Development
- Towards Executable UML
- Animated and simulated UML
- Java zone
- XML zone
- Drupal CMS zone
- OMG zone
- C++ zone
- Eclipse zone
- Netbeans IDE zone
- Puredata synthesis zone
- Shibboleth zone
- Tools and Tips
- UML zone




















