Что такое профайл uml
Перейти к содержимому

Что такое профайл uml

  • автор:

What is Profile Diagram in UML?

As a general purpose modeling language, UML provides a stable basis for a wide variety of requirements. It is not defined for specific application domains or for any specific technology. However, in some circumstances, UML is too general and using it involves a considerable amount of effort. In such cases, the use of a language optimized for the given domain and therefore offering special concepts is advantageous.

Profile diagram, a kind of structural diagram in the Unified Modeling Language (UML), provides a generic extension mechanism for customizing UML models for particular domains and platforms. Extension mechanisms allow refining standard semantics in strictly additive manner, preventing them from contradicting standard semantics. Profiles are defined using stereotypes, tagged value definitions, and constraints which are applied to specific model elements, like Classes, Attributes, Operations, and Activities. A Profile is a collection of such extensions that collectively customize UML for a particular domain (e.g., aerospace, healthcare, financial) or platform (J2EE, .NET).

Profile Diagram

Learn UML Faster and Easier

Are you looking for a UML tool for learning UML faster, easier and quicker? Visual Paradigm is a UML software that supports all UML diagram types. It is an international award-winning UML modeler, and yet it is easy-to-use and intuitive. Try now.

Basic Concepts of Profile Diagram

Profile diagram is basically an extensibility mechanism that allows you to extend and customize UML by adding new building blocks, creating new properties and specifying new semantics in order to make the language suitable to your specific problem domain.

Profile diagram has three types of extensibility mechanisms:

Stereotypes

Stereotypes allow you to increase vocabulary of UML. You can add, create new model elements, derived from existing ones but that have specific properties that are suitable to your problem domain. Stereotypes are used to introduce new building blocks that speak the language of your domain and look primitive. It allows you to introduce new graphical symbols.

For example: When modeling a network you might need to have symbols for >, >, > etc. A stereotype allows you to make these things appear as primitive.

Class with stereotype

Tagged Values

Tagged values are used to extend the properties of UML so that you can add additional information in the specification of a model element. It allows you to specify keyword value pairs of a model where keywords are the attributes. Tagged values are graphically rendered as string enclose in brackets.

For Example: Consider a release team responsible for assembling, testing and deployment of a system. In such case it is necessary to keep a track on version and test results of the main subsystem. Tagged values are used to add such info.

Tagged Value can be useful for adding properties to the model for some useful purposes:

Class with tagged value

  • Code generation
  • Version control
  • Configuration management
  • Authorship
  • Etc

Constraints

They are the properties for specifying semantics or conditions that must be held true at all the time. It allows you to extend the semantics of UML building block by adding new protocols. Graphically a constraint is rendered as string enclose in brackets placed near associated element.

For example: In development of a real time system it is necessary to adorn the model with some necessary information such as response time. A constraint defines a relationship between model elements that must be use or . Constraints can be on attributes, derived attributes and associations. It can be attached to one or more model elements shown as a note as well.

Contraints

When to Use Profile Diagram — UML Extension Meacham

As an alternative to creating a new metamodel, you can also extend Extension and modification of the UML metamodel and modify the UML meta-model in accordance with your requirements. In UML we call it lightweight extensions which are based on stereotypes and profiles. UML Profile can be defined in one of the following 3 ways:

  • Creation of a new metamodel
  • Extension and modification of the UML metamodel
  • Extension of the UML metamodel with language-inherent mechanisms

Profile Diagram — How it Works

The extension mechanism in UML 1.1 is relatively imprecise in the sense that extensions could be made only on the basis of the primitive data type string. UML 2.0 lets you use arbitrary data structures for extended elements, which means that more extensive and more precise model extensions are now possible.

The profiles mechanism is not a first-class extension mechanism. It does NOT allow to:

  • Modify existing metamodels
  • Create a new metamodel like MOF does

Profile only allows adaptation or customization of an existing metamodel. In UML 2.0 or above, profiles can also be dynamically combined so that several profiles will be applied at the same time on the same model.

How it works

Profile Diagram at a Glance

In this example, we can see that a stereotype can extend from one or more metaclasses. This extension relationship is depicted as an arrow with a continuous line and filled arrowhead. The arrow points away from the stereotype to the metaclass.

In the figure below, we define a profile of EJB as a package. The bean itself is extended from component metamodel as an abstract bean. The abstract bean can be concreted as either an Entity Bean or Session Bean. An EJB has two types of remote and home interfaces. An EJB also contains a special kind of artifact called JAR file for storing a collection of Java code.

Profile Diagram at a Glance

Textual vs Graphic Icon Stereotype

Stereotypes can be in textual or graphical representation. The icon can also replace the normal class box. For Example: People often use these 3 stereotyped class representations to model the software MVC framework:

Textual vs Graphic Icon Stereotype

Other Popular Usages for UML profiles

Every technical target, i.e. programming language, middleware, library or database is a natural candidate for defining UML profile. For examples:

  • CORBA
  • EJB
  • C++ or JAVA
  • ORACLE or MYSQL
  • Etc

Applying Stereotype of a Profile

To use stereotypes in a specific application, you must first integrate the profile that contains the stereotypes. You do this with a dashed arrow than open arrowhead pointing away from the package of the application towards the profile. This arrow is labelled with the keyword >.

Profile Diagram Example I — IT Management

A profile is applied to another package in order to make the stereotypes in the profile available to that package. The illustration below shows the Network, Telecomms and Software profiles being applied to the ITManagement package.

Profile Diagram Example I - IT Management

Profile Diagram Example II — EJB Application

In the figure below, we define a profile of EJB as a package. The bean itself is extended from component metamodel as an abstract bean. The abstract bean can be concreted as either an Entity Bean or Session Bean. An EJB has two types of remote and home interfaces. An EJB also contains a special kind of artifact called JAR file for storing a collection of Java code.

