Class InstancePackage$Hib

  extended by org.eigenbase.enki.jmi.impl.RefBaseObjectBase
      extended by org.eigenbase.enki.jmi.impl.RefPackageBase
          extended by org.eigenbase.enki.hibernate.jmi.HibernateRefPackage
              extended by net.sf.farrago.cwm.instance.InstancePackage$Hib
All Implemented Interfaces:
RefBaseObject, RefPackage, InstancePackage

public class InstancePackage$Hib
extends HibernateRefPackage
implements InstancePackage

Instance package implementation. 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.

Field Summary
private  CwmDataValueClass cwmDataValueClass
private  CwmExtentClass cwmExtentClass
private  CwmInstanceClass cwmInstanceClass
private  CwmObjectClass cwmObjectClass
private  CwmSlotClass cwmSlotClass
private  FeatureSlot featureSlot
private  InstanceClassifier instanceClassifier
private  ObjectSlot objectSlot
private  SlotValue slotValue
Constructor Summary
InstancePackage$Hib(RefPackage container)
Method Summary
 void addAliasPackages()
protected  void checkConstraints(List<JmiException> errors, boolean deepVerify)
 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 class org.eigenbase.enki.hibernate.jmi.HibernateRefPackage
getHibernateRepository, refDelete
Methods inherited from class org.eigenbase.enki.jmi.impl.RefPackageBase
addAssociation, addClass, addPackage, getRepository, refAllAssociations, refAllClasses, refAllPackages, refAssociation, refAssociation, refClass, refClass, refCreateStruct, refCreateStruct, refGetEnum, refGetEnum, refImmediatePackage, refPackage, refPackage
Methods inherited from class org.eigenbase.enki.jmi.impl.RefBaseObjectBase
createInstance, equals, getCurrentInitializer, getEnum, getInitializer, getMofId, getTag, hashCode, invokeMethod, invokeMethod, logJmi, refMetaObject, refMofId, refOutermostPackage, refVerifyConstraints, setMofId, setRefMetaObject
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
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

Field Detail


private final CwmInstanceClass cwmInstanceClass


private final CwmSlotClass cwmSlotClass


private final CwmDataValueClass cwmDataValueClass


private final CwmObjectClass cwmObjectClass


private final CwmExtentClass cwmExtentClass


private final SlotValue slotValue


private final InstanceClassifier instanceClassifier


private final ObjectSlot objectSlot


private final FeatureSlot featureSlot
Constructor Detail


public InstancePackage$Hib(RefPackage container)
Method Detail


public void addAliasPackages()
addAliasPackages in class RefPackageBase


public CwmInstanceClass getCwmInstance()
Description copied from interface: InstancePackage
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).

Specified by:
getCwmInstance in interface InstancePackage
CwmInstance class proxy object.


public CwmSlotClass getCwmSlot()
Description copied from interface: InstancePackage
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.

Specified by:
getCwmSlot in interface InstancePackage
CwmSlot class proxy object.


public CwmDataValueClass getCwmDataValue()
Description copied from interface: InstancePackage
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.

Specified by:
getCwmDataValue in interface InstancePackage
CwmDataValue class proxy object.


public CwmObjectClass getCwmObject()
Description copied from interface: InstancePackage
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.

Specified by:
getCwmObject in interface InstancePackage
CwmObject class proxy object.


public CwmExtentClass getCwmExtent()
Description copied from interface: InstancePackage
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.

Specified by:
getCwmExtent in interface InstancePackage
CwmExtent class proxy object.


public SlotValue getSlotValue()
Description copied from interface: InstancePackage
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.

Specified by:
getSlotValue in interface InstancePackage
SlotValue association proxy object.


public InstanceClassifier getInstanceClassifier()
Description copied from interface: InstancePackage
Returns InstanceClassifier association proxy object. The InstanceClassifier association links Instances with Classifiers that describe them.

Specified by:
getInstanceClassifier in interface InstancePackage
InstanceClassifier association proxy object.


public ObjectSlot getObjectSlot()
Description copied from interface: InstancePackage
Returns ObjectSlot association proxy object. The ObjectSlot association connects Slot instances with their owning Object instances.

Specified by:
getObjectSlot in interface InstancePackage
ObjectSlot association proxy object.


public FeatureSlot getFeatureSlot()
Description copied from interface: InstancePackage
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.

Specified by:
getFeatureSlot in interface InstancePackage
FeatureSlot association proxy object.


protected void checkConstraints(List<JmiException> errors,
                                boolean deepVerify)
Specified by:
checkConstraints in class RefBaseObjectBase