27.01.2015 Views

Composite Structure Diagram (UML).pdf

Composite Structure Diagram (UML).pdf

Composite Structure Diagram (UML).pdf

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Composite</strong> structure diagram 1<br />

<strong>Composite</strong> structure diagram<br />

<strong>Composite</strong> structure diagram in the<br />

Unified Modeling Language (<strong>UML</strong>) is<br />

a type of static structure diagram, that<br />

shows the internal structure of a class<br />

and the collaborations that this<br />

structure makes possible.<br />

This diagram can include internal<br />

<strong>UML</strong> 2.0 composite structure diagram.<br />

parts, ports through which the parts<br />

interact with each other or through which instances of the class interact with the parts and with the outside world,<br />

and connectors between parts or ports. A composite structure is a set of interconnected elements that collaborate at<br />

runtime to achieve some purpose. Each element has some defined role in the collaboration.<br />

<strong>Composite</strong> structure concepts<br />

The key composite structure entities identified in the <strong>UML</strong> 2.0 specification are structured classifiers, parts, ports,<br />

connectors, and collaborations [1] .<br />

• Part : A part represents a role played at runtime by one instance of a class or by a collection of instances. The part<br />

may only name the role, it may name an abstract superclass, or it may name a specific concrete class. The part can<br />

include a multiplicity factor, such as the [0..*] shown for Viewer in the diagram.<br />

• Port : A port is an interaction point that can be used to connect structured classifiers with their parts and with the<br />

environment. Ports can optionally specify the services they provide and the services they require from other parts<br />

of the system. In the diagram, each of the small squares is a port. Each port has a type and is labelled with a name,<br />

such as "var", "indVar1", or "view" in the diagram. Ports may contain a multiplicity factor, for example [3].<br />

Ports can either delegate received requests to internal parts, or they can deliver these directly to the behavior of<br />

the structured classifier that the port is contained within. Public ports that are visible in the environment are<br />

shown straddling the boundary, while protected ports that are not visible in the environment are shown inside<br />

the boundary. All the ports in the diagram are private, except for the view port along the right boundary of<br />

FibonacciSystem.<br />

• Connector : A connector binds two or more entities together, allowing them to interact at runtime. The connector<br />

is shown as a line between some combination of parts, ports and structured classifiers. The diagram shows three<br />

connectors between ports, and one connector between a structured classifier and a part.<br />

• Collaboration : A collaboration is generally more abstract than a structured classifier. It is shown as a dotted oval<br />

containing roles that instances can play in the collaboration.<br />

• <strong>Structure</strong>d classifier : A <strong>Structure</strong>dClassifier represents a class, often an abstract class, whose behavior can be<br />

completely or partially described through interactions between parts.<br />

An EncapsulatedClassifier is a type of structured classifier that contains ports. In the diagram below, both<br />

FibonacciSystem and Variable are encapsulated classifiers because they both have ports along their<br />

boundaries.


<strong>Composite</strong> structure diagram 2<br />

<strong>Composite</strong> structure diagram example<br />

As an example, consider one possible way of modeling production of the Fibonacci sequence.<br />

This <strong>UML</strong> 2.0 composite structure diagram specifies that instances of<br />

the 'FibonacciSystem' class are composed of a number of parts. The<br />

topmost of these parts is identified as having the classifier<br />

'FibonacciFunction'. Three of the parts are identified by the role they<br />

play within instances of FibonacciSystem - the NMinus2 role, the <strong>UML</strong> 2.0 composite structure diagram.<br />

NMinus1 role, and the N role. The fifth part, identified by its classifier<br />

Viewer, includes a multiplicity specification. At runtime there can be 0 or more instances of Viewer or some<br />

concrete subclass of Viewer.<br />

At runtime the class instances that implement these three roles must provide the services specified by the IVar<br />

interface through their var ports. One such class is Variable, shown on the diagram with a port named var of type<br />

Var that realizes the IVar interface.<br />

The port named "view" is a non-public port that can be used by an instance of FibonacciSystem to access the<br />

optional instance(s) of Viewer.<br />

External links<br />

• General information on <strong>UML</strong> [2] including the official <strong>UML</strong> 2.0 specification. See especially the large section on<br />

<strong>Composite</strong> <strong>Structure</strong>s.<br />

• The Xholon open-source project maintains a set of links [3] having to do with composite structure.<br />

References<br />

[1] OMG (2008). OMG Unified Modeling Language (OMG <strong>UML</strong>), Superstructure, V2.1.2 (http:// www. omg. org/ spec/ <strong>UML</strong>/ 2. 1. 2/<br />

Superstructure/ PDF) p.161-192.<br />

[2] http:/ / www. uml. org/<br />

[3] http:/ / www. primordion. com/ Xholon/ resources/ links. html#<strong>UML</strong>+ 2. 0+ <strong>Composite</strong>+ <strong>Structure</strong>%2C+ Ports%2C+ etc.


Article Sources and Contributors 3<br />

Article Sources and Contributors<br />

<strong>Composite</strong> structure diagram Source: http://en.wikipedia.org/w/index.phpoldid=354174219 Contributors: Badgernet, Dawynn, DePiep, Epbr123, KenSWebb, Kishorekumar 62, Mark<br />

Renier, Mdd, Qualc1, SAE1962, 15 anonymous edits<br />

Image Sources, Licenses and Contributors<br />

File:<strong>Composite</strong> <strong>Structure</strong> <strong>Diagram</strong>.png Source: http://en.wikipedia.org/w/index.phptitle=File:<strong>Composite</strong>_<strong>Structure</strong>_<strong>Diagram</strong>.png License: Public Domain Contributors: [:w:User:KenSWebb<br />

License<br />

Creative Commons Attribution-Share Alike 3.0 Unported<br />

http:/ / creativecommons. org/ licenses/ by-sa/ 3. 0/

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!