- All Superinterfaces:
- RefBaseObject, RefPackage
- All Known Implementing Classes:
public interface DataTypesPackage
- extends RefPackage
DataTypes package interface.
The DataTypes package depends on the following packages:
The CWM DataTypes metamodel supports definition of metamodel constructs
that modelers can use to create the specific data types they need.
Although the CWM Foundation itself does not contain specific data type
definitions, a number of data type definitions for widely used
environments are provided (in the CWM Data Types chapter) as examples of
the appropriate usage of CWM Foundation classes for creating
data type definitions.
OCL Representation of DataTypes Constraints
[C-4-1] A TypeAlias instance cannot alias itself.
context TypeAlias inv:
self.type <> self
[C-4-2] A Union can have at most one default UnionMember instance.
context Union inv:
self.allFeatures->select(isDefault)->size <= 1
Note: This type should not be subclassed,
implemented or directly instantiated by clients. It is generated from a
MOF metamodel and implemented by Enki or MDR.
|Methods inherited from interface javax.jmi.reflect.RefPackage
refAllAssociations, refAllClasses, refAllPackages, refAssociation, refAssociation, refClass, refClass, refCreateStruct, refCreateStruct, refDelete, refGetEnum, refGetEnum, refPackage, refPackage
- Returns CwmEnumeration class proxy object.
The Enumeration class is intended as a starting point from which
enumerated data types can be created. An enumerated data type is a
collection of identifiers often used as the permitted states that some
other attribute or property of the enumerated type may take.
The isOrdered attribute of an Enumeration instance is used to
determine if the ordered constraint on the EnumerationLiterals
association is relevant for the enumeration. The particular ordering
of EnumerationLiteral instances is obtained from the ordered
constraint on the association even if the value attributes of the
EnumerationLiteral instances contain non-null values that might be
used to determine ordering. This is done to provide more flexible
An instance of Enumeration is also required to create a range data
type. Refer to the EnumerationLiteral class for details.
- CwmEnumeration class proxy object.
- Returns CwmEnumerationLiteral class proxy object.
EnumerationLiteral instances describe the enumeration identifiers, and
values, associated with an enumerated data type. Enumeration
identifiers are contained
in the name attribute derived from the EnumerationLiteral instance?s
EnumerationLiteral instances may also be used to define
expression-based values such as ranges. To do so, simply state the
membership expression in the instance?s value. For example, a range
literal can be created by setting the value attribute to "m..n", where
m represents the lower bound of the range, and n, the upper bound. In
this way, ranges and other more complicated expressions can be
intermixed with simple
enumeration literals. For example, an enumeration might contain the
literals "1", "2", "4..7", and "> 10".
Consequently, a simple range data type can be created with an
Enumeration instance that owns a single EnumerationLiteral instance.
For example, a data type for positive integers could be created as
shown in the following instance diagram. A model attribute of this
data type might then be declared as "posInt : PositiveInteger".
- CwmEnumerationLiteral class proxy object.
- Returns CwmQueryExpression class proxy object.
QueryExpression instances contain query statements in
- CwmQueryExpression class proxy object.
- Returns CwmTypeAlias class proxy object.
The TypeAlias class is intended to provide a renaming capability for
Classifier instances. This class is required to support situations in
which creation of an alias for a class effectively creates a new
class. For example, CORBA IDL type aliases have different typeCodes
than their base types and are therefore treated as distinct types.
- CwmTypeAlias class proxy object.
- Returns CwmUnion class proxy object.
The Union class represents programming language unions and similarly
structured data types. Because of the diversity of union semantics
found across software systems, the Union and UnionMember classes are
likely candidates for specialization to better capture union semantics
in specific language extension packages.
A discriminated Union has a collection of UnionMembers that determine
the sets of contents that the Union may contain. Such Unions have an
attribute called the discriminator that identifies the memberCase
value of the UnionMember that the Union currently contains. The
discriminator is found via the UnionDiscriminator association to
StructuralFeature. The discriminator may be embedded within
UnionMembers or may be located outside the discriminator. If it is
located within UnionMembers, the discriminator should occur in every
UnionMember at the same location (often, the first).
Undiscriminated unions (for example, a C language union) are also
supported, but have an empty discriminator reference, and the
memberCase attribute of the UnionMembers it contains is ignored.
Undiscriminated Unions are often used to represent alternate views of
a single physical
storage area. A fine degree of control over this aspect of Unions may
be obtained by
creating a class that derives from both UnionMember and
FixedOffsetField (in the
CWM Record package) and setting the offset attribute instances of that
- CwmUnion class proxy object.
- Returns CwmUnionMember class proxy object.
UnionMembers are described as features of a Union and each represents
one of the members of a Union. Note, however, that multiple case
values can map to a single UnionMember. If isDefault is true, the
union member is the default member.
UnionMember instances are allowed to have a memberCase and be the
default case. UnionMember instances often represent structured storage
areas. A particular UnionMember may be associated with a Classifier
that describes its internal structure via the StructuralFeatureType
association (defined in the ObjectModel::Core package). For example,
the Record::Group class, itself a Classifier, can be used as the type
of a UnionMember in a manner completely analogous to how it is used to
describe the type of a structured field (see the instance diagrams in
the Record metamodel chapter for details).
- CwmUnionMember class proxy object.
- Returns ClassifierAlias association proxy object.
The ClassifierAlias association connects TypeAlias instances with the
Classifier instances which they rename.
- ClassifierAlias association proxy object.
- Returns EnumerationLiterals association proxy object.
The EnumerationLiterals association links enumeration literals to the
Enumeration instances that contain them.
If the Enumeration?s isOrdered attribute is True, the ordering
constraint on the association is relevant. Otherwise, it is ignored.
- EnumerationLiterals association proxy object.
- Returns UnionDiscriminator association proxy object.
The UnionDiscriminator association connects a Union instance with the
StructuralFeature instance that can be used to determine which
UnionMember instance is currently present in the Union instance. This
"discriminating" attribute may be a feature of the UnionMembers
themselves or may be a feature of some Classifier that contains the
Union instance as one of its Features. In the former case, the
discriminating feature will usually be present at the same offset in
each UnionMember instance. If the discriminator reference is empty for
a particular Union instance, it is considered to be an
"undiscriminated" Union and determination of the current UnionMember
residing in the Union is usage-defined.
- UnionDiscriminator association proxy object.