net.sf.farrago.cwm.instance
Interface InstancePackage

All Superinterfaces:
RefBaseObject, RefPackage
All Known Implementing Classes:
InstancePackage$Hib

public interface InstancePackage
extends RefPackage

Instance package interface. The Instance metamodel depends on the following package: org.omg::CWM::ObjectModel::Core 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 Constraints [C-6-1] A DataValue originates from a Classifier that is a DataType. context DataValue inv: self.classifier.oclIsKindOf(DataType) [C-6-2] A DataValue has no Slots. context DataValue inv: self.valueSlot->isEmpty [C-6-3] An Object may only own Objects and DataValues. context Object inv: self.contents->forAll(c | c.oclIsKindOf(Object) or c.oclIsKindOf(DataValue)) [C-6-4] If an Object represents an association, at least two of its ends must be not be empty. context Object inv: self.classifier.oclIsKindOf(Association) implies self.slot.feature->iterate( ae ; cnt : Integer = 0 | if ae.oclIsKindOf(AssociationEnd) and ae.value.notEmpty then cnt + 1 else cnt 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 Association. context Slot inv: self.feature.oclIsKindOf(AssociationEnd) implies self.value.classifier.oclIsKindOf(Association)

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.


Method Summary
 CwmDataValueClass getCwmDataValue()
          Returns CwmDataValue class proxy object.
 CwmExtentClass getCwmExtent()
          Returns CwmExtent class proxy object.
 CwmInstanceClass getCwmInstance()
          Returns CwmInstance class proxy object.
 CwmObjectClass getCwmObject()
          Returns CwmObject class proxy object.
 CwmSlotClass getCwmSlot()
          Returns CwmSlot class proxy object.
 FeatureSlot getFeatureSlot()
          Returns FeatureSlot association proxy object.
 InstanceClassifier getInstanceClassifier()
          Returns InstanceClassifier association proxy object.
 ObjectSlot getObjectSlot()
          Returns ObjectSlot association proxy object.
 SlotValue getSlotValue()
          Returns SlotValue association proxy object.
 
Methods inherited from interface javax.jmi.reflect.RefPackage
refAllAssociations, refAllClasses, refAllPackages, refAssociation, refAssociation, refClass, refClass, refCreateStruct, refCreateStruct, refDelete, refGetEnum, refGetEnum, refPackage, refPackage
 
Methods inherited from interface javax.jmi.reflect.RefBaseObject
equals, hashCode, refImmediatePackage, refMetaObject, refMofId, refOutermostPackage, refVerifyConstraints
 

Method Detail

getCwmInstance

CwmInstanceClass getCwmInstance()
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 instances. 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).

Returns:
CwmInstance class proxy object.

getCwmSlot

CwmSlotClass getCwmSlot()
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.

Returns:
CwmSlot class proxy object.

getCwmDataValue

CwmDataValueClass getCwmDataValue()
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.

Returns:
CwmDataValue class proxy object.

getCwmObject

CwmObjectClass getCwmObject()
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 attribute.

Returns:
CwmObject class proxy object.

getCwmExtent

CwmExtentClass getCwmExtent()
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 ElementOwnership associaton.

Returns:
CwmExtent class proxy object.

getSlotValue

SlotValue getSlotValue()
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.

Returns:
SlotValue association proxy object.

getInstanceClassifier

InstanceClassifier getInstanceClassifier()
Returns InstanceClassifier association proxy object. The InstanceClassifier association links Instances with Classifiers that describe them.

Returns:
InstanceClassifier association proxy object.

getObjectSlot

ObjectSlot getObjectSlot()
Returns ObjectSlot association proxy object. The ObjectSlot association connects Slot instances with their owning Object instances.

Returns:
ObjectSlot association proxy object.

getFeatureSlot

FeatureSlot getFeatureSlot()
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 the Slot.

Returns:
FeatureSlot association proxy object.