3. UML Basic Structural Modeling 3
Common Mechanisms
Specifications
Adornments
Notes
Common Divisions
Extensibility Mechanisms
stereotypes
tagged values
constraints
4. UML Basic Structural Modeling 4
Adornments: Note
• Adornment that stands alone
• Note is a graphical symbol for rendering constraints
or comments attached to an element
• Used to specify things like requirements,
oservations, reviews, and explanations
• Can be simple text,an embedded URL, a link to a
document
Note
5. UML Basic Structural Modeling 5
Adornments: Note
• Examples
See URL
Shuttle.nasa.gov
Mission
full_name : string
Shuttle
start_engines()
stop_engines()
fuel_level() : integer
launch(t:time)
Launch time is
computed from
ephemeris
6. UML Basic Structural Modeling 6
Stereotypes
• Allows to extend the vocabulary of the UML
• Allows to create new building blocks, specific to
your problem
• Can be applied to any element (Class, Attribute,
Operation, …)
• Can be represented by
<< stereotype >>
new icon
both
7. UML Basic Structural Modeling 7
Stereotypes
a class can have a stereotype indicating what basic type
of class it is (e.g. controller, actor, interface)
represent a metaclassification of the class
appear within guillemets in normal type above the class
name
Window
size : Area = (100, 100)
visibility : Boolean = invisible
display ()
hide ()
«user interface»
8. UML Basic Structural Modeling 8
Operation Stereotypes
stereostypes can also be used to group together
operations with common characteristics
represent a metaclassification of the operation
BadSocket
throw()
log (String)
«helper»
setSocket(Socket)
«access»
getID():SocketID
setID(SocketID)
«exception»
10. UML Basic Structural Modeling 10
Tagged Values
• Apply to any element of the UML
• Metadata that applies to the element not its instances
• Represent arbitrary information expressed in text form
• Commonly used to store Project Management
information
• Examples:
author of an element Author=John Smith
testing status Test = No
version number Version # = 4.2
11. UML Basic Structural Modeling 11
Constraints
restrict the values that object or links can assume
expressed as arbitrary expressions enclosed in braces
near the constrained elements
often use navigation expressions
constraints between two elements are depicted using a
dotted, labeled line
Astronaut
Member-of
Crew
Commander-of
{subset}
4..6 *
*1