A value specification is the specification of a (possibly empty) set of instances, including both objects and data values.
Description
ValueSpecification is an abstract metaclass used to identify a value or values in a model. It may reference an instance or
it may be an expression denoting an instance or instances when evaluated.
Attributes
No additional attributes.
Associations
Element::owner.
Constraints
No additional constraints.
Additional Operations
These operations are introduced here. They are expected to be redefined in subclasses. Conforming implementations may
be able to compute values for more expressions that are specified by the constraints that involve these operations.
The query isComputable() determines whether a value specification can be computed in a model. This operation cannot be
fully defined in OCL. A conforming implementation is expected to deliver true for this operation for all value specifica-
tions that it can compute, and to compute all of those for which the operation is true. A conforming implementation is
expected to be able to compute the value of all literals.
ValueSpecification::isComputable(): Boolean;
isComputable = false
The query integerValue() gives a single Integer value when one can be computed.
ValueSpecification::integerValue() : [Integer];
integerValue = Set{}
The query booleanValue() gives a single Boolean value when one can be computed.
ValueSpecification::booleanValue() : [Boolean];
booleanValue = Set{}
The query stringValue() gives a single String value when one can be computed.
ValueSpecification::stringValue() : [String];
stringValue = Set{}
The query unlimitedValue() gives a single UnlimitedNatural value when one can be computed.
ValueSpecification::unlimitedValue() : [UnlimitedNatural];
unlimitedValue = Set{}
The query isNull() returns true when it can be computed that the value is null.
ValueSpecification::isNull() : Boolean;
isNull = false
Semantics
A value specification yields zero or more values. It is required that the type and number of values is suitable for the
context where the value specification is used.
Notation
No specific notation.