Element (from Kernel)

An element is a constituent of a model. As such, it has the capability of owning other elements.

Description

Element is an abstract metaclass with no superclass. It is used as the common superclass for all metaclasses in the infrastructure library. Element has a derived composition association to itself to support the general capability for elements to own other elements.

Attributes

No additional attributes.

Associations
Constraints

[1] An element may not directly or indirectly own itself.

not self.allOwnedElements()->includes(self)

[2] Elements that must be owned must have an owner.

self.mustBeOwned() implies owner->notEmpty()

Additional Operations

[1] The query allOwnedElements() gives all of the direct and indirect owned elements of an element.

Element::allOwnedElements(): Set(Element);
allOwnedElements = ownedElement->union(ownedElement->collect(e | e.allOwnedElements()))

[2] The query mustBeOwned() indicates whether elements of this type must have an owner. Subclasses of Element that do  not require an owner must override this operation.

Element::mustBeOwned() : Boolean;
mustBeOwned = true

Semantics

Subclasses of Element provide semantics appropriate to the concept they represent. The comments for an Element add no semantics but may represent information useful to the reader of the model.

Notation

There is no general notation for an Element. The specific subclasses of Element define their own notation.