AliasType | DataType with <<alias>> stereotype |
Association | Association |
AssociationEnd | AssociationEnd |
Attribute | Attribute |
Class | Class |
CollectionType | Class with <<collection>> stereotype |
Constant | DataValue |
Constraint | Constraint |
EnumerationType | Enumeration; Class or DataType with <<enumeration>> stereotype |
Exception | Exception; Class with <<exception>> stereotype |
Import | Dependency with <<import>> or <<clustering>> stereotype |
Operation | Operation |
Parameter (Operation) | Parameter |
Parameter (Exception) | Attribute |
Package | Model or Package, both with <<metamodel>> stereotype |
PrimitiveType | DataType |
Reference | Attribute with <<reference>> stereotype; AssociationEnd (if implicitReferences is set to true) |
StructureField | Attribute |
StructureType | Class with <<structure>> stereotype |
Tag | TaggedValue |
Detailed mapping of other features specific to each MOF class follows.Tags
Tag Value documentation any string Feature Map
MOF Feature UML name ModelElement.name annotation body of the first comment in ModelElement.comment; value of documentation tag container ModelElement.namespace constraints ModelElement.constraint UML Model Constraints
Every UML ModelElement that maps to MOF ModelElement must have a name.
OMG Profile
Lacking support for ModelElement.comment - mapping of annotation attribute fully relies on the documetation tag. However most of the UML tools store documentation for model elements in instances of Comment classes.
Tags
Tag Value org.netbeans.uml2mof.aliasFor fully qualified name (with individual simple names separated by ".") of a classifier from the same model Feature Map
MOF Feature UML type classifier that the fully qualified name in value of org.netbeans.uml2mof.aliasFor tag resolves to OMG Profile
Lacks definition of AliasType mapping as the standard profile is based on MOF 1.3.
Tags
Tag Value org.omg.uml2mof.isDerived true
orfalse
(default)Feature Map
MOF Feature UML isRoot isRoot isLeaf isLeaf isAbstract isAbstract visibility always set to public_vis
supertypes generalization.parent contents ownedElement, connection, taggedValue isDerived value of org.omg.uml2mof.isDerived tag Limitations
The order of contents reference are not fully preserved because UML has a separate associations for ownedElement and connection.
UML Model Constraints
An Association must have exactly two ends.
OMG Profile
There is no way how to map derived associations (isDerived tag is missing).
Tags
Tag Value Feature Map
MOF Feature UML type participant multiplicity lower and upper is determined by multiplicity.range, isOrdered is mapped to ordering (where true
corresponds toordered
) and isUnique maps always totrue
aggregation aggregation (UML aggregate matches MOF shared) isNavigable isNavigable isChangeable changeability ( changeable
maps to
true
)UML Model Constraints
An association must have exactly two ends.
UML changeability must be eitherchangeable
orfrozen
.
Multiplicity must have a single range.OMG Profile
There is a bug in the profile which states that MOF feature "type" is mapped to UML feature "type". However UML AssociationEnd does not have a reference called "type" - it uses "participant" reference for this purpose.
Tags
Tag Value org.omg.uml2mof.isDerived true
orfalse
(default)org.omg.uml2mof.isUnique true
orfalse
(default)Feature Map
MOF Feature UML multiplicity lower and upper are determined by multiplicity.range, isOrdered is mapped to ordering (where true
corresponds toordered
) and isUnique maps to org.omg.uml2mof.isUnique tag value.isChangeable changeability ( changeable
maps totrue
, otherwisefalse
)isDerived value of org.omg.uml2mof.isDerived tag
Tags
Tag Value org.omg.uml2mof.isSingleton true
orfalse
Feature Map
MOF Feature UML isRoot isRoot isLeaf isLeaf isAbstract isAbstract visibility always set to public_vis
supertypes generalization.parent singleton value of org.omg.uml2mof.isSingleton tag ( false
by default)contents ownedElement followed by feature (in order) and taggedValue Limitations
The order of contents reference is not fully preserved because UML has separate associations for features and other owned elements.
items
that determines the element type and
multiplicity of the collection.
Feature Map
MOF Feature UML multiplicity multiplicity of items
attributetype type of items
attributeUML Model Constraints
Class representing a collection must contain an attribute named
items
.OMG Profile
Lacks definition of CollectionType mapping as the standard profile is based on MOF 1.3.
Feature Map
MOF Feature UML labels list of names of literals contained by a corresponding UML enumeration or names of attributes if the enumeration is represented by UML class (attribute types, multiplicities, etc. are ignored) OMG Profile
Lacks definition of EnumerationType mapping as the standard profile is based on MOF 1.3.
Feature Map
MOF Feature UML contents feature, ownedElement, taggedValue scope always classifier_level
visibility always maps to public_vis
OMG Profile
Maps MOF Exception to UML Exception. UML Exception is however not supported in Class diagrams by most of the known UML tools.
Feature Map
MOF Feature UML container client importedNamespace supplier isClustered true
if this dependency is stereotyped as <<clustering>>,false
if stereotyped as <<import>>visibility always true
UML Model Constraints
Element on client end of the dependency must be a UML Package/Model mapped to a MOF Package.
OMG Profile
Maps MOF Import to UML ElementImport that is not supported by most of the known tools.
Tags
Tag Value org.netbeans.uml2mof.raisedExceptions Multiple values or one value containing comma-separated list of fully quialified names of classes corresponding to MOF Exceptions Feature Map
See Feature mapping for mapping of inherited features.
MOF Feature UML contents parameter, taggedValue isQuery isQuery exceptions Exceptions corresponding to the fully qualified names in values of org.netbeans.uml2mof.raisedExceptions tag scope Feature.ownerScope visibility always maps to public_vis
OMG Profile
Raised exceptions are supposed to be linked via raisedSignal reference (with no need for a separate tag for them). This reference is however not supported by most of the tools.
Tags
Tag Value org.omg.uml2mof.multiplicity upper and lower multiplicity bound of the paramter values separated by two dots ("..") - e.g. 1..1 (default) or 0..* (zero to many) org.omg.uml2mof.isOrdered true
orfalse
(default)org.omg.uml2mof.isUnique true
orfalse
(default)Feature Map
MOF Feature UML direction kind for operation parameters, out_dir
for exception parametersmultiplicity lower and upper are mapped to multiplicity.range, however if the org.omg.uml2mof.multiplicity tag is present, it takes the precedence, isOrdered is mapped to ordering (for Exception parameters) or value of org.omg.uml2mof.isOrdered tag (for Operation parameters), isUnique is mapped to the value of org.omg.uml2mof.isUnique tag type type OMG Profile
Introduces a new tag for multiplicity although both UML Attribute and UML Parameter have multiplicity parameter for that purpose. This tag is preserved as some UML tools do not support multiplicity on Parameters, so both the tag and the multiplicity attribute are taken into account by this profile, the tag value takes the precedence.
In case of UML Exception neither special tag for isOrdered is needed as this is provided by ordering attribute.
Tags
Tag Value org.omg.uml2mof.hasImplicitReferences true
(default) orfalse
Feature Map
MOF Feature UML container namespace or null
if the namespace is eithernull
or not mapped to a MOF Packagecontents ownedElement, taggedValue isRoot isRoot isLeaf isLeaf isAbstract isAbstract visibility always set to public_vis
supertypes other packages on supplier end of UML dependencies stereotyped as <<subtyping>> that binds them to this package. Limitations
The order of contents are not fully preserved when rendered using the profile as UML has separate associations for ownedElement and taggedValue.
UML Model Constraints
UML Model/Package representing a nested MOF Package must not have a tag of org.omg.uml2mof.hasImplicitReferences.
OMG Profile
While the standard profile allows MOF Packages to be represented by UML Models only, UML Models are not supported by some existing UML tools. Also org.omg.uml2mof.clusteredImport tag is introduced for clustered imports declarations. This profile solves clustered imports differently (see Import mapping).
Package subtyping is handled by a standard generalization.parent reference which was replaced in this mapping by a stereotyped dependency as package subtyping is not supported by most of the known UML tools.
Limitations
Modeling of primitive types distinct from the MOF standard primitive types (defined in PrimitiveTypes package) but with the same name is not supported by this profile.
OMG Profile
Lacks definition of PrimitiveType mapping as the standard profile is based on MOF 1.3.
false
, then a MOF Reference is implied by each
eligible UML AssociationEnd. An end is considered eligible if it is
navigable, there is no explicit MOF Reference for that end within
the same outermost package and the end's association is owned by the
same package that owns its opposite end's type (to not create
circular package dependencies).
Tags
Tag Value org.omg.uml2mof.referencedEnd fully qualified name of an association end Feature Map
MOF Feature UML scope always maps to instance_level
visibility always maps to public_vis
refenrecedEnd AssociationEnd corresponding to the fully qualified name in the value of org.omg.uml2mof.referencedEnd tag. Values for the inherited attributes of multiplicity, isChangeable and type are fully infered from the corresponding association end (values of these attributes for the corresponding UML Reference are ignored).
In case of implicit references, name and annotation are also taken from the association end.
Tags
None.
Feature Map
MOF Feature UML type type Please note that StructureField does not have a multiplicity attribute, thus multiplicity specified on the corresponding UML attribute is ignored when mapping from UML to MOF.
OMG Profile
Lacks definition of StructureField mapping as the standard profile is based on MOF 1.3.
Feature Map
MOF Feature UML contents Namespace.ownedElement followed by Classifier.feature (in order) OMG Profile
Lacks definition of StructureType mapping as the standard profile is based on MOF 1.3.
Feature Map
MOF Feature UML tagId name values value elements modelElement Limitations
Tags without prefix or with org.omg.uml2mof and org.netbeans.uml2mof prefixes are ignored when mapping from UML to MOF and thus they should not be used in MOF metamodels.