===Listing 7 Brake Component corresponding element has to have the same id===

context brakesystem :: BrakeComponent
inv : self . select (∼) ->
forAll ( c | c . oclIsTypeOf ( CAD :: Namespace )
    and self . select (∼) -> size () = 1
    and self . id = self . select (∼) -> first (). id
---------------------------

The constraint shown in Listing 7 first checks that everything that a BrakeComponent
corresponds with is of type Namespace in the CAD model. The second check
makes sure that there is 1-to-1 mapping between an instance of BrakeComponent and
an instance of Namespace. The third and last part of this constraint checks that the
id of the BrakeComponent is the same as the corresponding Namespace element. To
compare the id with the one corresponding element, we have to invoke the first()
collection operation because the select(∼) operation yields a collection.

The constraint in Listing 8 (in combination with the constraint in Listing 7) checks
that the value of the attribute OEM_Number in the a BrakeComponent is identical
with the Parameter that is connected to the corresponding Namespace. There should
only be exactly one Parameter that has the name OEM Number, and the value should
be distinct.

=========================================================
.map
=========================================================

