SlideShare ist ein Scribd-Unternehmen logo
1 von 6
Downloaden Sie, um offline zu lesen
UML 2.4 Tutorial

                                      Thomas Bosch

           GESIS - Leibniz Institute for the Social Sciences, Mannheim, Germany
                             thomas.bosch@gesis.org



       Abstract.The purpose of the Unified Modeling Language (UML) is to model,
       document, specify, and visualize complex systems. The UML delivers notation
       elements for static as well as dynamic models of analysis, design, and architec-
       ture and supports object-oriented procedures in particular. This tutorial serves
       the attendees of the workshop „DDI Lifecycle – Moving Forward‟ as a guide
       and a reference to understand the most important elements of class diagrams
       and activity diagrams of the actual version of the UML 2.4 standard.As exam-
       ples excerpts from the statistical domain are modeled. The references section
       contains a list of books, which I recommend to read in order to get a detailed
       understanding of the UML modeling standard. This list is ordered according to
       my personal preferences.


       Keywords: UML 2.4, class diagrams, activity diagrams.


1      Class Diagrams

    Using class diagrams the structure of systems is visualized. Class diagrams show
relevant static concepts and their relationships to each other [1]. In this section, only
the most relevant components of class diagrams are explained in detail. In the follow-
ing figure, the classes „Study‟ and „StudyGroup‟ are defined. Classes stand for real as
well as digital objects or instances. A specific study, for instance the germanmicro-
census of the year 2009, represents such an instance of the class „Study‟. For the fur-
ther description of classes attributes can be specified. In the example, the attribute
„title‟ is defined in the class „Study‟. This attribute stands for study titles of concrete
„study‟ objects. Study titles are of the datatype „String‟ and have the default value
“studyTitle”. The visibility of the attribute „title‟ is set to private (-). This means that
only concrete study objects are aware of the existence of this attribute and can see the
attribute‟s actual value. The visibility can also be set to public (+). As a consequence,
other classes and their concrete instances can see these attributes and their values at
runtime.
    These classes „Study‟ and „StudyGroup‟ are both defined as sub-classes of the ab-
stract super-class „StudyOrStudyGroup‟, as for this super-class common attributes
may be defined. Common attributes are then inherited by all the sub-classes. The class
„StudyOrStudyGroup‟ is specified as „abstract‟, since it makes no sense to generate
instances of this class. There‟s no concrete object, which is at the same time a study
and a group of studies. For the abstract super-class a generalization set is specified.
The property „complete‟ indicates that the set of sub-classes is complete, i.e. all rea-
sonable sub-types are modeled. The property „disjoint‟ indicates that no instance of a
sub-type is at the same time an instance of the other sub-class. The remaining proper-
ties are „overlapping‟ and „incomplete‟ representing the inverse properties.
   Between the classes „StudyGroup‟ and „Study‟ an aggregation and alsocardinali-
ties are defined. This means that groups of studies may contain multiple studies. But
Study groups may also include no studies, as the range 0 to n (n indicated by *) is
specified. Studies may be contained in groups of studies, since the multiplicity 0 to n
is stated. In contrast to a composition, an aggregation is used as the relation between
the whole thing (the study group) and the parts (the studies) is not existence-
depending, i.e. if a study, contained in a particular group of studies, is deleted, the
including study group will not be deleted.




Fig.1. Studies and goups of studies

   Figure 2 shows code lists as representations of variables. An association is defined
between the class „Variable‟ and the class „Representation‟. Associations stand for
relationships between concrete objects of the source and target classes. For associa-
tions cardinalities can be stated. In our example, each variable has exactly one repre-
sentation and specific representations may represent more than one variable (0..*).
The roles, classes have in associations, may be defined at each association end. The
role, particular variables have when they are in the association „representation‟, is in
this case „variable‟. Concrete representations are in the role „representation‟ when
they are related to certain variables using the association „representation‟. As the visi-
bility of the roles is declared as public (+), other classes within the same package can
see objects which are in these roles.The arrow next to the name of the association
indicates the reading direction of the association. The arrow at the end of the associa-
tion shows that only variables know their specific representation and not the other
way around - concrete representations don‟t know the represented variables, i.e. they
do not have to store represented variables or references to these variables.




Fig. 2. Representation of variables

   Between the class „Representation‟ and the class „Code‟ a composition is defined.
This means that representations may contain 0 to ncodes and if a specific included
code is deleted, the representation itself will also be deleted afterwards. This relation-
ship is therefore existing-dependent. The whole thing (the representation) can‟t exist-
without all parts (the codes). In the case of an aggregation, in contrast to a composi-
tion, the whole thing could exist further when a part is deleted.
   Figure 3 displays questions which may be contained in questionnaires and com-
ments which are associated with questionnaires and questions. As comments about a
certain question in a particular questionnaire depend on both the questionnaire and the
question, an association class - a model element that has both association and class
properties - has to be specified. An association class canbe seen as an association that
also has class properties, or as a class that also has associationproperties. It not only
connects a set of classifiers but also defines a set of features thatbelong to the rela-
tionship itself and not to any of the classifiers [1].Comments have a string text and a
comment type as attributes.




Fig. 3. Questionnaires and questions

   The comment type‟s values are „internalComment‟ and „externalComment‟. As on-
