World Library  
Flag as Inappropriate
Email this Article

Composite structure diagram

Article Id: WHEBN0006396415
Reproduction Date:

Title: Composite structure diagram  
Author: World Heritage Encyclopedia
Language: English
Subject: Unified Modeling Language, Interaction overview diagram, State diagram (UML), Timing diagram (Unified Modeling Language), Cluster diagram
Collection: Unified Modeling Language Diagrams
Publisher: World Heritage Encyclopedia

Composite structure diagram

UML 2.0 composite structure 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 (computer science) 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.


  • Composite structure concepts 1
  • Composite structure diagram example 2
  • References 3
  • External links 4

Composite structure concepts

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 classifier 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.
  • Port : A port is an interaction point that can be used to connect structured classifiers with their parts and with the environment. Ports can optionally specify the services they provide and the services they require from other parts 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, such as "var", "indVar1", or "view" in the diagram. Ports may contain a multiplicity factor, for example [3].
Ports can either delegate received requests to internal parts, or they can deliver these directly to the behavior of the structured classifier that the port is contained within. Public ports that are visible in the environment are shown straddling the boundary, while protected ports that are not visible in the environment are shown inside the boundary. All the ports in the diagram are public, except for the view port along the right boundary of FibonacciSystem.
  • Connector : A connector binds two or more entities together, allowing them to interact at runtime. The connector is shown as a line between some combination of parts, ports and structured classifiers. The diagram shows three connectors between ports, and one connector between a structured classifier and a part.
  • Collaboration : A collaboration is generally more abstract than a structured classifier. It is shown as a dotted oval containing roles that instances can play in the collaboration.
  • Structured classifier : A StructuredClassifier represents a class, often an abstract class, whose behavior can be completely or partially described through interactions between parts.
  • Encapsulated classifier : 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.

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.


  1. ^ OMG (2008). OMG Unified Modeling Language (OMG UML), Superstructure, V2.1.2 p.161-192.

External links

  • General information on UML including the official UML 2.0 specification. See especially the large section on Composite Structures.
  • The Xholon open-source project maintains a set of links having to do with composite structure.
  • UML 2 Composite Structure Diagrams
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from World eBook Library are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.