uk.ac.ucl.cs.uml.jmi.impl
Class UML_PackageImpl
java.lang.Object
uk.ac.ucl.cs.emofocl.jmi.reflect.RefBaseObjectImpl
uk.ac.ucl.cs.emofocl.jmi.reflect.RefPackageImpl
uk.ac.ucl.cs.emofocl.jmi.reflect.extended.ExtPackageImpl
uk.ac.ucl.cs.uml.jmi.impl.UML_PackageImpl
- All Implemented Interfaces:
- javax.jmi.reflect.RefBaseObject, javax.jmi.reflect.RefPackage, ExtClassExtentListener, ExtPackage, ExtPackageListener, UMLPackage
public class UML_PackageImpl
- extends ExtPackageImpl
- implements UMLPackage
This is a translation of the human readable UML 1.5 specification published
by the OMG as document formal/03-02-04 into an EMOF/OCL specification with
embedded documentation.
Various details of the original specification have been corrected or modified
to accomodate the use of EMOF and OCL2. In particular, the OCL constraints
and side-effect free operations have been corrected in some cases to respect
the more formal syntax of OCL2, and, where semantic errors have been made, the
intent documented in natural language in the original specification. In all
cases the original formulation of the OCL is preserved as a comment for
comparison purposes.
The major consequence of moving from a MOF 1.2/UML meta-modelling formalism to
EMOF is that association classes are not supported by EMOF. Several options
are possible to handle this.
1. Association classes can be omitted, except where they are associated with
an optional or 1..1 relationship, in which case the attributes of the
association class may be merged into the many type, in the case of optional
relationships, or either type in the case of 1..1 relationships, assuming in
either case that there is no name clash with pre-existing attributes or other
merged attributes.
2. Association classes can be replaced with normal classes serving as proxies.
The association is modelled as two association between the original participants
via the proxy class.
The former approach is taken in this specification, as, although less
expressive, it is more usually compatible with external tools for XMI
serialisation.
The following association classes are affected:
::Foundation::Core::ElementOwnership -
merged with ::Foundation::Core::ModelElement
::Foundation::Core::TemplateParameter -
merged with ::Foundation::Core::ModelElement
::Foundation::Core::ElementResidence -
omitted
::"Model Management"::ElementImport -
omitted
Constraints referring to these types and their attributes are rewritten or
omitted as appropriate.
Methods inherited from class uk.ac.ucl.cs.emofocl.jmi.reflect.RefPackageImpl |
refAllAssociations, refAllClasses, refAllPackages, refAssociation, refAssociation, refClass, refClass, refCreateStruct, refCreateStruct, refDelete, refGetEnum, refPackage, refPackage |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, 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, refPackage, refPackage |
Methods inherited from interface javax.jmi.reflect.RefBaseObject |
equals, hashCode, refImmediatePackage, refMetaObject, refMofId, refOutermostPackage |
UML_PackageImpl
public UML_PackageImpl(javax.jmi.reflect.RefObject metaObject)
UML_PackageImpl
public UML_PackageImpl(RefPackageImpl immediatePackage,
javax.jmi.reflect.RefObject metaObject)
getFoundation
public FoundationPackage getFoundation()
- Specified by:
getFoundation
in interface UMLPackage
getModelManagement
public ModelManagementPackage getModelManagement()
- Specified by:
getModelManagement
in interface UMLPackage
getBehavioralElements
public BehavioralElementsPackage getBehavioralElements()
- Specified by:
getBehavioralElements
in interface UMLPackage
refGetEnum
public javax.jmi.reflect.RefEnum refGetEnum(String enumName,
String name)
- Specified by:
refGetEnum
in interface javax.jmi.reflect.RefPackage
listenToExtent
protected void listenToExtent()
- Specified by:
listenToExtent
in class ExtPackageImpl
extWriteToXMI
public void extWriteToXMI(Element parent)
- Specified by:
extWriteToXMI
in interface ExtPackage
refVerifyConstraints
public Collection refVerifyConstraints(boolean deepVerify)
- Specified by:
refVerifyConstraints
in interface javax.jmi.reflect.RefBaseObject