ly these two values are allowed, an enumeration is added. Enumerations are modeled
as classes with the stereotype „enumeration‟, displayed in the UML class diagram as
<<enumeration>>.


2      Activity Diagrams

   Activity modeling is a specialized type of behavioral modeling concerned with
modeling the activities and responsibilities of elements. Using UML activity dia-
grams, you can display the processing of use cases, operations, and complete business
processes. An activity is the specification of parameterized behavior as the coordinated
sequencingof subordinate units whose individual elements are actions [1]. The next figure
visualizes the activity or the business process to publish variable lists in different
formats.The overall activity is divided into two activity partitions. An activity partition is
a kind of activity group for identifying actions that have somecharacteristic in common
[1]. The actions of the activity „publish variable lists‟ are executed in the first activity
partition by a national statistical office and in the second activity partition by a statistical
research institute.
   An initial node is a control node at which flow starts when the activity is invoked. An
activity final node is a final node that stops all flows in an activity [1]. The activity to
publish variable lists starts at the initial node within the context of the national statistical
office and ends in the area of responsibility of the statistical research institute. First, the
national statistical office sends a signal whose event is received by the statistical research
institute. As signal a variable list is sent which is received by the corresponding event.




Fig. 4. Publishing variable lists

   The result of the event is the list of variables which is represented using an object node.
An object node is an abstract activity node that is part of defining object flow in an activi-
ty [1]. There are two kinds of flows in an activity diagram: control flows and object
flows. These flows are visualized by arrows in the diagram. Whenever the source or the
target node of an arrow is an object node, the flow is an object flow.
The next control flow points from the object node „variable list‟ to the action node
„check variable list‟. An action is a named element that is the fundamental unit of execut-
able functionality. The execution of an action represents some transformation or
processing in the modeled system, be it a computer system or otherwise [1]. The action to
check the variable list is in this case a special kind of action, a so-called call behavior
action, as an appropriate activity is invoked. Using such an approach activities can be
nested and the entire activity diagram is much clearer. Call behavior actions have a little
rake in their rounded rectangle. Moreover, this action is framed by an interruptible activity
region. An interruptible activity region is an activity group that supports termination of
tokenflowing in the portions of an activity [1]. Whenever an exception occurs in this spe-
cial framed area, the flow continues over the flashed control flow to the following action
which is in this case the notification of the colleagues. If the file containing the variable
list is broken, the colleagues will be notified. After one week a time event is received
and the control flow continues in this branch.
     In case the file including the variable list is not damaged, a decision has to be tak-
en. In activity diagrams decisions are visualized using decision nodes. A decision
node is a control node that chooses between outgoing flows [1]. The associated condition
„all variables available?‟ is stated after the stereotype „<<decisionInput>>‟ in a note linked
to the decision node. If all variables are available (the condition is evaluated to the boolean
value true [true]), the left branch will be executed and if not all variables are available
([false]), the right branch will be followed. As actions cannot have more than one incom-
ing control flow, a merge node has to join all the incoming control flows of the action
„notify national statistical office (NSO)‟ on the outmost branch of the activity. A merge
node is a control node that brings together multiple alternate flows. It is not used to syn-
chronize concurrent flows but to accept one among several alternate flows [1].
    If all variables are available in the variable list [the condition is evaluated to true], two
parallel control flows will be executed indicated by a fork node. A fork node is a control
node that splits a flow into multiple concurrent flows [1]. At the same time an html view
and a pdf view of the variable list can be created simultaneously. At the end of these con-
current control flows a join node has to be set. A join node is a control node that synchro-
nizes multiple flows [1]. The following merge node joins the two conditional branches and
then the variable list can be published. The activity final node closes the activity at the
end.


References
 1. Rupp, C., Queins, S.: UML 2 glasklar - Praxiswissen für die UML-Modellierung. Carl
    hanser Verlag (2012)
 2. Hitz, M., Kappel, G., Kapsammer, E., Retschitzegger, W.: UML @ Work -
    Objektorientierte Modellierung mit UML 2. dpunkt.verlag (2005)
 3. Fowler, M.: Uml Distilled: A Brief Guide to the Standard Object Modeling Language. Ad-
    dison-Wesley Professional (2004)
 4. Pilone, D., Pitman, N.: UML 2.0 in a Nutshell. O‟Reilly (2005)

Weitere ähnliche Inhalte

Was ist angesagt?

Collaboration Diagram
Collaboration DiagramCollaboration Diagram
Collaboration Diagramfahad_uaar
 
Unified Modeling Language
Unified Modeling LanguageUnified Modeling Language
Unified Modeling Languagesurana college
 
OBJECT DIAGRAM.pptx
OBJECT DIAGRAM.pptxOBJECT DIAGRAM.pptx
OBJECT DIAGRAM.pptxAhmarBilal3
 
Uml structural diagrams
Uml structural diagramsUml structural diagrams
Uml structural diagramsSwathy T
 
Uml package diagram
Uml package  diagramUml package  diagram
Uml package diagramVedaraj M
 
Ch 12 O O D B Dvlpt
Ch 12  O O  D B  DvlptCh 12  O O  D B  Dvlpt
Ch 12 O O D B Dvlptguest8fdbdd
 
