- All Superinterfaces:
- RefBaseObject, RefPackage
- All Known Implementing Classes:
public interface InstancePackage
- extends RefPackage
Instance package interface.
The Instance metamodel depends on the following package:
In addition to the metadata normally interchanged with CWM, it is
sometimes useful to interchange specific data instances as well. The
ObjectModel?s Instance metamodel allows the inclusion of data instances
with the metadata.
OCL Representation of Instance Constraints
[C-6-1] A DataValue originates from a Classifier that is a DataType.
context DataValue inv:
[C-6-2] A DataValue has no Slots.
context DataValue inv:
[C-6-3] An Object may only own Objects and DataValues.
context Object inv:
self.contents->forAll(c | c.oclIsKindOf(Object) or
[C-6-4] If an Object represents an association, at least two of its ends
must be not be empty.
context Object inv:
self.slot.feature->iterate( ae ; cnt : Integer = 0 |
if ae.oclIsKindOf(AssociationEnd) and ae.value.notEmpty then
cnt + 1
end if ) > 1
[C-6-5] If the StructuralFeature describing a Slot is an AssociationEnd,
the Classifier associated with the Object owning the Slot must be an
context Slot inv:
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 CwmInstance class proxy object.
The instance construct defines an entity to which a set of operations
can be applied and which has a state that stores the effects of the
operations. In the metamodel Instance is connected to a Classifier
that declares its structure and behavior. It has a set of attribute
values matching the definition of its Classifier. The set of attribute
values implements the current state of the Instance. Because Instance
is an abstract class, all Instances are either Object or DataValue
The data content of an Instance comprises one value for each attribute
in its full descriptor (and nothing more). The value must be
consistent with the type of the attribute. An instance must obey any
constraints on the full descriptor of the Classifier
of which it is an instance (including both explicit constraints and
built-in constraints such as multiplicity).
- CwmInstance class proxy object.
- Returns CwmSlot class proxy object.
A slot is a named location in an Object instance that holds the
current value of the StructuralFeature associated with the Slot
instance. Normally, the StructuralFeature associated with the slot
will be either an Attribute instance or an AssociationEnd instance.
Slots are owned by Objects; DataValues do not have slots.
- CwmSlot class proxy object.
- Returns CwmDataValue class proxy object.
A data value is an instance with no identity. In the metamodel,
DataValue is a child of Instance that cannot change its state, i.e.
all operations that are applicable to it are pure functions or queries
that do not cause any side effects. DataValues are typically used
as attribute values.
Since it is not possible to differentiate between two data values that
appear to be the same, it becomes more of a philosophical issue
whether there are several data values representing the same value or
just one for each value. In addition, a data value cannot change its
data type and it does not have contained instances.
- CwmDataValue class proxy object.
- Returns CwmObject class proxy object.
An object is an instance that originates from a class.
In the metamodel, Object is a subclass of Instance originating from a
Class. The Class may be modified dynamically, which means that the set
of features of the Object may change during its life-time.
An object is an instance that originates from a class; it is
structured and behaves according to its class. All objects originating
from the same class are structured in the same way, although each of
them has its own set of attribute slots. Each attribute slot
references an instance, usually a data value or possibly, another
object. The number of attribute slots with the same name fulfills the
multiplicity of the corresponding attribute in the class. The set may
be modified according to the specification in the corresponding
attribute, e.g. each referenced instance must originate from (a
specialization of) the type of the attribute, and attribute slots may
be added or removed according to the changeable property of the
- CwmObject class proxy object.
- Returns CwmExtent class proxy object.
Each instance of Extent owns a collection of instances and is used to
link such collections to their structural and behavioral definitions
in CWM Resource packages. Because Extent is a subclass of package, it
owns member instances via the
- CwmExtent class proxy object.
- Returns SlotValue association proxy object.
The SlotValue association connects slot instances with the DataValue
or Object instance that contains the current value held by the slot.
- SlotValue association proxy object.
- Returns InstanceClassifier association proxy object.
The InstanceClassifier association links Instances with Classifiers
that describe them.
- InstanceClassifier association proxy object.
- Returns ObjectSlot association proxy object.
The ObjectSlot association connects Slot instances with their owning
- ObjectSlot association proxy object.
- Returns FeatureSlot association proxy object.
The FeatureSlot association connects Slot instances with the
StructuralFeature instance (usually either an Attribute or
AssociationEnd instance) describing the structure of the value held by
- FeatureSlot association proxy object.