Composite structure diagram

Composite structure diagram
UML diagrams
Structural UML diagrams
Class diagram
Component diagram
Composite structure diagram
Deployment diagram
Object diagram
Package diagram
Profile diagram
Behavioural UML diagrams
Activity diagram
Communication diagram
Interaction overview diagram
Sequence diagram
State diagram
Timing diagram
Use case diagram

Composite structure diagram in the Unified Modeling Language (UML) is a type of static structure diagram, that shows the internal structure of a class and the collaborations that this structure makes possible.

This diagram can include internal parts, ports through which the parts interact with each other or through which instances of the class interact with the parts and with the outside world, and connectors between parts or ports. A composite structure is a set of interconnected elements that collaborate at runtime to achieve some purpose. Each element has some defined role in the collaboration.

The composite structure diagram and related notions have been introduced into UML2.0 to supplement already existing artifacts such as classes. However the usage of these constructs by engineers and/or modellers is not always in the spirit of inventors of these constructs. A number of additional interpretations develop which are not always consistent with the intended usage of the structure nor with the language itself. Understanding these additional usages assists in understanding areas of ambiguity, extension, inconsistency and the future development of the language.

As tools become more UML compliant and support more UML constructs, engineers and/or modellers begin to use these additional constructs. The effect of this is that the semantics of these constructs is often learnt through an implicit process based around the name of the construct and what the tool appears to allow; in practice, the semantics are often based on the engineer’s expectations and perceived meaning rather than on the actual, intended semantics.

A composite structure diagram always shows the internal structure of a given system and depends upon the internal parts that are used in that particular system. The role of the diagram is to act as a container for the interaction points of various elements of the system and to demonstrate their configuration and relationships.

Contents

Composite structure concepts

UML 2.0 composite structure diagram.

The key composite structure entities identified in the UML 2.0 specification are structured classifiers, parts, ports, connectors, and collaborations[1].

  • Part : A part represents a role played at runtime by one instance of a class or by a collection of instances. The part may only name the role, it may name an abstract superclass, or it may name a specific concrete class. The part can include a multiplicity factor, such as the [0..*] shown for Viewer in the diagram.
A part is like small element in the Composite Structure Diagram, which is set of some instances those are under control of the classifier instance. A part can be deleted from its parent node or bigger part before that bigger part ( parent ) deleted, so it is clear that part is not deleted at the same time when parent deletion is going on.
Representation - A part is represented as normal rectangle in the composite structure diagram, which is not any kind of decoration with something to increase its beauty or distinction.
An EncapsulatedClassifier is a type of structured classifier that contains ports. In the diagram above, both FibonacciSystem and Variable are encapsulated classifiers because they both have ports along their boundaries.
  • Port : Port is another notation used in the Composite Structure Diagram, which is mainly used for the representation of the externally visible parts of the specified classifiers. Another use of the port is to indicate the relation between the specified classifier and its respected environment. Port is indicated on the boundaries of the composite structures or the classes.
Representation - A port is represented as rectangle on the boundary of the classifier or that specific subsection.
  • Interfaces : Actually interfaces are used for indicating general operations, which has some kind of restrictions and it really looks similar to the classes. It has not any default implementation. It can be public and abstract. Furthermore interfaces are divided into 2 categories such as provided and required interfaces.
Provided interfaces : It says as yes for respected classifier supplies the operations defined by the named interface element, which is mostly defined by drawing a realization link between the class and the interface.
Required interfaces : It is just like classifier that can communicate with other classifier for providing operations defined by the named interface element.
Attributes of the interface must be constant. A class can have multiple interfaces.
Representation - When interface indicated in the diagram as rectangle, it must have <<interface>> keyword. Otherwise it is shown as circle, which indicate the abstract. When interface indicated as the circle, it can not show the operations.
  • Delegate : Delegates are used for representing internal working operation like outer interfaces and ports of the respected component. It is kind of connection between the external operation of the component, which is shown by its ports to the internal realization of the behavior of the component's part.
Representation : It is represented as an arrow, but with the <<delegate>> keyword.
  • Collaboration : Collaboration used in this scenario for describing the collective efforts taken by the class. It is just like the set of the co-operating operations used collectively to perform any specific task.
Collaboration mainly used for the describing the roles and attributes to perform any kind of specific task. Re-usability, clarifying the behavior of the system and simplifying the structure are the primary goals of the Collaboration.
Representation - It can be represented as ellipse in the diagram.
  • Role Binding : The main purpose of this role binding is to indicate the classifier that fulfills the role. It is generally directed from the collaboration to the classifier.
Representation - It is dashed line with the specified role of the classifier. It also has arrowhead to indicate the direction.
  • Represents : For indicating collaboration is used in any function or any classifier, another notation "represents" connector drawn from a collaboration to a classifier.
Representation It is represented as dashed line with arrowhead. It must have the keyword «represents».

Composite structure diagram example

As an example, consider one possible way of modeling production of the Fibonacci sequence.

This UML 2.0 composite structure diagram specifies that instances of the 'FibonacciSystem' class are composed of a number of parts. The topmost of these parts is identified as having the classifier 'FibonacciFunction'. Three of the parts are identified by the role they play within instances of FibonacciSystem - the NMinus2 role, the NMinus1 role, and the N role. The fifth part, identified by its classifier Viewer, includes a multiplicity specification. At runtime there can be 0 or more instances of Viewer or some concrete subclass of Viewer.

At runtime the class instances that implement these three roles must provide the services specified by the IVar interface through their var ports. One such class is Variable, shown on the diagram with a port named var of type Var that realizes the IVar interface.

The port named "view" is a non-public port that can be used by an instance of FibonacciSystem to access the optional instance(s) of Viewer.

References

External links


Wikimedia Foundation. 2010.

Игры ⚽ Нужна курсовая?

Look at other dictionaries:

  • Diagram — Further information: Chart Sample flowchart representing the decision process to add a new article to Wikipedia. A diagram is a two dimensional geometric symbolic representation of information according to some visualization technique. Sometimes …   Wikipedia

  • Class diagram — UML diagrams Structural UML diagrams Class diagram Component diagram Composite structure diagram Deployment diagram Object diagram …   Wikipedia

  • Component diagram — of an Insurance Policy Administration System UML diagrams Structural UML diagra …   Wikipedia

  • Communication diagram — Example of a Communication diagram. UML diagrams Structural UML diagrams Class diagram …   Wikipedia

  • Object diagram — Example of a Object diagram. UML diagrams Structural UML diagrams …   Wikipedia

  • Cluster diagram — A Cluster diagram or clustering diagram is a general type of diagram, which represents some kind of cluster. A cluster in general is a group or bunch of several discrete items that are close to each other. [1] The cluster diagram figures a… …   Wikipedia

  • Deployment diagram — A sample deployment diagram UML diagrams Structural UML diagrams …   Wikipedia

  • Sandwich-structured composite — Composite sandwich structure panel used for testing at NASA A sandwich structured composite is a special class of composite materials that is fabricated by attaching two thin but stiff skins to a lightweight but thick core. The core material is… …   Wikipedia

  • Data structure — In computer science, a data structure is a particular way of storing and organizing data in a computer so that it can be used efficiently.[1][2] Different kinds of data structures are suited to different kinds of applications, and some are highly …   Wikipedia

  • Container (data structure) — For the abstract notion of containers in Type theory, see Container (Type theory). In computer science, a container is a class, a data structure[1][2], or an abstract data type (ADT) whose instances are collections of other objects. In other… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”