UML, ER and Dimensional Modelling
UML, ER and Dimensional ModellingUML, ER and Dimensional Modelling
UML, ER and Dimensional ModellingStefano Dalla Palma
 
Unified modeling language diagrams
Unified modeling language diagramsUnified modeling language diagrams
Unified modeling language diagramsAlaa Ahmed
 
Intro to UML 2
Intro to UML 2Intro to UML 2
Intro to UML 2rchakra
 
Ch 5 O O Data Modeling
Ch 5  O O  Data ModelingCh 5  O O  Data Modeling
Ch 5 O O Data Modelingguest8fdbdd
 
Lect-4: UML diagrams - Unified Modeling Language - SPM
Lect-4: UML diagrams - Unified Modeling Language - SPMLect-4: UML diagrams - Unified Modeling Language - SPM
Lect-4: UML diagrams - Unified Modeling Language - SPMMubashir Ali
 
The Ultimate Guide for UML Class Diagrams by Creately
The Ultimate Guide for UML Class Diagrams by CreatelyThe Ultimate Guide for UML Class Diagrams by Creately
The Ultimate Guide for UML Class Diagrams by CreatelyCreately
 
Object Oriented Approach for Software Development
Object Oriented Approach for Software DevelopmentObject Oriented Approach for Software Development
Object Oriented Approach for Software DevelopmentRishabh Soni
 
Ch 6 Logical D B Design
Ch 6  Logical D B  DesignCh 6  Logical D B  Design
Ch 6 Logical D B Designguest8fdbdd
 
Slide 5 Class Diagram
Slide 5 Class DiagramSlide 5 Class Diagram
Slide 5 Class DiagramNiloy Rocker
 

Was ist angesagt? (20)

Collaboration Diagram
Collaboration DiagramCollaboration Diagram
Collaboration Diagram
 
Unified Modeling Language
Unified Modeling LanguageUnified Modeling Language
Unified Modeling Language
 
0136061257
01360612570136061257
0136061257
 
OBJECT DIAGRAM.pptx
OBJECT DIAGRAM.pptxOBJECT DIAGRAM.pptx
OBJECT DIAGRAM.pptx
 
Uml structural diagrams
Uml structural diagramsUml structural diagrams
Uml structural diagrams
 
Types of UML diagrams
Types of UML diagramsTypes of UML diagrams
Types of UML diagrams
 
Uml package diagram
Uml package  diagramUml package  diagram
Uml package diagram
 
Ch 12 O O D B Dvlpt
Ch 12  O O  D B  DvlptCh 12  O O  D B  Dvlpt
Ch 12 O O D B Dvlpt
 
UML, ER and Dimensional Modelling
UML, ER and Dimensional ModellingUML, ER and Dimensional Modelling
UML, ER and Dimensional Modelling
 
Unified modeling language diagrams
Unified modeling language diagramsUnified modeling language diagrams
Unified modeling language diagrams
 
Intro to UML 2
Intro to UML 2Intro to UML 2
Intro to UML 2
 
2 class use case
2 class use case2 class use case
2 class use case
 
Ch 5 O O Data Modeling
Ch 5  O O  Data ModelingCh 5  O O  Data Modeling
Ch 5 O O Data Modeling
 
Lect-4: UML diagrams - Unified Modeling Language - SPM
Lect-4: UML diagrams - Unified Modeling Language - SPMLect-4: UML diagrams - Unified Modeling Language - SPM
Lect-4: UML diagrams - Unified Modeling Language - SPM
 
UML tutorial
UML tutorialUML tutorial
UML tutorial
 
Uml class Diagram
Uml class DiagramUml class Diagram
Uml class Diagram
 
The Ultimate Guide for UML Class Diagrams by Creately
The Ultimate Guide for UML Class Diagrams by CreatelyThe Ultimate Guide for UML Class Diagrams by Creately
The Ultimate Guide for UML Class Diagrams by Creately
 
Object Oriented Approach for Software Development
Object Oriented Approach for Software DevelopmentObject Oriented Approach for Software Development
Object Oriented Approach for Software Development
 
Ch 6 Logical D B Design
Ch 6  Logical D B  DesignCh 6  Logical D B  Design
Ch 6 Logical D B Design
 
Slide 5 Class Diagram
Slide 5 Class DiagramSlide 5 Class Diagram
Slide 5 Class Diagram
 

Andere mochten auch

IBM and Cincom: Guiding Smarter Interactions in Healthcare Reform
IBM and Cincom: Guiding Smarter Interactions in Healthcare ReformIBM and Cincom: Guiding Smarter Interactions in Healthcare Reform
IBM and Cincom: Guiding Smarter Interactions in Healthcare ReformPath of the Blue Eye Project
 
App exchange conference facebookがビジネスアプリに与えるインパクト
App exchange conference   facebookがビジネスアプリに与えるインパクトApp exchange conference   facebookがビジネスアプリに与えるインパクト
App exchange conference facebookがビジネスアプリに与えるインパクトKazuki Nakajima
 
2012.10 - DDI Lifecycle - Moving Forward - 3
2012.10 - DDI Lifecycle - Moving Forward - 32012.10 - DDI Lifecycle - Moving Forward - 3
2012.10 - DDI Lifecycle - Moving Forward - 3Dr.-Ing. Thomas Hartmann
 

