Composite Structure Diagram Luca Colombi. Abstract UML 2.0 composite structure diagram Basic...
-
Upload
kaelyn-pennel -
Category
Documents
-
view
250 -
download
1
Transcript of Composite Structure Diagram Luca Colombi. Abstract UML 2.0 composite structure diagram Basic...
Composite Structure Diagram
Luca Colombi
AbstractUML 2.0 composite structure diagramBasic concepts
Structure, structured entity, internal structureElements
PropertyConnectorNested notation
Description powerClasses & Structured Classes
Instance specificationNamespace behaviour
CollaborationPurpose
RolesRole binderCollaboration Occurrence
Occurrence binder<<occurrence>> & <<represent>>
PortVisibilityInterfaces
Examples
UML 2.0 diagram
Classified in UML 2.0 structural diagramsNew:this diagram was not available in UML 1.*
Purpose
Composite structure diagrams can be used to describe:
structures of interconnected partsrun-time structures of interconnected instancesExample:Description of the parts of an engine that are interconnected to perform the engine functioning
Structure
A set of instances that communicate and collaborate at run-time to realize a common goal
Ex.: net routers that realize a particular journey
Structured element:An element realized by a structure
Ex.: a net realized by routers
Internal structure:A structure that realize a structured element
Ex.: all the routers in a net
PropertyA set of instances contained in a structured instance
roleName:TypeName
ms:MailSender
ms:MailSender
sendMail(…)
MailSender
role of the property instances for the container (optional)type or class of the property instances (obligatory)
Connector
Represents the visibility between two property a communication way
w:Well
e:EngineconnName:ConnTyperoleName1 roleName2
[Multeplicity1] [multeplicity2]
a:Axis
2
1
role multeplicity (optional)
role name (optional)connector name (optional)
connector type (optional)
proprerty
Nested notation
Composite structure diagrams allows to use class diagram-like or nested notationIt is permitted to recursively nest already nested entitiesContainer
Container
contained3:Inner3
contained2:Inner2[n2]
contained1:Inner1[n1]
contained3:Inner3
contained2:Inner2
contained1:Inner1property
multeplicity (integer, optional)
inner dash ifnot a composition
Structured Class: example
Recursive application of nested notation can be done inside a single diagram
RoomContents
john:Mangeranium:Plant
Leaf[*] Trunkheight:real
Description power
Nested notation can describe all things describable in 1.* class diagrams notation, and a little more
Car
Wheel Engine
Car
**Axis
w:Wheel[4] e:Enginea:Axis
2 1e12w
Instance specification
describes the property which is returned by an operation call, the operation is pointed by the arrow at the end of a dashed line that starts from the returned type description
Room
createChair(…) getWindow(…)
c:Chair
<<create>> is an optional label and specify that label exists only after the operation call
w:WindowLeg[4]
<<create>>
Namespace behaviour
A structured class acts as a namespace for its internal descriptions, so descriptions are not implicitly exported
Collaboration
A joining of structure elements that collaborate to collectively perform a task
CollaborationName
CollaborationName
Used in nested notationThe name given to the collaboration (obligatory)
Collaboration purpose
A collaboration wants to describe a structure behaviour made by structure propertyMust be connected only with property which are required to perform its described behaviour
Collaboration role
property which collaborate to perform the collaboration goal, interpreting rolesEach collaboration role perform a specific task
Counting of clients
ClientCard
name:Stringaddress:String…
“Counting of clients” have some ClientCard as roles
Collaboration Role Binder
represent a participation of the role to the collaboration
Pilot
Car
Drive a car
roleName
the name given to the role
property
collaboration
Collaboration Occurrence
A specific collaboration instance
occName:CollName
used in nested notation
occName:CollName
name of the instance (obligatory)
type of the instance (obligatory)
send:MailSend
Occurrence binderBinds an occurrence to a role, maybe specifing how many occurrence repetitions are present
occName:CollName RoleTyperoleName[n]
occName:CollName
roleName:RoleType
[n]
sellProduct:Selljohn:Countryman
Egg
role name (optional)role multeplicity (optional)
selled[12]
Example: occurrence - Send mail
send:Send an email
Sender Receiver
mailServer[2][1] [1]
<<occurrence>> label
A dashed arrow between two symbol of same type means that pointing symbol represent pointed symbol, like in a specialization
Send email<<occurrence>>
Communicate
Home<<occurrence>>
Building
<<occurrence>> label is optional
<<represent>> label
client:CurrentAccount
accredit(…)deposit:Increase amount
<<represent>>
A dashed arrow from a collaboration or an occurrence to a property means that property use the other instance, like a client or a use case primary actor
<<represent>> label is optional
Occurrence binding nest crossing
Occurrence binding is admitted between separately nested elements with also have occurrence bindings
d:dealerp:producer
products transport putting on shelf
Port
represent a property communication point, and is always placed where the property joins whit its connectortwo types of communications:
Between a property and its external environmentBetween a property and its internal structure
Ports: visibility markingIf port symbol cover a rectangle boundary his visibility is publicIf port symbol is placed inside a rectangle, adjacent to his boundary, his visibility is protected
portName:EntityName[n]
portName:EntityName[n]
port instance name (optional)
port type (optional)
port multeplicity (optional)
Computer
User
m:Monitor[1]property
Ports: interfaces
An interface exported by a port is a little circle (interface symbol) connected with the port symbol by a lineAn interface needed by a port is a little semicircle (socket symbol) connected with the port symbol by a lineIf interface is present, interface type is signed near interface symbol
Ports: interfaces examples
Apache
SqlSrv
HttpSrvc
sqlServer
httpService [100]
Apache
SqlSrv
sqlServer[1]
httpService:HttpSrvc [100]
Apache
sqlServer:SqlSrv [1]
httpService:HttpSrvc [100]
Example: Port
Structure with many kinds of connectors and ports:
StudentRoom
:Key[101]
Keyboard
StudentComputer
p:RoomDoor
w:Window
Monitor
Example: structured class - House
House
Kitchen Bath
Hall
Passage
Bedroom[2] [1][1]
:Door:Window
:Window[2]
:Window[1]
:Window:Window
Example:collaboration - Drive a taxi
Drive a taxy
john:TaxyDriver
kate:Passenger
Body
Head
Leg[2] Bust Arm[2][2] [2]
Car
Well[4] Engine[2]
GE_553912:Taxy
:SteeringWheel [1]
[0..5]place:Seat
References
OMG official site for UML:http://www.uml.org
Agile software association Composite structure diagrams: http://www.agilemodeling.com/artifacts/compositeStructureDiagram.htm