Profile Diagram Example II - EJB Application

Try to Draw UML Profile Diagram Now

You’ve learned what a Profile Diagram is and how to draw a Profile Diagram. It’s time to draw a Profile Diagram of your own. Get Visual Paradigm and create your own Profile Diagram with the Profile Diagram tool. It’s easy-to-use and intuitive.

Related Links

  1. What is Unified Modeling Language?
  2. Professional UML diagram tool

UML Profile

Profile is a profile package that extends a reference metamodel (such as UML) by allowing to adapt or customize the metamodel with constructs that are specific to a particular domain, platform, or a software development method. In other words, profile is a lightweight extension mechanism to the UML standard.

A profile introduces several constraints, or restrictions, on ordinary metamodeling through the use of the metaclasses defined in this package. The primary extension construct is stereotype, which is defined as part of profile and extends some metaclass.

A profile is a restricted form of a reference metamodel that must always be related to some reference metamodel that is created from MOF such as UML or CWM. It is not possible to define a standalone profile, without its reference metamodel.

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 can define classes, stereotypes, data types, primitive types and enumerations.

One profile might reuse some or all parts of another profile, to extend already existing profiles. Multiple profiles could be applied to the same model.

The constraints that are part of the profile are evaluated when the profile has been applied to a package. These constraints need to be satisfied in order for the model to be well-formed.

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 after the profile name. OMG normative profiles follow OMG normative naming scheme for URIs. For non-standard, custom profiles convention recommended by OMG looks like:

uri ::= http:// qualified-profile-parent / profile-version / profile-name .xmi

  • qualified-profile-parent is the qualified name of the package containing the profile (if any), with «::» replaced by «/» (forward slash), and all other illegal XML QName characters removed . For example: www.uml-diagrams.org/profiles.
  • profile-version is a profile version id. OMG normative profiles use for this purpose date in the format YYYYMMDD, for example: 20110331.
  • profile-name is the name of the profile, should contain only valid XML QName characters. For example: ejb-30.

Note, that UML specification here mingled two different specifications. The whole URI value should follow obsolete URI specification RFC 2396 (see: URI package attribute), while qualified-profile-parent part should also be (or will be made) valid XML QName. XML QName usually has namespace prefix followed by ‘:’, e.g. ‘taxes:dependent’, which contradicts to the URI requirement.

URI attribute of a package rendered after the package name.

EJB Profile shown as a package with URI attribute.

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

Powered by 100% wind energy

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.

Privacy policy You can send your comments and suggestions to webmaster at webmaster@uml-diagrams.org.

Copyright © 2009-2023 uml-diagrams.org. All rights reserved.

Что такое профайл uml

• Do not make changes to the UML Standard profile. Any changes you make will be lost when the profile is updated.

Note that you can create Tag Definitions outside of the UML Standard profile, and link those Tag Definitions to Stereotypes in the UML Standard profile. When the UML Standard profile is updated, the links will not be broken.

• Do not create copies of the UML Standard profile within a model, or create copies of the UML Standard profile through XMI Import/Export. The copies of the UML Standard profile will not work correctly and you will not be able to update the copies through the Update All Profiles command.

Что такое профайл uml

In addition to the preceding diagrams, items and relationships, the UML Standard profile predefined standard Stereotypes from the Standard Profile that is defined in the UML specification.

All of the Stereotypes have been linked with appropriate Modeler item types, which can be viewed through the Property Pages of the Stereotypes.

If you also add the SysML Profile to the model, you can create View and View Point items, and Conform relationships on a Package Diagram.

It is assumed that when the profile is imported into a model, it will be applied as appropriate to the requirements of that model.

The UML Profile package includes the following Stereotypes and Tag Definitions.
Stereotype
Can be applied to these item types
Dependency and Package
Class, Instance, OCD::Instance and OSD::Instance
Class and Package
«buildComponent»
Class and Package
Association and Dependency
Attribute, Class and Role
Association, Dependency, Operation and Role
Dependency
«executable»
«execution environment»
Class, Instance, OCD::Instance and OSD::Instance
Dependency and Package
Attribute, Class and Role
«implementationClass»
Class, Instance, OCD::Instance, OSD::Instance and Specialization
Association
Dependency and Package
«instantiate»
Association and Dependency
Constraint
Dependency
Package and Model
«ModelLibrary»
Dependency and Package
Attribute and Role
«PackageDiagram»
Class Diagram
«PackageMerge»
Dependency
«postcondition»
Constraint
«precondition»
Constraint
Class, Instance, OCD::Instance, OSD::Instance and Task
«ProfileApplication»
Package and Dependency
«realization»
Class, Data Type, Interface, Package and Signal
Dependency
Dependency (the SysML Requirements Profile uses this Stereotype)
«responsibility»
Association and Dependency
Association and Dependency
«specification»
Class, Data Type, Interface, Package and Signal
«systemModel»
Package and Model
Class, Instance, OCD::Instance, OSD::Instance and Task
Dependency (the SysML Requirements Profile uses this Stereotype)
Tag Definition
Applied by
applicableSubset
ip address
«device», «execution environment» and «node»
«ProfileApplication»
port number

• Do not make changes to the UML Standard profile. Any changes you make will be lost when the profile is updated.

Note that you can create Tag Definitions outside of the UML Standard profile, and link those Tag Definitions to Stereotypes in the UML Standard profile. When the UML Standard profile is updated, the links will not be broken.

• Do not create copies of the UML Standard profile within a model, or create copies of the UML Standard profile through XMI Import/Export. The copies of the UML Standard profile will not work correctly and you will not be able to update the copies through the Update All Profiles command.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *