Up Previous Next Title Page Index Contents

1.1.4 Bindings

The information about how the objects, ports, roles and relationships in a graph are connected is stored as bindings in that graph (Figure 1–3). Each binding stores a relationship and two or more connections, each consisting of a role, an object and optionally a port. Figure 1–4 provides an example of a binding in diagram representation. Although the figure shows ports for completeness, in most cases you will not create ports, but instead simply have the role connect directly to the object.

Figure 1–4. Binding components.

Graph types also contain bindings, referring to relationship, role and object types, and optionally ports or port types. These type bindings specify what kinds of bindings are legal in graphs of this type: for instance, a WatchApplication specifies that a binding can exist for a Transition with a State in a From role, a State in a To role, a Button in an Event role and an Action in an Action role.

Type bindings can also store somewhat more than instance bindings, to make metamodeling easier. Sometime a given connection can be repeated many times in a binding, e.g. an Inheritance relationship may allow one Superclass but many Subclasses. Rather than having to specify many identical connections with a Subclass role connecting to a Class object, one connection can be specified and given a cardinality of 1..N. A connection in a type binding can also specify more than one object type; on the instance level a single object of any of those types can be connected in a role of that type.

Up Previous Next Title Page Index Contents