Andere mochten auch (7)

IBM and Cincom: Guiding Smarter Interactions in Healthcare Reform
IBM and Cincom: Guiding Smarter Interactions in Healthcare ReformIBM and Cincom: Guiding Smarter Interactions in Healthcare Reform
IBM and Cincom: Guiding Smarter Interactions in Healthcare Reform
 
Eventregist Intro
Eventregist IntroEventregist Intro
Eventregist Intro
 
App exchange conference facebookがビジネスアプリに与えるインパクト
App exchange conference   facebookがビジネスアプリに与えるインパクトApp exchange conference   facebookがビジネスアプリに与えるインパクト
App exchange conference facebookがビジネスアプリに与えるインパクト
 
2012.10 - DDI Lifecycle - Moving Forward - 3
2012.10 - DDI Lifecycle - Moving Forward - 32012.10 - DDI Lifecycle - Moving Forward - 3
2012.10 - DDI Lifecycle - Moving Forward - 3
 
WEGO Health: Health Activists Speak Up
WEGO Health: Health Activists Speak UpWEGO Health: Health Activists Speak Up
WEGO Health: Health Activists Speak Up
 
J U A N K D U Q U E
J U A N K  D U Q U EJ U A N K  D U Q U E
J U A N K D U Q U E
 
2013.05 - LDOW 2013 @ WWW 2013
2013.05 - LDOW 2013 @ WWW 20132013.05 - LDOW 2013 @ WWW 2013
2013.05 - LDOW 2013 @ WWW 2013
 

Ähnlich wie 2012.10 - DDI Lifecycle - Moving Forward - 3

Lecture#02, building blocks of uml ASE
Lecture#02, building blocks of uml ASELecture#02, building blocks of uml ASE
Lecture#02, building blocks of uml ASEbabak danyal
 
ASP.NET System design 2
ASP.NET System design 2ASP.NET System design 2
ASP.NET System design 2Sisir Ghosh
 
Diagramming the Class Diagram: Toward a Unified Modeling Methodology
Diagramming the Class Diagram: Toward a Unified Modeling Methodology Diagramming the Class Diagram: Toward a Unified Modeling Methodology
Diagramming the Class Diagram: Toward a Unified Modeling Methodology IJCSIS Research Publications
 
Object Oriented Modeling and Design with UML
Object Oriented Modeling and Design with UMLObject Oriented Modeling and Design with UML
Object Oriented Modeling and Design with UMLMalek Sumaiya
 
L ab # 07
L ab # 07L ab # 07
L ab # 07Mr SMAK
 
Advanced Structural Modeling
Advanced Structural ModelingAdvanced Structural Modeling
Advanced Structural ModelingAMITJain879
 
UML-Advanced Software Engineering
UML-Advanced Software EngineeringUML-Advanced Software Engineering
UML-Advanced Software EngineeringAmit Singh
 
210280107093_CLASS_DIAGRAM.pptx
210280107093_CLASS_DIAGRAM.pptx210280107093_CLASS_DIAGRAM.pptx
210280107093_CLASS_DIAGRAM.pptxHimeshNayi
 
CHAPTER 1 - OVERVIEW OOP.ppt
CHAPTER 1 - OVERVIEW OOP.pptCHAPTER 1 - OVERVIEW OOP.ppt
CHAPTER 1 - OVERVIEW OOP.pptNgoHuuNhan1
 
Ooad lab manual
Ooad  lab manualOoad  lab manual
Ooad lab manualPraseela R
 

Ähnlich wie 2012.10 - DDI Lifecycle - Moving Forward - 3 (20)

Lecture#02, building blocks of uml ASE
Lecture#02, building blocks of uml ASELecture#02, building blocks of uml ASE
Lecture#02, building blocks of uml ASE
 
Uml - An Overview
Uml - An OverviewUml - An Overview
Uml - An Overview
 
ASP.NET System design 2
ASP.NET System design 2ASP.NET System design 2
ASP.NET System design 2
 
432
432432
432
 
Jar chapter 2
Jar chapter 2Jar chapter 2
Jar chapter 2
 
SMD Unit ii
SMD Unit iiSMD Unit ii
SMD Unit ii
 
Diagramming the Class Diagram: Toward a Unified Modeling Methodology
Diagramming the Class Diagram: Toward a Unified Modeling Methodology Diagramming the Class Diagram: Toward a Unified Modeling Methodology
Diagramming the Class Diagram: Toward a Unified Modeling Methodology
 
Object Oriented Modeling and Design with UML
Object Oriented Modeling and Design with UMLObject Oriented Modeling and Design with UML
Object Oriented Modeling and Design with UML
 
Uml report
Uml reportUml report
Uml report
 
L ab # 07
L ab # 07L ab # 07
L ab # 07
 
Advanced Structural Modeling
Advanced Structural ModelingAdvanced Structural Modeling
Advanced Structural Modeling
 
OOSE UNIT-2.pdf
OOSE UNIT-2.pdfOOSE UNIT-2.pdf
OOSE UNIT-2.pdf
 
UML-Advanced Software Engineering
UML-Advanced Software EngineeringUML-Advanced Software Engineering
UML-Advanced Software Engineering
 
