Previous Table of Contents Next


4.3.1 Core Data Types


   The ObjectModel metamodel contains the data types, listed below in alphabetical order. Each of these data types is an instance of the DataType class.

   Some of these data types have default values. These default values only apply for mandatory attributes or parameters of the relevant data type where an explicit value is not supplied.

   Any

   The Any data type is used to indicate that an attribute or parameter may take values from any of the available data types. In CWM, the set of data types an Any attribute or parameter may assume includes the data types and enumerations described in this chapter plus any available instances of the Classifier class.

   There is no default value for data type Any.

   Boolean

   Boolean defines an enumeration that denotes a logical condition. Its enumeration literals are:

   The default for data type Boolean is false.

   Float

   The Float data type is used to indicate that an attribute or parameter may take on floating point numeric values. The number of significant digits and other representational details are implementation defined.

   The default for the Float data type is the value 0.0.

   Integer

   Integer represents the predefined type of integers. An instance of Integer is an element in the (infinite) set of integers (…-2, -1, 0, 1, 2…).

   The default for Integer is 0.

   Name

   Name defines a token that is used for naming ModelElements and similar usages. Each Name has a corresponding String representation. For purposes of exchange a name should be represented as a String.

   The default for the Name data type is an empty string.

   String

   String defines a piece of text. Strings do not normally have a defined length; rather, they are considered to be arbitrarily long (practical limits on the length of Strings exist, but are implementation dependent). When String is used as the type of an Attribute, string length sometimes can be specified (see the Relational and Record packages for examples).

   The default for the String data type is an empty string.

   Time

   Time defines a statement that will define the time of occurrence of an event. The specific format of time expressions is not specified here and is subject to implementation considerations.

   There is no default for the Time data type.

   UnlimitedInteger

   UnlimitedInteger defines a data type whose range is the nonnegative integers augmented by the special value “unlimited.? It is used for the upper bound of multiplicities.

   The default for an UnlimitedInteger is the special value “unlimited.?

   The ObjectModel metamodel contains the enumerated data types shown below in alphabetical order. Enumeration literals defined for each enumerated type are described as well.

   ChangeableKind

   In the metamodel ChangeableKind defines an enumeration that denotes how an attribute link may be modified. Its values are:

   The default value is ck_changeable.

   OrderingKind

   In the metamodel OrderingKind defines an enumeration that specifies how the elements of a set are arranged. Used in conjunction with elements that have a multiplicity in cases when the multiplicity value is greater than one. The ordering must be determined and maintained by operations that modify the set. Its values are:

   • ok_unordered - The elements of the set have no inherent ordering.

   • ok_ordered - The elements of the set have a sequential ordering.

   The default value is ok_unordered.

   ScopeKind

   In the metamodel ScopeKind defines an enumeration that denotes whether a feature belongs to individual instances or an entire classifier. Its values are:

   The default value is sk_instance.

   VisibilityKind

   In the metamodel VisibilityKind defines an enumeration that denotes how the element to which it refers is seen outside the enclosing name space. Its values are:

   The default value is vk_public.