StarUML 5.0 User Guide (Modeling with Component Diagram) http://staruml.sourceforge.net/docs/user-guide(en)/ch05_7.
html
Modeling with Component Diagram
The following elements are available in a component diagram.
Package
Interface
Component
ComponentInstance
Artifact
Port
Part
Association
Dependency
Realization
Link
Connector
Package
Semantics
A package is a grouping of model elements. Packages themselves may be nested within other packages. A package
may contain subordinate packages as well as other kinds of model elements. All kinds of UML model elements can
be organized into packages.
Procedure for creating package
In order to create Package in the component diagram,
1. Click [Toolbox] -> [Component] -> [Package] button.
2. Click at the position where Package will be placed in the [main window].
3. A package is created and the quick dialog of package appears.
1 of 15 2/6/2014 8:39 AM
StarUML 5.0 User Guide (Modeling with Component Diagram) http://staruml.sourceforge.net/docs/user-guide(en)/ch05_7.html
4. At the quick dialog, enter package name.
5. Press [Enter] key. Then the package is shown as follows.
Interface
Procedure for creating interface
In order to create Interface,
1. Click [Toolbox] -> [Component] -> [Interface] button.
2. Click at the position where Interface will be placed in the [main window].
3. At the quick dialog, enter interface name.
4. Press [Enter] key. Then the interface is shown as follows.
2 of 15 2/6/2014 8:39 AM
StarUML 5.0 User Guide (Modeling with Component Diagram) http://staruml.sourceforge.net/docs/user-guide(en)/ch05_7.html
Component
Semantics
A component represents a modular, deployable, and replaceable part of a system that encapsulates implementation
and exposes a set of interfaces.
Procedure for creating component
In order to create Component,
1. Click [Toolbox] -> [Component] -> [Component] button.
2. Click at the position where Component will be placed in the [main window]. And at the quick dialog, enter
component name and press [Enter] key. The result is as follows.
Procedure for adding resident element
In order to add resident element to component,
1. Select [Collection Editor...] popup menu of component.
2. Or click button in [Residents] property on properties window.
3 of 15 2/6/2014 8:39 AM
StarUML 5.0 User Guide (Modeling with Component Diagram) http://staruml.sourceforge.net/docs/user-guide(en)/ch05_7.html
3. At the [Residents] tab of the [collection editor], you can add resident element by using button.
4. At the [Select a Resident] dialog, select resident component.
4 of 15 2/6/2014 8:39 AM
StarUML 5.0 User Guide (Modeling with Component Diagram) http://staruml.sourceforge.net/docs/user-guide(en)/ch05_7.html
5. The component is assigned to component as resident component and is shown as follows.
Procedure for creating providing relationship
In order to create providing relationship,
1. Click [Toolbox] -> [Component] -> [Realization] button
2. Drag from component and drop to interface in the [main window].
5 of 15 2/6/2014 8:39 AM
StarUML 5.0 User Guide (Modeling with Component Diagram) http://staruml.sourceforge.net/docs/user-guide(en)/ch05_7.html
3. The result is as follows.
Procedure for creating requiring relationship
In order to create requiring relationship,
1. Click [Toolbox] -> [Component] -> [Dependency] button.
2. Drag from component and drop to interface in the [main window].
3. Finally, the interface requiring relationship is created.
6 of 15 2/6/2014 8:39 AM
StarUML 5.0 User Guide (Modeling with Component Diagram) http://staruml.sourceforge.net/docs/user-guide(en)/ch05_7.html
Procedure for creating providing interface of class.
In order to create providing inteface of class, use shortcut creation syntax.
1. Double-click class. At the quick dialog, enter "-@" staring and interface name, separate interface names by
"," character.
2. And press [Enter] key. Several interfaces provided by selected class is created and arranged automatically.
Procedure for creating requiring interface of class.
In order to create requiring inteface of class, use shortcut creation syntax.
1. Double-click class. At the quick dialog, enter "-(" or "-->", and enter interface names, separate interface
names by "," character.
2. And press [Enter] key. Several interfaces required by selected class is created and arranged automatically.
Procedure for creating port
In order to create port on a component,
1. Click [Toolbox] -> [Component] -> [Port] button.
7 of 15 2/6/2014 8:39 AM
StarUML 5.0 User Guide (Modeling with Component Diagram) http://staruml.sourceforge.net/docs/user-guide(en)/ch05_7.html
2. And click the component where the port will be contained in the [main window].
3. A port is created on the component. At the quick dialog, enter the port name and press [Enter] ken to be
complete.
4. The result is as follows.
Procedure for creating view by dragging port
You can create port by dragging port from [model explorer] to main diagram.
1. Drag port in the [model explorer] and drop on the component in the main diagram.
2. A port appears on the component. If it is not dropped on the component but on the other area of the diagram,
component with port will be created
Procedure for creating part
In order to create part,
1. Click [Toolbox] -> [Component] -> [Part] button.
8 of 15 2/6/2014 8:39 AM
StarUML 5.0 User Guide (Modeling with Component Diagram) http://staruml.sourceforge.net/docs/user-guide(en)/ch05_7.html
2. And click the component where the part will be contained in the [main window].
Procedure for creating connector
In order to create connector,
1. Click [Toolbox] -> [Component] -> [Connector] button.
2. Drag from one part and drop to the other part in the [main window].
3. The connector between two parts is created finally as follows.
9 of 15 2/6/2014 8:39 AM
StarUML 5.0 User Guide (Modeling with Component Diagram) http://staruml.sourceforge.net/docs/user-guide(en)/ch05_7.html
ComponentInstance
Semantics
A component instance is an instance of a component that resides on a node instance. A component instance may
have a state.
Procedure for creating component instance
In order to create ComponentInstance,
1. Click [Toolbox] -> [Component] -> [ComponentInstance] button.
2. And click at the position where ComponentInstance will be placed in the [main window].
3. Enter the component instance name at the quick dialog and press [Enter] key. The result is as follows.
Procedure for adding attribute to component instance
There are two way to add AttributeLink to component instance.
using ComponentInstance model in the main diagram or the [model explorer]
using [collection editor]
In the case of using ComponentInstance model,
1. Select ComponentInstance in the [main window] or in the [model explorer].
10 of 15 2/6/2014 8:39 AM
StarUML 5.0 User Guide (Modeling with Component Diagram) http://staruml.sourceforge.net/docs/user-guide(en)/ch05_7.html
2. Right-click the selected ComponentInstance, select [Add] -> [Attribute Link] popup menu.
3. and you can add Attribute Link.
In the other case,
1. Select [Collection Editor...] popup menu of ComponentInstance.
2. Click button in slots property on properties window.
3. At [Slots] tab of the [collection editor], you can add attribute link by using button.
11 of 15 2/6/2014 8:39 AM
StarUML 5.0 User Guide (Modeling with Component Diagram) http://staruml.sourceforge.net/docs/user-guide(en)/ch05_7.html
Artifact
Semantics
An Artifact represents a physical piece of information that is used or produced by a software development process.
Examples of Artifacts include models, source files, scripts, and binary executable files. An Artifact may constitute the
implementation of a deployable component.
Procedure for creating artifact
In order to create Artifact,
1. Click [Toolbox] -> [Component] -> [Artifact] button.
2. And click at the position where Artifact will be placed in the [main window].
12 of 15 2/6/2014 8:39 AM
StarUML 5.0 User Guide (Modeling with Component Diagram) http://staruml.sourceforge.net/docs/user-guide(en)/ch05_7.html
3. The artifact is created on the diagram and the quick dialog is shown. At the quick dialog, enter the artifact
name
4. Press [Enter] Key to have done procedure.
Association
Procedure for creating association
In order to create association,
1. Click [Toolbox] -> [Component] -> [Association] button.
2. Drag from one associated and drop to another in the [main window].
3. Between two elements, the association is created finally.
Dependency
Procedure for creating dependency
In order to create dependency,
1. Click [Toolbox] -> [Component] -> [Dependency] button.
13 of 15 2/6/2014 8:39 AM
StarUML 5.0 User Guide (Modeling with Component Diagram) http://staruml.sourceforge.net/docs/user-guide(en)/ch05_7.html
2. Drag and drop between elements in the [main window] in depending direction.
3. The dependency between two elements is created.
Realization
Procedure for creating realization
In order to create realization,
1. Click [Toolbox] -> [Component] -> [Realization] button.
2. Drag and drop between elements in the [main window] in realization direction.
3. The realization is created as follows.
14 of 15 2/6/2014 8:39 AM
StarUML 5.0 User Guide (Modeling with Component Diagram) http://staruml.sourceforge.net/docs/user-guide(en)/ch05_7.html
Link
Procedure for creating link
In order to create Link between two components,
1. Click [Toolbox] -> [Component] -> [Link] button.
2. Drag from one ComponentInstance and drop to the other ComponentInstance in the [main window]. Then
the link is created as follows.
15 of 15 2/6/2014 8:39 AM