210280107093_CLASS_DIAGRAM.pptx
210280107093_CLASS_DIAGRAM.pptx210280107093_CLASS_DIAGRAM.pptx
210280107093_CLASS_DIAGRAM.pptx
 
CHAPTER 1 - OVERVIEW OOP.ppt
CHAPTER 1 - OVERVIEW OOP.pptCHAPTER 1 - OVERVIEW OOP.ppt
CHAPTER 1 - OVERVIEW OOP.ppt
 
OOP_Module 2.pptx
OOP_Module 2.pptxOOP_Module 2.pptx
OOP_Module 2.pptx
 
Ooad lab manual
Ooad  lab manualOoad  lab manual
Ooad lab manual
 
Sda 7
Sda   7Sda   7
Sda 7
 
Uml overview modified
Uml overview modifiedUml overview modified
Uml overview modified
 
Intro Uml
Intro UmlIntro Uml
Intro Uml
 

Mehr von Dr.-Ing. Thomas Hartmann

Doctoral Examination at the Karlsruhe Institute of Technology (08.07.2016)
Doctoral Examination at the Karlsruhe Institute of Technology (08.07.2016)Doctoral Examination at the Karlsruhe Institute of Technology (08.07.2016)
Doctoral Examination at the Karlsruhe Institute of Technology (08.07.2016)Dr.-Ing. Thomas Hartmann
 
2016.02 - Validating RDF Data Quality using Constraints to Direct the Develop...
2016.02 - Validating RDF Data Quality using Constraints to Direct the Develop...2016.02 - Validating RDF Data Quality using Constraints to Direct the Develop...
2016.02 - Validating RDF Data Quality using Constraints to Direct the Develop...Dr.-Ing. Thomas Hartmann
 
2015.09. - The Role of Reasoning for RDF Validation (SEMANTiCS 2015)
2015.09. - The Role of Reasoning for RDF Validation (SEMANTiCS 2015)2015.09. - The Role of Reasoning for RDF Validation (SEMANTiCS 2015)
2015.09. - The Role of Reasoning for RDF Validation (SEMANTiCS 2015)Dr.-Ing. Thomas Hartmann
 
2015.09 - Guidance, Please! Towards a Framework for RDF-Based Constraint Lang...
2015.09 - Guidance, Please! Towards a Framework for RDF-Based Constraint Lang...2015.09 - Guidance, Please! Towards a Framework for RDF-Based Constraint Lang...
2015.09 - Guidance, Please! Towards a Framework for RDF-Based Constraint Lang...Dr.-Ing. Thomas Hartmann
 
2015.03 - The RDF Validator - A Tool to Validate RDF Data (KIM)
2015.03 - The RDF Validator - A Tool to Validate RDF Data (KIM)2015.03 - The RDF Validator - A Tool to Validate RDF Data (KIM)
2015.03 - The RDF Validator - A Tool to Validate RDF Data (KIM)Dr.-Ing. Thomas Hartmann
 
2014.10 - How to Formulate and Validate Constraints (DC 2014)
2014.10 - How to Formulate and Validate Constraints (DC 2014)2014.10 - How to Formulate and Validate Constraints (DC 2014)
2014.10 - How to Formulate and Validate Constraints (DC 2014)Dr.-Ing. Thomas Hartmann
 
2014.10 - Towards Description Set Profiles for RDF Using SPARQL as Intermedia...
2014.10 - Towards Description Set Profiles for RDF Using SPARQL as Intermedia...2014.10 - Towards Description Set Profiles for RDF Using SPARQL as Intermedia...
2014.10 - Towards Description Set Profiles for RDF Using SPARQL as Intermedia...Dr.-Ing. Thomas Hartmann
 
2014.10 - Requirements on RDF Constraint Formulation and Validation (DC 2014)
2014.10 - Requirements on RDF Constraint Formulation and Validation (DC 2014)2014.10 - Requirements on RDF Constraint Formulation and Validation (DC 2014)
2014.10 - Requirements on RDF Constraint Formulation and Validation (DC 2014)Dr.-Ing. Thomas Hartmann
 
The Next Generation of the Microdata Information System MISSY - An Integrated...
The Next Generation of the Microdata Information System MISSY - An Integrated...The Next Generation of the Microdata Information System MISSY - An Integrated...
The Next Generation of the Microdata Information System MISSY - An Integrated...Dr.-Ing. Thomas Hartmann
 
The New Microdata Information System (MISSY) - Integration of DDI-based Data ...
The New Microdata Information System (MISSY) - Integration of DDI-based Data ...The New Microdata Information System (MISSY) - Integration of DDI-based Data ...
The New Microdata Information System (MISSY) - Integration of DDI-based Data ...Dr.-Ing. Thomas Hartmann
 
