Anda di halaman 1dari 8

UML Profile Diagrams Reference

Notation Description
Profile

Profile uses the same notation as a package, with the addition that the keyword «profile» is shown
before or above the name of the package.

Profile EJB

A profile can define classes, stereotypes, data types, primitive types, enumerations.

Profile Servers

Package since UML 2.4 has optional URI attribute which serves as unique identifier of the package.
Profile is a package, and the URI attribute was introduced mostly to support exchange of profiles using
XMI.

The URI attribute of a profile may be rendered in the form {uri=<uri>} after the profile name. See details
at URI package attribute.
EJB Profile shown as a package with URI attribute.

Metaclass

Metaclass is a profile class and a packageable element which may be extended through one or
more stereotypes.

A metaclass may be shown with the optional stereotype «Metaclass» shown above or before its name
(all lower-case «metaclass» was used in UML versions prior to 2.4).
Metaclass Component

Metaclass may be extended by one or more stereotypes using special kind of association -
extension.

Stereotype Computer extends metaclass Device

Stereotype

A stereotype uses the same notation as a class, with the addition that the keyword «stereotype» is
shown before or above the name of the stereotype. Stereotype names should not clash with keyword
names for the extended model element.
Servlet Stereotype extends Component.

Stereotype can change the graphical appearance of the extended model element by using attached
icons represented by Image class.

Stereotype Servlet with attached custom icon.

Actor is extended by stereotype Web Client with


attached custom icon.

Properties of a stereotype are referred to as tag definitions.

Device extended by Server stereotype with tag


definitions and custom icon.

Stereotype Applied

Stereotype is applied when it is used on use case diagrams, class diagrams, deployment diagrams,
etc.

UML versions before 2.4 required the first letter of the name of the applied stereotype to be in lower
case (e.g. «servlet»). Starting from UML 2.4, the first letter should normally be in upper case. Naming
stereotype applications with lower-case letters where the stereotypes themselves are defined using
Stereotype «Servlet» applied to the model element upper-case first letter is still valid but is considered obsolete.
SearchServlet

When a stereotype includes the definition of an icon, this icon can be graphically attached to the model
elements extended by the stereotype. Every model element that has a graphical presentation can have
an attached icon.

When a model element is extended by one single stereotype the icon can be presented in a reduced
Servlet stereotype applied to the class SearchServlet. shape, inside and on top of the box representing the model element.

When stereotype is applied, the whole classifier box can be replaced by enlarged icon of the
stereotype.

Servlet stereotype applied to the class SearchServlet.

«Web Client» stereotype applied to the Geek actor.


Computer stereotype with tags applied to Device
class.

Generalization of stereotypes

A stereotype may generalize or specialize only another stereotype.

Abstract stereotype Session EJB is specialized by


stereotypes Stateless EJB and Stateful EJB.

Tag Definition

Properties of a stereotype are referred to as tag Definitions.


Stereotype Computer with tag definitions for vendor,
CPU, and memory.

Tagged Value

Profile diagrams are used to show tag definitions. Stereotype is applied when it is used on use case
diagrams, class diagrams, deployment diagrams, etc.

When a stereotype is applied to a model element, the values of its properties may be referred to as
tagged values.

Tag values could be shown using "traditional" UML 1.x tagged values notation in curly braces under
Stereotype Computer applied using "traditional" tag stereotype name.
values notation.

Tag values could be shown in compartment under stereotype name.

Stereotype Computer applied with tag values in


compartment

Tag values could be shown in attached comment note under stereotype name.

Stereotype Computer applied with tag values in


comment note

Extension

An extension is association relationship used to indicate that the properties of a metaclass are
extended through a stereotype.
Metaclass Class is extended by stereotype Customer. The notation for an extension is an arrow pointing from a stereotype to the extended metaclass,
where the arrowhead is shown as a filled triangle.

Because extension is subclass of association, it may have usual association adornments, but
navigability arrows should not be shown. Adornments of an extension are typically suppressed.

Required extension is shown using the {required} property near the extension end. It is also allowed
to use multiplicity 1 on the extension end as an alternative to the {required}.

Multiplicity 0..1 corresponds to non-required extension.

Required extension of metaclass Component by


stereotype WebService.

Each stereotype may extend one or more metaclasses. This might cause some confusion. For
example, UML 2.3 specification explains its Figure 18.16 as "the same stereotype Clock can extend
either the metaclass Component or the metaclass Class." Either is confusing as it suggests that
extension is kind of or relationship but not and as we'd assume.

The same "either" approach is applied in [SoaML 1.0 Beta 2] - stereotype Provider extends either (or
both?) Interface or Class metaclasses. The SoaML explains that Interface is used in the case of a non
composite service contract while Class - in the case of a composite service contract.

Stereotype Provider extends either (or both?)


Interface or Class metaclasses.

Reference
Reference is import relationship represented as element import or package import. The keyword
«reference» is shown near the line.

Metaclass Component is referenced (imported) by


profile Servlets.
Profile Application

Applied profile is shown using a dashed arrow with an open arrowhead from the package to the applied
profile. The keyword «apply» is shown near the arrow.

If multiple applied profiles have stereotypes with the same name, it may be necessary to qualify the
name of the stereotype with a profile name.

Profiles Java and Servlets applied to the package


WebApplication.

Noticed a spelling error? Select the text using the mouse and press Ctrl + Enter.

Follow @uml_diagrams
Like 2.4K Share             by Kirill Fakhroutdinov
 
This document describes UML versions up to UML 2.5 and is based on the corresponding OMG™ Unified Modeling Language™ (OMG UML®)
specifications. UML diagrams were created in Microsoft® Visio® 2007-2016 using UML 2.x Visio Stencils. Lucidchart is a nice, free UML tool that
I recommend for students.
You can send your comments and suggestions to webmaster at webmaster@uml-diagrams.org.
 
Copyright © 2009-2018 uml-diagrams.org. All rights reserved.

Anda mungkin juga menyukai