Use Cases and Vocabularies Related to the DDI-RDF Discovery Vocabulary (EDDI ...
Use Cases and Vocabularies Related to the DDI-RDF Discovery Vocabulary (EDDI ...Use Cases and Vocabularies Related to the DDI-RDF Discovery Vocabulary (EDDI ...
Use Cases and Vocabularies Related to the DDI-RDF Discovery Vocabulary (EDDI ...Dr.-Ing. Thomas Hartmann
 
Towards the Discovery of Person-Level Data (SemStats, ISWC 2013) [2013.10]
Towards the Discovery of Person-Level Data (SemStats, ISWC 2013) [2013.10]Towards the Discovery of Person-Level Data (SemStats, ISWC 2013) [2013.10]
Towards the Discovery of Person-Level Data (SemStats, ISWC 2013) [2013.10]Dr.-Ing. Thomas Hartmann
 
2013.02 - 7th Workshop of German Panel Surveys
2013.02 - 7th Workshop of German Panel Surveys2013.02 - 7th Workshop of German Panel Surveys
2013.02 - 7th Workshop of German Panel SurveysDr.-Ing. Thomas Hartmann
 

Mehr von Dr.-Ing. Thomas Hartmann (20)

Doctoral Examination at the Karlsruhe Institute of Technology (08.07.2016)
Doctoral Examination at the Karlsruhe Institute of Technology (08.07.2016)Doctoral Examination at the Karlsruhe Institute of Technology (08.07.2016)
Doctoral Examination at the Karlsruhe Institute of Technology (08.07.2016)
 
KIT Graduiertenkolloquium 11.05.2016
KIT Graduiertenkolloquium 11.05.2016KIT Graduiertenkolloquium 11.05.2016
KIT Graduiertenkolloquium 11.05.2016
 
2016.02 - Validating RDF Data Quality using Constraints to Direct the Develop...
2016.02 - Validating RDF Data Quality using Constraints to Direct the Develop...2016.02 - Validating RDF Data Quality using Constraints to Direct the Develop...
2016.02 - Validating RDF Data Quality using Constraints to Direct the Develop...
 
2015.09. - The Role of Reasoning for RDF Validation (SEMANTiCS 2015)
2015.09. - The Role of Reasoning for RDF Validation (SEMANTiCS 2015)2015.09. - The Role of Reasoning for RDF Validation (SEMANTiCS 2015)
2015.09. - The Role of Reasoning for RDF Validation (SEMANTiCS 2015)
 
2015.09 - Guidance, Please! Towards a Framework for RDF-Based Constraint Lang...
2015.09 - Guidance, Please! Towards a Framework for RDF-Based Constraint Lang...2015.09 - Guidance, Please! Towards a Framework for RDF-Based Constraint Lang...
2015.09 - Guidance, Please! Towards a Framework for RDF-Based Constraint Lang...
 
2015.03 - The RDF Validator - A Tool to Validate RDF Data (KIM)
2015.03 - The RDF Validator - A Tool to Validate RDF Data (KIM)2015.03 - The RDF Validator - A Tool to Validate RDF Data (KIM)
2015.03 - The RDF Validator - A Tool to Validate RDF Data (KIM)
 
2014.12 - Let's Disco - 2 (EDDI 2014)
2014.12 - Let's Disco - 2 (EDDI 2014)2014.12 - Let's Disco - 2 (EDDI 2014)
2014.12 - Let's Disco - 2 (EDDI 2014)
 
2014.12 - Let's Disco (EDDI 2014)
2014.12 - Let's Disco (EDDI 2014)2014.12 - Let's Disco (EDDI 2014)
2014.12 - Let's Disco (EDDI 2014)
 
2014.10 - How to Formulate and Validate Constraints (DC 2014)
2014.10 - How to Formulate and Validate Constraints (DC 2014)2014.10 - How to Formulate and Validate Constraints (DC 2014)
2014.10 - How to Formulate and Validate Constraints (DC 2014)
 
2014.10 - Towards Description Set Profiles for RDF Using SPARQL as Intermedia...
2014.10 - Towards Description Set Profiles for RDF Using SPARQL as Intermedia...2014.10 - Towards Description Set Profiles for RDF Using SPARQL as Intermedia...
2014.10 - Towards Description Set Profiles for RDF Using SPARQL as Intermedia...
 
2014.10 - Requirements on RDF Constraint Formulation and Validation (DC 2014)
2014.10 - Requirements on RDF Constraint Formulation and Validation (DC 2014)2014.10 - Requirements on RDF Constraint Formulation and Validation (DC 2014)
2014.10 - Requirements on RDF Constraint Formulation and Validation (DC 2014)
 
The Next Generation of the Microdata Information System MISSY - An Integrated...
The Next Generation of the Microdata Information System MISSY - An Integrated...The Next Generation of the Microdata Information System MISSY - An Integrated...
The Next Generation of the Microdata Information System MISSY - An Integrated...
 
The New Microdata Information System (MISSY) - Integration of DDI-based Data ...
The New Microdata Information System (MISSY) - Integration of DDI-based Data ...The New Microdata Information System (MISSY) - Integration of DDI-based Data ...
The New Microdata Information System (MISSY) - Integration of DDI-based Data ...
 
Use Cases and Vocabularies Related to the DDI-RDF Discovery Vocabulary (EDDI ...
Use Cases and Vocabularies Related to the DDI-RDF Discovery Vocabulary (EDDI ...Use Cases and Vocabularies Related to the DDI-RDF Discovery Vocabulary (EDDI ...
Use Cases and Vocabularies Related to the DDI-RDF Discovery Vocabulary (EDDI ...
 
Towards the Discovery of Person-Level Data (SemStats, ISWC 2013) [2013.10]
Towards the Discovery of Person-Level Data (SemStats, ISWC 2013) [2013.10]Towards the Discovery of Person-Level Data (SemStats, ISWC 2013) [2013.10]
Towards the Discovery of Person-Level Data (SemStats, ISWC 2013) [2013.10]
 
2013.05 - IASSIST 2013 - 3
2013.05 - IASSIST 2013 - 32013.05 - IASSIST 2013 - 3
2013.05 - IASSIST 2013 - 3
 
2013.05 - IASSIST 2013 - 2
2013.05 - IASSIST 2013 - 22013.05 - IASSIST 2013 - 2
2013.05 - IASSIST 2013 - 2
 
2013.05 - IASSIST 2013
2013.05 - IASSIST 20132013.05 - IASSIST 2013
2013.05 - IASSIST 2013
 
2013.02 - 7th Workshop of German Panel Surveys
2013.02 - 7th Workshop of German Panel Surveys2013.02 - 7th Workshop of German Panel Surveys
2013.02 - 7th Workshop of German Panel Surveys
 
2012.12 - EDDI 2012 - Poster Demo
2012.12 - EDDI 2012 - Poster Demo2012.12 - EDDI 2012 - Poster Demo
2012.12 - EDDI 2012 - Poster Demo
 

2012.10 - DDI Lifecycle - Moving Forward - 3

  • 1. UML 2.4 Tutorial Thomas Bosch GESIS - Leibniz Institute for the Social Sciences, Mannheim, Germany thomas.bosch@gesis.org Abstract.The purpose of the Unified Modeling Language (UML) is to model, document, specify, and visualize complex systems. The UML delivers notation elements for static as well as dynamic models of analysis, design, and architec- ture and supports object-oriented procedures in particular. This tutorial serves the attendees of the workshop „DDI Lifecycle – Moving Forward‟ as a guide and a reference to understand the most important elements of class diagrams and activity diagrams of the actual version of the UML 2.4 standard.As exam- ples excerpts from the statistical domain are modeled. The references section contains a list of books, which I recommend to read in order to get a detailed understanding of the UML modeling standard. This list is ordered according to my personal preferences. Keywords: UML 2.4, class diagrams, activity diagrams. 1 Class Diagrams Using class diagrams the structure of systems is visualized. Class diagrams show relevant static concepts and their relationships to each other [1]. In this section, only the most relevant components of class diagrams are explained in detail. In the follow- ing figure, the classes „Study‟ and „StudyGroup‟ are defined. Classes stand for real as well as digital objects or instances. A specific study, for instance the germanmicro- census of the year 2009, represents such an instance of the class „Study‟. For the fur- ther description of classes attributes can be specified. In the example, the attribute „title‟ is defined in the class „Study‟. This attribute stands for study titles of concrete „study‟ objects. Study titles are of the datatype „String‟ and have the default value “studyTitle”. The visibility of the attribute „title‟ is set to private (-). This means that only concrete study objects are aware of the existence of this attribute and can see the attribute‟s actual value. The visibility can also be set to public (+). As a consequence, other classes and their concrete instances can see these attributes and their values at runtime. These classes „Study‟ and „StudyGroup‟ are both defined as sub-classes of the ab- stract super-class „StudyOrStudyGroup‟, as for this super-class common attributes may be defined. Common attributes are then inherited by all the sub-classes. The class „StudyOrStudyGroup‟ is specified as „abstract‟, since it makes no sense to generate instances of this class. There‟s no concrete object, which is at the same time a study
  • 2. and a group of studies. For the abstract super-class a generalization set is specified. The property „complete‟ indicates that the set of sub-classes is complete, i.e. all rea- sonable sub-types are modeled. The property „disjoint‟ indicates that no instance of a sub-type is at the same time an instance of the other sub-class. The remaining proper- ties are „overlapping‟ and „incomplete‟ representing the inverse properties. Between the classes „StudyGroup‟ and „Study‟ an aggregation and alsocardinali- ties are defined. This means that groups of studies may contain multiple studies. But Study groups may also include no studies, as the range 0 to n (n indicated by *) is specified. Studies may be contained in groups of studies, since the multiplicity 0 to n is stated. In contrast to a composition, an aggregation is used as the relation between the whole thing (the study group) and the parts (the studies) is not existence- depending, i.e. if a study, contained in a particular group of studies, is deleted, the including study group will not be deleted. Fig.1. Studies and goups of studies Figure 2 shows code lists as representations of variables. An association is defined between the class „Variable‟ and the class „Representation‟. Associations stand for relationships between concrete objects of the source and target classes. For associa- tions cardinalities can be stated. In our example, each variable has exactly one repre- sentation and specific representations may represent more than one variable (0..*). The roles, classes have in associations, may be defined at each association end. The role, particular variables have when they are in the association „representation‟, is in this case „variable‟. Concrete representations are in the role „representation‟ when they are related to certain variables using the association „representation‟. As the visi- bility of the roles is declared as public (+), other classes within the same package can see objects which are in these roles.The arrow next to the name of the association
  • 3. indicates the reading direction of the association. The arrow at the end of the associa- tion shows that only variables know their specific representation and not the other way around - concrete representations don‟t know the represented variables, i.e. they do not have to store represented variables or references to these variables. Fig. 2. Representation of variables Between the class „Representation‟ and the class „Code‟ a composition is defined. This means that representations may contain 0 to ncodes and if a specific included code is deleted, the representation itself will also be deleted afterwards. This relation- ship is therefore existing-dependent. The whole thing (the representation) can‟t exist-
  • 4. without all parts (the codes). In the case of an aggregation, in contrast to a composi- tion, the whole thing could exist further when a part is deleted. Figure 3 displays questions which may be contained in questionnaires and com- ments which are associated with questionnaires and questions. As comments about a certain question in a particular questionnaire depend on both the questionnaire and the question, an association class - a model element that has both association and class properties - has to be specified. An association class canbe seen as an association that also has class properties, or as a class that also has associationproperties. It not only connects a set of classifiers but also defines a set of features thatbelong to the rela- tionship itself and not to any of the classifiers [1].Comments have a string text and a comment type as attributes. Fig. 3. Questionnaires and questions The comment type‟s values are „internalComment‟ and „externalComment‟. As on- ly these two values are allowed, an enumeration is added. Enumerations are modeled as classes with the stereotype „enumeration‟, displayed in the UML class diagram as <<enumeration>>. 2 Activity Diagrams Activity modeling is a specialized type of behavioral modeling concerned with modeling the activities and responsibilities of elements. Using UML activity dia- grams, you can display the processing of use cases, operations, and complete business processes. An activity is the specification of parameterized behavior as the coordinated sequencingof subordinate units whose individual elements are actions [1]. The next figure visualizes the activity or the business process to publish variable lists in different formats.The overall activity is divided into two activity partitions. An activity partition is
  • 5. a kind of activity group for identifying actions that have somecharacteristic in common [1]. The actions of the activity „publish variable lists‟ are executed in the first activity partition by a national statistical office and in the second activity partition by a statistical research institute. An initial node is a control node at which flow starts when the activity is invoked. An activity final node is a final node that stops all flows in an activity [1]. The activity to publish variable lists starts at the initial node within the context of the national statistical office and ends in the area of responsibility of the statistical research institute. First, the national statistical office sends a signal whose event is received by the statistical research institute. As signal a variable list is sent which is received by the corresponding event. Fig. 4. Publishing variable lists The result of the event is the list of variables which is represented using an object node. An object node is an abstract activity node that is part of defining object flow in an activi- ty [1]. There are two kinds of flows in an activity diagram: control flows and object flows. These flows are visualized by arrows in the diagram. Whenever the source or the target node of an arrow is an object node, the flow is an object flow.
  • 6. The next control flow points from the object node „variable list‟ to the action node „check variable list‟. An action is a named element that is the fundamental unit of execut- able functionality. The execution of an action represents some transformation or processing in the modeled system, be it a computer system or otherwise [1]. The action to check the variable list is in this case a special kind of action, a so-called call behavior action, as an appropriate activity is invoked. Using such an approach activities can be nested and the entire activity diagram is much clearer. Call behavior actions have a little rake in their rounded rectangle. Moreover, this action is framed by an interruptible activity region. An interruptible activity region is an activity group that supports termination of tokenflowing in the portions of an activity [1]. Whenever an exception occurs in this spe- cial framed area, the flow continues over the flashed control flow to the following action which is in this case the notification of the colleagues. If the file containing the variable list is broken, the colleagues will be notified. After one week a time event is received and the control flow continues in this branch. In case the file including the variable list is not damaged, a decision has to be tak- en. In activity diagrams decisions are visualized using decision nodes. A decision node is a control node that chooses between outgoing flows [1]. The associated condition „all variables available?‟ is stated after the stereotype „<<decisionInput>>‟ in a note linked to the decision node. If all variables are available (the condition is evaluated to the boolean value true [true]), the left branch will be executed and if not all variables are available ([false]), the right branch will be followed. As actions cannot have more than one incom- ing control flow, a merge node has to join all the incoming control flows of the action „notify national statistical office (NSO)‟ on the outmost branch of the activity. A merge node is a control node that brings together multiple alternate flows. It is not used to syn- chronize concurrent flows but to accept one among several alternate flows [1]. If all variables are available in the variable list [the condition is evaluated to true], two parallel control flows will be executed indicated by a fork node. A fork node is a control node that splits a flow into multiple concurrent flows [1]. At the same time an html view and a pdf view of the variable list can be created simultaneously. At the end of these con- current control flows a join node has to be set. A join node is a control node that synchro- nizes multiple flows [1]. The following merge node joins the two conditional branches and then the variable list can be published. The activity final node closes the activity at the end. References 1. Rupp, C., Queins, S.: UML 2 glasklar - Praxiswissen für die UML-Modellierung. Carl hanser Verlag (2012) 2. Hitz, M., Kappel, G., Kapsammer, E., Retschitzegger, W.: UML @ Work - Objektorientierte Modellierung mit UML 2. dpunkt.verlag (2005) 3. Fowler, M.: Uml Distilled: A Brief Guide to the Standard Object Modeling Language. Ad- dison-Wesley Professional (2004) 4. Pilone, D., Pitman, N.: UML 2.0 in a Nutshell. O‟Reilly (2005)