Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » errors while metamodeling
errors while metamodeling [message #475140] Mon, 20 August 2007 11:56 Go to next message
Manar El-Kady is currently offline Manar El-KadyFriend
Messages: 78
Registered: July 2009
Member
Hi,

I build a metamodel as a heavyweight extension.I do the following steps:
- create an empty UML model
- convert the model to a metamodel
- apply the ecore profile, and then apply the epackage stereotype to the
root model element
- add some elements for the metamodel
- merge the primitive types package
- add the infrastructure.uml as a resource to my metamodel (Note: I
added it by using the editor. I added it from a project in my workspace
that containing
platform:/resource/org.eclipse.uml2.source\src\org.eclipse.u ml2.uml_2.1.0.v200706141134\model\Infrastructure.uml)
- While creating the elements of the metamodels I extended classes from
the subpackages of the Abstractions package. So, I imported the packages
that containing the classes which I extend.
- finally I apply the package merge, and convert it again to a metamodel.

My questions are:
- After these steps I did a validation, and an error occur " Not all the
members of a namespace'<<metamodel, ePackage>> <Model> MAS-UML' are
distinguishable within it." ??

- I tried to do these steps without doing package import and I didn't
notice any difference or errors happened. so, what is the need for doing
a package import in a metamodeling?

- After creating the metamodel I create an EMF project for code
generation. Here, I obligated to generate code for the
infrastructureLibrary package, which I didn't need. Why that?

- After the code generation, there are some errors in the generated code
for the infrastructureLibrary package and for my metamodel code. all the
errors in the impl files and said that xxx cannot be resolved??


Sorry for this long mail, and thanks in advance.

Manar










I applied the epackage
stereotype to the root element, merged the primitive types package, and
import some sub-packaged from the the Abstractions package
Re: errors while metamodeling [message #475141 is a reply to message #475140] Mon, 20 August 2007 12:20 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------000504070401020309090206
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Manar,

Comments below.


Manar El-Kady wrote:
> Hi,
>
> I build a metamodel as a heavyweight extension.I do the following steps:
> - create an empty UML model
> - convert the model to a metamodel
> - apply the ecore profile, and then apply the epackage stereotype to the
> root model element
> - add some elements for the metamodel
> - merge the primitive types package
> - add the infrastructure.uml as a resource to my metamodel (Note: I
> added it by using the editor. I added it from a project in my
> workspace that containing
> platform:/resource/org.eclipse.uml2.source\src\org.eclipse.u ml2.uml_2.1.0.v200706141134\model\Infrastructure.uml)
>
I think you should have loaded it using

platform:/plugin/org.eclipse.uml2.uml/model/Infrastructure.u ml

Don't ever use "\" in a URI since it's treated as just an ordinary
character like "_" not like "/".
> - While creating the elements of the metamodels I extended classes
> from the subpackages of the Abstractions package. So, I imported the
> packages that containing the classes which I extend.
> - finally I apply the package merge, and convert it again to a metamodel.
>
> My questions are:
> - After these steps I did a validation, and an error occur " Not all
> the members of a namespace'<<metamodel, ePackage>> <Model> MAS-UML'
> are distinguishable within it." ??
I'm not sure, but it sounds like you have multiple versions of the same
model, which could be caused by the problem above where you load the
model with one URI, there are other references to this model using a
different URI.
>
> - I tried to do these steps without doing package import and I didn't
> notice any difference or errors happened. so, what is the need for
> doing a package import in a metamodeling?
>
> - After creating the metamodel I create an EMF project for code
> generation. Here, I obligated to generate code for the
> infrastructureLibrary package, which I didn't need. Why that?
In the final step of the wizard, you need to specify a GenModel for any
packages that already exist and you don't want to generate yourself but
rather want to reuse an existing generated model.
>
> - After the code generation, there are some errors in the generated
> code for the infrastructureLibrary package and for my metamodel code.
> all the errors in the impl files and said that xxx cannot be resolved??
I'm sure you'll need to specify a dependency on the UML2 model in the
final step of the wizard if you are trying to extend that model. Note
that once the plugin.xml and MANIFEST.MF exist, they won't be
regenerated unless you delete them, so even fixing the problems above
won't fix these files unless you delete them before you generate.
>
>
> Sorry for this long mail, and thanks in advance.
>
> Manar
>
>
>
>
>
>
>
>
>
>
> I applied the epackage
> stereotype to the root element, merged the primitive types package, and
> import some sub-packaged from the the Abstractions package
>


--------------000504070401020309090206
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Manar,<br>
<br>
Comments below. <br>
<br>
<br>
Manar El-Kady wrote:
<blockquote cite="mid:fabvhl$k6f$1@build.eclipse.org" type="cite">Hi,
<br>
<br>
I build a metamodel as a heavyweight extension.I do the following
steps:
<br>
- create an empty UML model
<br>
- convert the model to a metamodel
<br>
- apply the ecore profile, and then apply the epackage stereotype to
the
<br>
root model element
<br>
- add some elements for the metamodel
<br>
- merge the primitive types package
<br>
- add the infrastructure.uml as a resource to my metamodel (Note: I
added it by using the editor. I added it from a project in my workspace
that containing
platform:/resource/org.eclipse.uml2.source\src\org.eclipse.u ml2.uml_2.1.0.v200706141134\model\Infrastructure.uml)
<br>
</blockquote>
I think you should have loaded it using<br>
<blockquote> platform:/plugin/org.eclipse.uml2.uml/model/Infrastructure.u ml <br>
</blockquote>
Don't ever use "\" in a URI since it's treated as just an ordinary
character like "_" not like "/".<br>
<blockquote cite="mid:fabvhl$k6f$1@build.eclipse.org" type="cite">-
While creating the elements of the metamodels I extended classes from
the subpackages of the Abstractions package. So, I imported the
packages that containing the classes which I extend.
<br>
- finally I apply the package merge, and convert it again to a
metamodel.
<br>
<br>
My questions are:
<br>
- After these steps I did a validation, and an error occur " Not all
the members of a namespace'&lt;&lt;metamodel, ePackage&gt;&gt;
&lt;Model&gt; MAS-UML' are distinguishable within it." ??
<br>
</blockquote>
I'm not sure, but it sounds like you have multiple versions of the same
model, which could be caused by the problem above where you load the
model with one URI, there are other references to this model using a
different URI.<br>
<blockquote cite="mid:fabvhl$k6f$1@build.eclipse.org" type="cite"><br>
- I tried to do these steps without doing package import and I didn't
notice any difference or errors happened. so, what is the need for
doing a package import in a metamodeling?
<br>
<br>
- After creating the metamodel I create an EMF project for code
generation. Here, I obligated to generate code for the
infrastructureLibrary package, which I didn't need. Why that?
<br>
</blockquote>
In the final step of the wizard, you need to specify a GenModel for any
packages that already exist and you don't want to generate yourself but
rather want to reuse an existing generated model.<br>
<blockquote cite="mid:fabvhl$k6f$1@build.eclipse.org" type="cite"><br>
- After the code generation, there are some errors in the generated
code for the infrastructureLibrary package and for my metamodel code.
all the errors in the impl files and said that xxx cannot be resolved??
<br>
</blockquote>
I'm sure you'll need to specify a dependency on the UML2 model in the
final step of the wizard if you are trying to extend that model.&nbsp; Note
that once the plugin.xml and MANIFEST.MF exist, they won't be
regenerated unless you delete them, so even fixing the problems above
won't fix these files unless you delete them before you generate.<br>
<blockquote cite="mid:fabvhl$k6f$1@build.eclipse.org" type="cite"><br>
<br>
Sorry for this long mail, and thanks in advance.
<br>
<br>
Manar
<br>
<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
I applied the epackage
<br>
stereotype to the root element, merged the primitive types package, and
<br>
import some sub-packaged from the the Abstractions package
<br>
<br>
</blockquote>
<br>
</body>
</html>

--------------000504070401020309090206--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: errors while metamodeling [message #475142 is a reply to message #475141] Mon, 20 August 2007 13:51 Go to previous messageGo to next message
Manar El-Kady is currently offline Manar El-KadyFriend
Messages: 78
Registered: July 2009
Member
Ed Merks wrote:
> Manar,
>
> Comments below.
>
>
> Manar El-Kady wrote:
>> Hi,
>>
>> I build a metamodel as a heavyweight extension.I do the following steps:
>> - create an empty UML model
>> - convert the model to a metamodel
>> - apply the ecore profile, and then apply the epackage stereotype to the
>> root model element
>> - add some elements for the metamodel
>> - merge the primitive types package
>> - add the infrastructure.uml as a resource to my metamodel (Note: I
>> added it by using the editor. I added it from a project in my
>> workspace that containing
>> platform:/resource/org.eclipse.uml2.source\src\org.eclipse.u ml2.uml_2.1.0.v200706141134\model\Infrastructure.uml)
>>
> I think you should have loaded it using
>
> platform:/plugin/org.eclipse.uml2.uml/model/Infrastructure.u ml
>

I did it but an error file not found raised

I tried to add "/" after "platform:/" and the error
" platform:/plugin/org.eclipse.uml2.uml/model/Infrastructure.u ml " showed

I tried to add the name of the jar file that exist in my plugin folder
" platform:/plugin/org.eclipse.uml2.uml_2.1.0.v200706141134/mo del/Infrastructure.uml ",
then a file not found error raised??


> Don't ever use "\" in a URI since it's treated as just an ordinary
> character like "_" not like "/".
>> - While creating the elements of the metamodels I extended classes
>> from the subpackages of the Abstractions package. So, I imported the
>> packages that containing the classes which I extend.
>> - finally I apply the package merge, and convert it again to a metamodel.
>>
>> My questions are:
>> - After these steps I did a validation, and an error occur " Not all
>> the members of a namespace'<<metamodel, ePackage>> <Model> MAS-UML'
>> are distinguishable within it." ??
> I'm not sure, but it sounds like you have multiple versions of the same
> model, which could be caused by the problem above where you load the
> model with one URI, there are other references to this model using a
> different URI.
>>
>> - I tried to do these steps without doing package import and I didn't
>> notice any difference or errors happened. so, what is the need for
>> doing a package import in a metamodeling?
>>
>> - After creating the metamodel I create an EMF project for code
>> generation. Here, I obligated to generate code for the
>> infrastructureLibrary package, which I didn't need. Why that?
> In the final step of the wizard, you need to specify a GenModel for any
> packages that already exist and you don't want to generate yourself but
> rather want to reuse an existing generated model.
>>
>> - After the code generation, there are some errors in the generated
>> code for the infrastructureLibrary package and for my metamodel code.
>> all the errors in the impl files and said that xxx cannot be resolved??
> I'm sure you'll need to specify a dependency on the UML2 model in the
> final step of the wizard if you are trying to extend that model. Note
> that once the plugin.xml and MANIFEST.MF exist, they won't be
> regenerated unless you delete them, so even fixing the problems above
> won't fix these files unless you delete them before you generate.
>>
>>
>> Sorry for this long mail, and thanks in advance.
>>
>> Manar
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
Re: errors while metamodeling [message #475143 is a reply to message #475142] Mon, 20 August 2007 14:08 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------060109010005040605060000
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Manar,

I see. The build.properties doesn't include them in the binary plugin,
so I suppose the way you did it is the only way

bin.includes = about.html,\
plugin.*,\
.,\
model/*.ecore,\
model/*.ecore2xml,\
model/*.genmodel,\
META-INF/
src.includes = about.html,\
model/*.ecore2ecore,\
* model/*.uml,\*
templates/
exclude.. = **/doc-files/**
javacSource = 1.5
javacTarget = 1.5

I get those same warnings when I validate the instance I have directly
from CVS, so I suppose those warnings are something to ignore.

That still leaves your other questions unanswered, so someone with UML2
expertise will need to answer those. Definitely change your "\" to "/"
though or you're likely to have problems.


Manar El-Kady wrote:
>
> Ed Merks wrote:
>> Manar,
>>
>> Comments below.
>>
>>
>> Manar El-Kady wrote:
>>> Hi,
>>>
>>> I build a metamodel as a heavyweight extension.I do the following
>>> steps:
>>> - create an empty UML model
>>> - convert the model to a metamodel
>>> - apply the ecore profile, and then apply the epackage stereotype to
>>> the
>>> root model element
>>> - add some elements for the metamodel
>>> - merge the primitive types package
>>> - add the infrastructure.uml as a resource to my metamodel (Note: I
>>> added it by using the editor. I added it from a project in my
>>> workspace that containing
>>> platform:/resource/org.eclipse.uml2.source\src\org.eclipse.u ml2.uml_2.1.0.v200706141134\model\Infrastructure.uml)
>>>
>> I think you should have loaded it using
>>
>> platform:/plugin/org.eclipse.uml2.uml/model/Infrastructure.u ml
>>
>
> I did it but an error file not found raised
>
> I tried to add "/" after "platform:/" and the error
> " platform:/plugin/org.eclipse.uml2.uml/model/Infrastructure.u ml " showed
>
> I tried to add the name of the jar file that exist in my plugin folder
> " platform:/plugin/org.eclipse.uml2.uml_2.1.0.v200706141134/mo del/Infrastructure.uml ",
> then a file not found error raised??
>
>
>> Don't ever use "\" in a URI since it's treated as just an ordinary
>> character like "_" not like "/".
>>> - While creating the elements of the metamodels I extended classes
>>> from the subpackages of the Abstractions package. So, I imported the
>>> packages that containing the classes which I extend.
>>> - finally I apply the package merge, and convert it again to a
>>> metamodel.
>>>
>>> My questions are:
>>> - After these steps I did a validation, and an error occur " Not all
>>> the members of a namespace'<<metamodel, ePackage>> <Model> MAS-UML'
>>> are distinguishable within it." ??
>> I'm not sure, but it sounds like you have multiple versions of the
>> same model, which could be caused by the problem above where you load
>> the model with one URI, there are other references to this model
>> using a different URI.
>>>
>>> - I tried to do these steps without doing package import and I
>>> didn't notice any difference or errors happened. so, what is the
>>> need for doing a package import in a metamodeling?
>>>
>>> - After creating the metamodel I create an EMF project for code
>>> generation. Here, I obligated to generate code for the
>>> infrastructureLibrary package, which I didn't need. Why that?
>> In the final step of the wizard, you need to specify a GenModel for
>> any packages that already exist and you don't want to generate
>> yourself but rather want to reuse an existing generated model.
>>>
>>> - After the code generation, there are some errors in the generated
>>> code for the infrastructureLibrary package and for my metamodel
>>> code. all the errors in the impl files and said that xxx cannot be
>>> resolved??
>> I'm sure you'll need to specify a dependency on the UML2 model in the
>> final step of the wizard if you are trying to extend that model.
>> Note that once the plugin.xml and MANIFEST.MF exist, they won't be
>> regenerated unless you delete them, so even fixing the problems above
>> won't fix these files unless you delete them before you generate.
>>>
>>>
>>> Sorry for this long mail, and thanks in advance.
>>>
>>> Manar
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>


--------------060109010005040605060000
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Manar,<br>
<br>
I see.&nbsp; The build.properties doesn't include them in the binary plugin,
so I suppose the way you did it is the only way<br>
<blockquote>bin.includes = about.html,\<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; plugin.*,\<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; .,\<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; model/*.ecore,\<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; model/*.ecore2xml,\<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; model/*.genmodel,\<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; META-INF/<br>
src.includes = about.html,\<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; model/*.ecore2ecore,\<br>
<b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; model/*.uml,\</b><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; templates/<br>
exclude.. = **/doc-files/**<br>
javacSource = 1.5<br>
javacTarget = 1.5<br>
</blockquote>
I get those same warnings when I validate the instance I have directly
from CVS, so I suppose those warnings are something to ignore.<br>
<br>
That still leaves your other questions unanswered, so someone with UML2
expertise will need to answer those.&nbsp; Definitely change your "\" to "/"
though or you're likely to have problems.<br>
<br>
<br>
Manar El-Kady wrote:
<blockquote cite="mid:fac69v$dcj$1@build.eclipse.org" type="cite"><br>
Ed Merks wrote:
<br>
<blockquote type="cite">Manar,
<br>
<br>
Comments below.
<br>
<br>
<br>
Manar El-Kady wrote:
<br>
<blockquote type="cite">Hi,
<br>
<br>
I build a metamodel as a heavyweight extension.I do the following
steps:
<br>
- create an empty UML model
<br>
- convert the model to a metamodel
<br>
- apply the ecore profile, and then apply the epackage stereotype to
the
<br>
root model element
<br>
- add some elements for the metamodel
<br>
- merge the primitive types package
<br>
- add the infrastructure.uml as a resource to my metamodel (Note: I
added it by using the editor. I added it from a project in my workspace
that containing
platform:/resource/org.eclipse.uml2.source\src\org.eclipse.u ml2.uml_2.1.0.v200706141134\model\Infrastructure.uml)
<br>
</blockquote>
I think you should have loaded it using
<br>
<br>
&nbsp;&nbsp;&nbsp; platform:/plugin/org.eclipse.uml2.uml/model/Infrastructure.u ml
<br>
<br>
</blockquote>
<br>
I did it but an error file not found raised
<br>
<br>
I tried to add "/" after "platform:/" and the error
" platform:/plugin/org.eclipse.uml2.uml/model/Infrastructure.u ml " showed
<br>
<br>
I tried to add the name of the jar file that exist in my plugin folder
" platform:/plugin/org.eclipse.uml2.uml_2.1.0.v200706141134/mo del/Infrastructure.uml ",
then a file not found error raised??
<br>
<br>
<br>
<blockquote type="cite">Don't ever use "\" in a URI since it's
treated as just an ordinary character like "_" not like "/".
<br>
<blockquote type="cite">- While creating the elements of the
metamodels I extended classes from the subpackages of the Abstractions
package. So, I imported the packages that containing the classes which
I extend.
<br>
- finally I apply the package merge, and convert it again to a
metamodel.
<br>
<br>
My questions are:
<br>
- After these steps I did a validation, and an error occur " Not all
the members of a namespace'&lt;&lt;metamodel, ePackage&gt;&gt;
&lt;Model&gt; MAS-UML' are distinguishable within it." ??
<br>
</blockquote>
I'm not sure, but it sounds like you have multiple versions of the same
model, which could be caused by the problem above where you load the
model with one URI, there are other references to this model using a
different URI.
<br>
<blockquote type="cite"><br>
- I tried to do these steps without doing package import and I didn't
notice any difference or errors happened. so, what is the need for
doing a package import in a metamodeling?
<br>
<br>
- After creating the metamodel I create an EMF project for code
generation. Here, I obligated to generate code for the
infrastructureLibrary package, which I didn't need. Why that?
<br>
</blockquote>
In the final step of the wizard, you need to specify a GenModel for any
packages that already exist and you don't want to generate yourself but
rather want to reuse an existing generated model.
<br>
<blockquote type="cite"><br>
- After the code generation, there are some errors in the generated
code for the infrastructureLibrary package and for my metamodel code.
all the errors in the impl files and said that xxx cannot be resolved??
<br>
</blockquote>
I'm sure you'll need to specify a dependency on the UML2 model in the
final step of the wizard if you are trying to extend that model.&nbsp; Note
that once the plugin.xml and MANIFEST.MF exist, they won't be
regenerated unless you delete them, so even fixing the problems above
won't fix these files unless you delete them before you generate.
<br>
<blockquote type="cite"><br>
<br>
Sorry for this long mail, and thanks in advance.
<br>
<br>
Manar
<br>
<br>
<br>
&nbsp;&nbsp;&nbsp; <br>
<br>
<br>
<br>
<br>
<br>
<br>
</blockquote>
</blockquote>
</blockquote>
<br>
</body>
</html>

--------------060109010005040605060000--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: errors while metamodeling [message #475205 is a reply to message #475140] Thu, 23 August 2007 13:52 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Manar,

Sorry for the delayed response. See answers below.

Kenn

"Manar El-Kady" <manar.elkady@gmail.com> wrote in message
news:fabvhl$k6f$1@build.eclipse.org...
> Hi,
>
> I build a metamodel as a heavyweight extension.I do the following steps:
> - create an empty UML model
> - convert the model to a metamodel
> - apply the ecore profile, and then apply the epackage stereotype to the
> root model element
> - add some elements for the metamodel
> - merge the primitive types package
> - add the infrastructure.uml as a resource to my metamodel (Note: I added
> it by using the editor. I added it from a project in my workspace that
> containing
> platform:/resource/org.eclipse.uml2.source\src\org.eclipse.u ml2.uml_2.1.0.v200706141134\model\Infrastructure.uml)
> - While creating the elements of the metamodels I extended classes from
> the subpackages of the Abstractions package. So, I imported the packages
> that containing the classes which I extend.
> - finally I apply the package merge, and convert it again to a metamodel.
>
> My questions are:
> - After these steps I did a validation, and an error occur " Not all the
> members of a namespace'<<metamodel, ePackage>> <Model> MAS-UML' are
> distinguishable within it." ??
>

These warnings can usually be ignored. I suspect it's complaining about the
primitive types, i.e. that names like 'Integer' exist both as owned members
in your merged package, and as members directly or indirecty imported from
another namespace. However, the package imports will be troublesome - see
below.

> - I tried to do these steps without doing package import and I didn't
> notice any difference or errors happened. so, what is the need for doing a
> package import in a metamodeling?
>

Strictly speaking, you don't _need_ package imports. Semantically, all they
do is allow you to refer to a named element without using its qualified
name. Is is, however, good practice to declare your dependencies this way...

> - After creating the metamodel I create an EMF project for code
> generation. Here, I obligated to generate code for the
> infrastructureLibrary package, which I didn't need. Why that?
>

Well, after a merge, you shouldn't have any lingering dependencies on other
packages such as ones in InfrastructureLibrary. Since UML2 does not provide
an implementation of InfrastructureLibrary on its own, you'll need to
implement it yourself. However, I would recommend _merging_ the packages
from Abstractions that contain the types you are extending rather than
importing them. That way, you will be implementing the types within your own
(heavyweight) namespace and the imports won't linger (and hence the
namespace warnings would go away).

> - After the code generation, there are some errors in the generated code
> for the infrastructureLibrary package and for my metamodel code. all the
> errors in the impl files and said that xxx cannot be resolved??
>

Without knowing more about the errors, it's hard to say how to fix them, but
I suspect that if you ensure that everything from UML that you need gets
merged into your domain, and that you reference existing implementations of
things that aren't in your domain, you'll be better off...

>
> Sorry for this long mail, and thanks in advance.
>
> Manar
>
>
>
>
>
>
>
>
>
>
> I applied the epackage
> stereotype to the root element, merged the primitive types package, and
> import some sub-packaged from the the Abstractions package
>
Re: errors while metamodeling [message #475214 is a reply to message #475205] Fri, 24 August 2007 09:59 Go to previous messageGo to next message
Manar El-Kady is currently offline Manar El-KadyFriend
Messages: 78
Registered: July 2009
Member
Kenn,

I did a package merge instead of a package import. Validation before
applying the package merge was done successfully. But, after applying
the package merge and validating the metamodel, the validation get the
same error as before.

While generating the code, still there is an obligation to generate code
for the abstractionLibrary package. Moreover, the generated code has
errors ?

Is there a mistake while referring to the InfrastructureLibrary package?
or what?


Thanks,
Manar


Kenn Hussey wrote:
> Manar,
>
> Sorry for the delayed response. See answers below.
>
> Kenn
>
> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
> news:fabvhl$k6f$1@build.eclipse.org...
>> Hi,
>>
>> I build a metamodel as a heavyweight extension.I do the following steps:
>> - create an empty UML model
>> - convert the model to a metamodel
>> - apply the ecore profile, and then apply the epackage stereotype to the
>> root model element
>> - add some elements for the metamodel
>> - merge the primitive types package
>> - add the infrastructure.uml as a resource to my metamodel (Note: I added
>> it by using the editor. I added it from a project in my workspace that
>> containing
>> platform:/resource/org.eclipse.uml2.source\src\org.eclipse.u ml2.uml_2.1.0.v200706141134\model\Infrastructure.uml)
>> - While creating the elements of the metamodels I extended classes from
>> the subpackages of the Abstractions package. So, I imported the packages
>> that containing the classes which I extend.
>> - finally I apply the package merge, and convert it again to a metamodel.
>>
>> My questions are:
>> - After these steps I did a validation, and an error occur " Not all the
>> members of a namespace'<<metamodel, ePackage>> <Model> MAS-UML' are
>> distinguishable within it." ??
>>
>
> These warnings can usually be ignored. I suspect it's complaining about the
> primitive types, i.e. that names like 'Integer' exist both as owned members
> in your merged package, and as members directly or indirecty imported from
> another namespace. However, the package imports will be troublesome - see
> below.
>
>> - I tried to do these steps without doing package import and I didn't
>> notice any difference or errors happened. so, what is the need for doing a
>> package import in a metamodeling?
>>
>
> Strictly speaking, you don't _need_ package imports. Semantically, all they
> do is allow you to refer to a named element without using its qualified
> name. Is is, however, good practice to declare your dependencies this way...
>
>> - After creating the metamodel I create an EMF project for code
>> generation. Here, I obligated to generate code for the
>> infrastructureLibrary package, which I didn't need. Why that?
>>
>
> Well, after a merge, you shouldn't have any lingering dependencies on other
> packages such as ones in InfrastructureLibrary. Since UML2 does not provide
> an implementation of InfrastructureLibrary on its own, you'll need to
> implement it yourself. However, I would recommend _merging_ the packages
> from Abstractions that contain the types you are extending rather than
> importing them. That way, you will be implementing the types within your own
> (heavyweight) namespace and the imports won't linger (and hence the
> namespace warnings would go away).
>
>> - After the code generation, there are some errors in the generated code
>> for the infrastructureLibrary package and for my metamodel code. all the
>> errors in the impl files and said that xxx cannot be resolved??
>>
>
> Without knowing more about the errors, it's hard to say how to fix them, but
> I suspect that if you ensure that everything from UML that you need gets
> merged into your domain, and that you reference existing implementations of
> things that aren't in your domain, you'll be better off...
>
>> Sorry for this long mail, and thanks in advance.
>>
>> Manar
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> I applied the epackage
>> stereotype to the root element, merged the primitive types package, and
>> import some sub-packaged from the the Abstractions package
>>
>
>
Re: errors while metamodeling [message #475216 is a reply to message #475214] Fri, 24 August 2007 12:55 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Manar,

Are you sure you are merging all packages from Abstractions that are
directly or indirectly referenced from elements in your domain (e.g. as
types, superclasses, etc.)?

Kenn

"Manar El-Kady" <manar.elkady@gmail.com> wrote in message
news:fama83$ahr$1@build.eclipse.org...
> Kenn,
>
> I did a package merge instead of a package import. Validation before
> applying the package merge was done successfully. But, after applying the
> package merge and validating the metamodel, the validation get the same
> error as before.
>
> While generating the code, still there is an obligation to generate code
> for the abstractionLibrary package. Moreover, the generated code has
> errors ?
>
> Is there a mistake while referring to the InfrastructureLibrary package?
> or what?
>
>
> Thanks,
> Manar
>
>
> Kenn Hussey wrote:
>> Manar,
>>
>> Sorry for the delayed response. See answers below.
>>
>> Kenn
>>
>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>> news:fabvhl$k6f$1@build.eclipse.org...
>>> Hi,
>>>
>>> I build a metamodel as a heavyweight extension.I do the following steps:
>>> - create an empty UML model
>>> - convert the model to a metamodel
>>> - apply the ecore profile, and then apply the epackage stereotype to the
>>> root model element
>>> - add some elements for the metamodel
>>> - merge the primitive types package
>>> - add the infrastructure.uml as a resource to my metamodel (Note: I
>>> added it by using the editor. I added it from a project in my workspace
>>> that containing
>>> platform:/resource/org.eclipse.uml2.source\src\org.eclipse.u ml2.uml_2.1.0.v200706141134\model\Infrastructure.uml)
>>> - While creating the elements of the metamodels I extended classes from
>>> the subpackages of the Abstractions package. So, I imported the packages
>>> that containing the classes which I extend.
>>> - finally I apply the package merge, and convert it again to a
>>> metamodel.
>>>
>>> My questions are:
>>> - After these steps I did a validation, and an error occur " Not all the
>>> members of a namespace'<<metamodel, ePackage>> <Model> MAS-UML' are
>>> distinguishable within it." ??
>>>
>>
>> These warnings can usually be ignored. I suspect it's complaining about
>> the primitive types, i.e. that names like 'Integer' exist both as owned
>> members in your merged package, and as members directly or indirecty
>> imported from another namespace. However, the package imports will be
>> troublesome - see below.
>>
>>> - I tried to do these steps without doing package import and I didn't
>>> notice any difference or errors happened. so, what is the need for doing
>>> a package import in a metamodeling?
>>>
>>
>> Strictly speaking, you don't _need_ package imports. Semantically, all
>> they do is allow you to refer to a named element without using its
>> qualified name. Is is, however, good practice to declare your
>> dependencies this way...
>>
>>> - After creating the metamodel I create an EMF project for code
>>> generation. Here, I obligated to generate code for the
>>> infrastructureLibrary package, which I didn't need. Why that?
>>>
>>
>> Well, after a merge, you shouldn't have any lingering dependencies on
>> other packages such as ones in InfrastructureLibrary. Since UML2 does not
>> provide an implementation of InfrastructureLibrary on its own, you'll
>> need to implement it yourself. However, I would recommend _merging_ the
>> packages from Abstractions that contain the types you are extending
>> rather than importing them. That way, you will be implementing the types
>> within your own (heavyweight) namespace and the imports won't linger (and
>> hence the namespace warnings would go away).
>>
>>> - After the code generation, there are some errors in the generated code
>>> for the infrastructureLibrary package and for my metamodel code. all the
>>> errors in the impl files and said that xxx cannot be resolved??
>>>
>>
>> Without knowing more about the errors, it's hard to say how to fix them,
>> but I suspect that if you ensure that everything from UML that you need
>> gets merged into your domain, and that you reference existing
>> implementations of things that aren't in your domain, you'll be better
>> off...
>>
>>> Sorry for this long mail, and thanks in advance.
>>>
>>> Manar
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> I applied the epackage
>>> stereotype to the root element, merged the primitive types package, and
>>> import some sub-packaged from the the Abstractions package
>>>
>>
Re: errors while metamodeling [message #475219 is a reply to message #475216] Fri, 24 August 2007 14:37 Go to previous messageGo to next message
Manar El-Kady is currently offline Manar El-KadyFriend
Messages: 78
Registered: July 2009
Member
Kenn,

Firstly, I merge the PrimitiveTypes, BehavioralFeatures,
StructuralFeatures, Relationships packages, which I use directly. After
that I add a merge for the Classifiers, TypedElements, Namespaces, and
Elements packages, which Imported by the packages that I use. In both
cases the same errors happened.



Manar


Kenn Hussey wrote:
> Manar,
>
> Are you sure you are merging all packages from Abstractions that are
> directly or indirectly referenced from elements in your domain (e.g. as
> types, superclasses, etc.)?
>
> Kenn
>
> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
> news:fama83$ahr$1@build.eclipse.org...
>> Kenn,
>>
>> I did a package merge instead of a package import. Validation before
>> applying the package merge was done successfully. But, after applying the
>> package merge and validating the metamodel, the validation get the same
>> error as before.
>>
>> While generating the code, still there is an obligation to generate code
>> for the abstractionLibrary package. Moreover, the generated code has
>> errors ?
>>
>> Is there a mistake while referring to the InfrastructureLibrary package?
>> or what?
>>
>>
>> Thanks,
>> Manar
>>
>>
>> Kenn Hussey wrote:
>>> Manar,
>>>
>>> Sorry for the delayed response. See answers below.
>>>
>>> Kenn
>>>
>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>>> news:fabvhl$k6f$1@build.eclipse.org...
>>>> Hi,
>>>>
>>>> I build a metamodel as a heavyweight extension.I do the following steps:
>>>> - create an empty UML model
>>>> - convert the model to a metamodel
>>>> - apply the ecore profile, and then apply the epackage stereotype to the
>>>> root model element
>>>> - add some elements for the metamodel
>>>> - merge the primitive types package
>>>> - add the infrastructure.uml as a resource to my metamodel (Note: I
>>>> added it by using the editor. I added it from a project in my workspace
>>>> that containing
>>>> platform:/resource/org.eclipse.uml2.source\src\org.eclipse.u ml2.uml_2.1.0.v200706141134\model\Infrastructure.uml)
>>>> - While creating the elements of the metamodels I extended classes from
>>>> the subpackages of the Abstractions package. So, I imported the packages
>>>> that containing the classes which I extend.
>>>> - finally I apply the package merge, and convert it again to a
>>>> metamodel.
>>>>
>>>> My questions are:
>>>> - After these steps I did a validation, and an error occur " Not all the
>>>> members of a namespace'<<metamodel, ePackage>> <Model> MAS-UML' are
>>>> distinguishable within it." ??
>>>>
>>> These warnings can usually be ignored. I suspect it's complaining about
>>> the primitive types, i.e. that names like 'Integer' exist both as owned
>>> members in your merged package, and as members directly or indirecty
>>> imported from another namespace. However, the package imports will be
>>> troublesome - see below.
>>>
>>>> - I tried to do these steps without doing package import and I didn't
>>>> notice any difference or errors happened. so, what is the need for doing
>>>> a package import in a metamodeling?
>>>>
>>> Strictly speaking, you don't _need_ package imports. Semantically, all
>>> they do is allow you to refer to a named element without using its
>>> qualified name. Is is, however, good practice to declare your
>>> dependencies this way...
>>>
>>>> - After creating the metamodel I create an EMF project for code
>>>> generation. Here, I obligated to generate code for the
>>>> infrastructureLibrary package, which I didn't need. Why that?
>>>>
>>> Well, after a merge, you shouldn't have any lingering dependencies on
>>> other packages such as ones in InfrastructureLibrary. Since UML2 does not
>>> provide an implementation of InfrastructureLibrary on its own, you'll
>>> need to implement it yourself. However, I would recommend _merging_ the
>>> packages from Abstractions that contain the types you are extending
>>> rather than importing them. That way, you will be implementing the types
>>> within your own (heavyweight) namespace and the imports won't linger (and
>>> hence the namespace warnings would go away).
>>>
>>>> - After the code generation, there are some errors in the generated code
>>>> for the infrastructureLibrary package and for my metamodel code. all the
>>>> errors in the impl files and said that xxx cannot be resolved??
>>>>
>>> Without knowing more about the errors, it's hard to say how to fix them,
>>> but I suspect that if you ensure that everything from UML that you need
>>> gets merged into your domain, and that you reference existing
>>> implementations of things that aren't in your domain, you'll be better
>>> off...
>>>
>>>> Sorry for this long mail, and thanks in advance.
>>>>
>>>> Manar
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> I applied the epackage
>>>> stereotype to the root element, merged the primitive types package, and
>>>> import some sub-packaged from the the Abstractions package
>>>>
>
Re: errors while metamodeling [message #475264 is a reply to message #475219] Tue, 28 August 2007 23:00 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Manar,

After you merge these packages, are there remaining references to elements
in them? For example, if you perform the package merge, save the model, and
inspect the serialization, to you see lingering references to
InfrastructureLibrary.uml?

Kenn

"Manar El-Kady" <manar.elkady@gmail.com> wrote in message
news:famqhn$gnk$1@build.eclipse.org...
> Kenn,
>
> Firstly, I merge the PrimitiveTypes, BehavioralFeatures,
> StructuralFeatures, Relationships packages, which I use directly. After
> that I add a merge for the Classifiers, TypedElements, Namespaces, and
> Elements packages, which Imported by the packages that I use. In both
> cases the same errors happened.
>
>
>
> Manar
>
>
> Kenn Hussey wrote:
>> Manar,
>>
>> Are you sure you are merging all packages from Abstractions that are
>> directly or indirectly referenced from elements in your domain (e.g. as
>> types, superclasses, etc.)?
>>
>> Kenn
>>
>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>> news:fama83$ahr$1@build.eclipse.org...
>>> Kenn,
>>>
>>> I did a package merge instead of a package import. Validation before
>>> applying the package merge was done successfully. But, after applying
>>> the package merge and validating the metamodel, the validation get the
>>> same error as before.
>>>
>>> While generating the code, still there is an obligation to generate code
>>> for the abstractionLibrary package. Moreover, the generated code has
>>> errors ?
>>>
>>> Is there a mistake while referring to the InfrastructureLibrary package?
>>> or what?
>>>
>>>
>>> Thanks,
>>> Manar
>>>
>>>
>>> Kenn Hussey wrote:
>>>> Manar,
>>>>
>>>> Sorry for the delayed response. See answers below.
>>>>
>>>> Kenn
>>>>
>>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>>>> news:fabvhl$k6f$1@build.eclipse.org...
>>>>> Hi,
>>>>>
>>>>> I build a metamodel as a heavyweight extension.I do the following
>>>>> steps:
>>>>> - create an empty UML model
>>>>> - convert the model to a metamodel
>>>>> - apply the ecore profile, and then apply the epackage stereotype to
>>>>> the
>>>>> root model element
>>>>> - add some elements for the metamodel
>>>>> - merge the primitive types package
>>>>> - add the infrastructure.uml as a resource to my metamodel (Note: I
>>>>> added it by using the editor. I added it from a project in my
>>>>> workspace that containing
>>>>> platform:/resource/org.eclipse.uml2.source\src\org.eclipse.u ml2.uml_2.1.0.v200706141134\model\Infrastructure.uml)
>>>>> - While creating the elements of the metamodels I extended classes
>>>>> from the subpackages of the Abstractions package. So, I imported the
>>>>> packages that containing the classes which I extend.
>>>>> - finally I apply the package merge, and convert it again to a
>>>>> metamodel.
>>>>>
>>>>> My questions are:
>>>>> - After these steps I did a validation, and an error occur " Not all
>>>>> the members of a namespace'<<metamodel, ePackage>> <Model> MAS-UML'
>>>>> are distinguishable within it." ??
>>>>>
>>>> These warnings can usually be ignored. I suspect it's complaining about
>>>> the primitive types, i.e. that names like 'Integer' exist both as owned
>>>> members in your merged package, and as members directly or indirecty
>>>> imported from another namespace. However, the package imports will be
>>>> troublesome - see below.
>>>>
>>>>> - I tried to do these steps without doing package import and I didn't
>>>>> notice any difference or errors happened. so, what is the need for
>>>>> doing a package import in a metamodeling?
>>>>>
>>>> Strictly speaking, you don't _need_ package imports. Semantically, all
>>>> they do is allow you to refer to a named element without using its
>>>> qualified name. Is is, however, good practice to declare your
>>>> dependencies this way...
>>>>
>>>>> - After creating the metamodel I create an EMF project for code
>>>>> generation. Here, I obligated to generate code for the
>>>>> infrastructureLibrary package, which I didn't need. Why that?
>>>>>
>>>> Well, after a merge, you shouldn't have any lingering dependencies on
>>>> other packages such as ones in InfrastructureLibrary. Since UML2 does
>>>> not provide an implementation of InfrastructureLibrary on its own,
>>>> you'll need to implement it yourself. However, I would recommend
>>>> _merging_ the packages from Abstractions that contain the types you are
>>>> extending rather than importing them. That way, you will be
>>>> implementing the types within your own (heavyweight) namespace and the
>>>> imports won't linger (and hence the namespace warnings would go away).
>>>>
>>>>> - After the code generation, there are some errors in the generated
>>>>> code for the infrastructureLibrary package and for my metamodel code.
>>>>> all the errors in the impl files and said that xxx cannot be
>>>>> resolved??
>>>>>
>>>> Without knowing more about the errors, it's hard to say how to fix
>>>> them, but I suspect that if you ensure that everything from UML that
>>>> you need gets merged into your domain, and that you reference existing
>>>> implementations of things that aren't in your domain, you'll be better
>>>> off...
>>>>
>>>>> Sorry for this long mail, and thanks in advance.
>>>>>
>>>>> Manar
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> I applied the epackage
>>>>> stereotype to the root element, merged the primitive types package,
>>>>> and
>>>>> import some sub-packaged from the the Abstractions package
>>>>>
>>
Re: errors while metamodeling [message #475352 is a reply to message #475264] Wed, 29 August 2007 09:50 Go to previous messageGo to next message
Manar El-Kady is currently offline Manar El-KadyFriend
Messages: 78
Registered: July 2009
Member
Kenn,

I didn't understand what do you mean exactly. After applying the package
merge I didn't find any import in the resulting package to merge it to
my metamodel, is it what do you mean?


Manar,



Kenn Hussey wrote:
> Manar,
>
> After you merge these packages, are there remaining references to elements
> in them? For example, if you perform the package merge, save the model, and
> inspect the serialization, to you see lingering references to
> InfrastructureLibrary.uml?
>
> Kenn
>
> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
> news:famqhn$gnk$1@build.eclipse.org...
>> Kenn,
>>
>> Firstly, I merge the PrimitiveTypes, BehavioralFeatures,
>> StructuralFeatures, Relationships packages, which I use directly. After
>> that I add a merge for the Classifiers, TypedElements, Namespaces, and
>> Elements packages, which Imported by the packages that I use. In both
>> cases the same errors happened.
>>
>>
>>
>> Manar
>>
>>
>> Kenn Hussey wrote:
>>> Manar,
>>>
>>> Are you sure you are merging all packages from Abstractions that are
>>> directly or indirectly referenced from elements in your domain (e.g. as
>>> types, superclasses, etc.)?
>>>
>>> Kenn
>>>
>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>>> news:fama83$ahr$1@build.eclipse.org...
>>>> Kenn,
>>>>
>>>> I did a package merge instead of a package import. Validation before
>>>> applying the package merge was done successfully. But, after applying
>>>> the package merge and validating the metamodel, the validation get the
>>>> same error as before.
>>>>
>>>> While generating the code, still there is an obligation to generate code
>>>> for the abstractionLibrary package. Moreover, the generated code has
>>>> errors ?
>>>>
>>>> Is there a mistake while referring to the InfrastructureLibrary package?
>>>> or what?
>>>>
>>>>
>>>> Thanks,
>>>> Manar
>>>>
>>>>
>>>> Kenn Hussey wrote:
>>>>> Manar,
>>>>>
>>>>> Sorry for the delayed response. See answers below.
>>>>>
>>>>> Kenn
>>>>>
>>>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>>>>> news:fabvhl$k6f$1@build.eclipse.org...
>>>>>> Hi,
>>>>>>
>>>>>> I build a metamodel as a heavyweight extension.I do the following
>>>>>> steps:
>>>>>> - create an empty UML model
>>>>>> - convert the model to a metamodel
>>>>>> - apply the ecore profile, and then apply the epackage stereotype to
>>>>>> the
>>>>>> root model element
>>>>>> - add some elements for the metamodel
>>>>>> - merge the primitive types package
>>>>>> - add the infrastructure.uml as a resource to my metamodel (Note: I
>>>>>> added it by using the editor. I added it from a project in my
>>>>>> workspace that containing
>>>>>> platform:/resource/org.eclipse.uml2.source\src\org.eclipse.u ml2.uml_2.1.0.v200706141134\model\Infrastructure.uml)
>>>>>> - While creating the elements of the metamodels I extended classes
>>>>>> from the subpackages of the Abstractions package. So, I imported the
>>>>>> packages that containing the classes which I extend.
>>>>>> - finally I apply the package merge, and convert it again to a
>>>>>> metamodel.
>>>>>>
>>>>>> My questions are:
>>>>>> - After these steps I did a validation, and an error occur " Not all
>>>>>> the members of a namespace'<<metamodel, ePackage>> <Model> MAS-UML'
>>>>>> are distinguishable within it." ??
>>>>>>
>>>>> These warnings can usually be ignored. I suspect it's complaining about
>>>>> the primitive types, i.e. that names like 'Integer' exist both as owned
>>>>> members in your merged package, and as members directly or indirecty
>>>>> imported from another namespace. However, the package imports will be
>>>>> troublesome - see below.
>>>>>
>>>>>> - I tried to do these steps without doing package import and I didn't
>>>>>> notice any difference or errors happened. so, what is the need for
>>>>>> doing a package import in a metamodeling?
>>>>>>
>>>>> Strictly speaking, you don't _need_ package imports. Semantically, all
>>>>> they do is allow you to refer to a named element without using its
>>>>> qualified name. Is is, however, good practice to declare your
>>>>> dependencies this way...
>>>>>
>>>>>> - After creating the metamodel I create an EMF project for code
>>>>>> generation. Here, I obligated to generate code for the
>>>>>> infrastructureLibrary package, which I didn't need. Why that?
>>>>>>
>>>>> Well, after a merge, you shouldn't have any lingering dependencies on
>>>>> other packages such as ones in InfrastructureLibrary. Since UML2 does
>>>>> not provide an implementation of InfrastructureLibrary on its own,
>>>>> you'll need to implement it yourself. However, I would recommend
>>>>> _merging_ the packages from Abstractions that contain the types you are
>>>>> extending rather than importing them. That way, you will be
>>>>> implementing the types within your own (heavyweight) namespace and the
>>>>> imports won't linger (and hence the namespace warnings would go away).
>>>>>
>>>>>> - After the code generation, there are some errors in the generated
>>>>>> code for the infrastructureLibrary package and for my metamodel code.
>>>>>> all the errors in the impl files and said that xxx cannot be
>>>>>> resolved??
>>>>>>
>>>>> Without knowing more about the errors, it's hard to say how to fix
>>>>> them, but I suspect that if you ensure that everything from UML that
>>>>> you need gets merged into your domain, and that you reference existing
>>>>> implementations of things that aren't in your domain, you'll be better
>>>>> off...
>>>>>
>>>>>> Sorry for this long mail, and thanks in advance.
>>>>>>
>>>>>> Manar
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> I applied the epackage
>>>>>> stereotype to the root element, merged the primitive types package,
>>>>>> and
>>>>>> import some sub-packaged from the the Abstractions package
>>>>>>
>
>
Re: errors while metamodeling [message #475570 is a reply to message #475352] Thu, 30 August 2007 18:06 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Manar,

I was wondering what kind of relationships there are between your merged
model (i.e. after selecting UML Editor > Package > Merge...) and the other
source models (Infrastructure, Superstructure). Ideally, after the merge,
your model should have no lingering dependencies on any other model,
otherwise you'll need to implement (pieces of it) yourself... Again, if you
want to attach your model we could try to see what is going wrong...

Kenn

"Manar El-Kady" <manar.elkady@gmail.com> wrote in message
news:fb3fj7$v3e$1@build.eclipse.org...
> Kenn,
>
> I didn't understand what do you mean exactly. After applying the package
> merge I didn't find any import in the resulting package to merge it to my
> metamodel, is it what do you mean?
>
>
> Manar,
>
>
>
> Kenn Hussey wrote:
>> Manar,
>>
>> After you merge these packages, are there remaining references to
>> elements in them? For example, if you perform the package merge, save the
>> model, and inspect the serialization, to you see lingering references to
>> InfrastructureLibrary.uml?
>>
>> Kenn
>>
>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>> news:famqhn$gnk$1@build.eclipse.org...
>>> Kenn,
>>>
>>> Firstly, I merge the PrimitiveTypes, BehavioralFeatures,
>>> StructuralFeatures, Relationships packages, which I use directly. After
>>> that I add a merge for the Classifiers, TypedElements, Namespaces, and
>>> Elements packages, which Imported by the packages that I use. In both
>>> cases the same errors happened.
>>>
>>>
>>>
>>> Manar
>>>
>>>
>>> Kenn Hussey wrote:
>>>> Manar,
>>>>
>>>> Are you sure you are merging all packages from Abstractions that are
>>>> directly or indirectly referenced from elements in your domain (e.g. as
>>>> types, superclasses, etc.)?
>>>>
>>>> Kenn
>>>>
>>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>>>> news:fama83$ahr$1@build.eclipse.org...
>>>>> Kenn,
>>>>>
>>>>> I did a package merge instead of a package import. Validation before
>>>>> applying the package merge was done successfully. But, after applying
>>>>> the package merge and validating the metamodel, the validation get the
>>>>> same error as before.
>>>>>
>>>>> While generating the code, still there is an obligation to generate
>>>>> code for the abstractionLibrary package. Moreover, the generated code
>>>>> has errors ?
>>>>>
>>>>> Is there a mistake while referring to the InfrastructureLibrary
>>>>> package? or what?
>>>>>
>>>>>
>>>>> Thanks,
>>>>> Manar
>>>>>
>>>>>
>>>>> Kenn Hussey wrote:
>>>>>> Manar,
>>>>>>
>>>>>> Sorry for the delayed response. See answers below.
>>>>>>
>>>>>> Kenn
>>>>>>
>>>>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>>>>>> news:fabvhl$k6f$1@build.eclipse.org...
>>>>>>> Hi,
>>>>>>>
>>>>>>> I build a metamodel as a heavyweight extension.I do the following
>>>>>>> steps:
>>>>>>> - create an empty UML model
>>>>>>> - convert the model to a metamodel
>>>>>>> - apply the ecore profile, and then apply the epackage stereotype to
>>>>>>> the
>>>>>>> root model element
>>>>>>> - add some elements for the metamodel
>>>>>>> - merge the primitive types package
>>>>>>> - add the infrastructure.uml as a resource to my metamodel (Note: I
>>>>>>> added it by using the editor. I added it from a project in my
>>>>>>> workspace that containing
>>>>>>> platform:/resource/org.eclipse.uml2.source\src\org.eclipse.u ml2.uml_2.1.0.v200706141134\model\Infrastructure.uml)
>>>>>>> - While creating the elements of the metamodels I extended classes
>>>>>>> from the subpackages of the Abstractions package. So, I imported the
>>>>>>> packages that containing the classes which I extend.
>>>>>>> - finally I apply the package merge, and convert it again to a
>>>>>>> metamodel.
>>>>>>>
>>>>>>> My questions are:
>>>>>>> - After these steps I did a validation, and an error occur " Not all
>>>>>>> the members of a namespace'<<metamodel, ePackage>> <Model> MAS-UML'
>>>>>>> are distinguishable within it." ??
>>>>>>>
>>>>>> These warnings can usually be ignored. I suspect it's complaining
>>>>>> about the primitive types, i.e. that names like 'Integer' exist both
>>>>>> as owned members in your merged package, and as members directly or
>>>>>> indirecty imported from another namespace. However, the package
>>>>>> imports will be troublesome - see below.
>>>>>>
>>>>>>> - I tried to do these steps without doing package import and I
>>>>>>> didn't notice any difference or errors happened. so, what is the
>>>>>>> need for doing a package import in a metamodeling?
>>>>>>>
>>>>>> Strictly speaking, you don't _need_ package imports. Semantically,
>>>>>> all they do is allow you to refer to a named element without using
>>>>>> its qualified name. Is is, however, good practice to declare your
>>>>>> dependencies this way...
>>>>>>
>>>>>>> - After creating the metamodel I create an EMF project for code
>>>>>>> generation. Here, I obligated to generate code for the
>>>>>>> infrastructureLibrary package, which I didn't need. Why that?
>>>>>>>
>>>>>> Well, after a merge, you shouldn't have any lingering dependencies on
>>>>>> other packages such as ones in InfrastructureLibrary. Since UML2 does
>>>>>> not provide an implementation of InfrastructureLibrary on its own,
>>>>>> you'll need to implement it yourself. However, I would recommend
>>>>>> _merging_ the packages from Abstractions that contain the types you
>>>>>> are extending rather than importing them. That way, you will be
>>>>>> implementing the types within your own (heavyweight) namespace and
>>>>>> the imports won't linger (and hence the namespace warnings would go
>>>>>> away).
>>>>>>
>>>>>>> - After the code generation, there are some errors in the generated
>>>>>>> code for the infrastructureLibrary package and for my metamodel
>>>>>>> code. all the errors in the impl files and said that xxx cannot be
>>>>>>> resolved??
>>>>>>>
>>>>>> Without knowing more about the errors, it's hard to say how to fix
>>>>>> them, but I suspect that if you ensure that everything from UML that
>>>>>> you need gets merged into your domain, and that you reference
>>>>>> existing implementations of things that aren't in your domain, you'll
>>>>>> be better off...
>>>>>>
>>>>>>> Sorry for this long mail, and thanks in advance.
>>>>>>>
>>>>>>> Manar
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> I applied the epackage
>>>>>>> stereotype to the root element, merged the primitive types package,
>>>>>>> and
>>>>>>> import some sub-packaged from the the Abstractions package
>>>>>>>
>>
Re: errors while metamodeling [message #475571 is a reply to message #475570] Thu, 30 August 2007 20:27 Go to previous messageGo to next message
Manar El-Kady is currently offline Manar El-KadyFriend
Messages: 78
Registered: July 2009
Member
This is a multi-part message in MIME format.
--------------050206070400050203010900
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Kenn,
Attached, you can find the model after applying the package merge and
another one before applying the package merge.


Manar,


Kenn Hussey wrote:
> Manar,
>
> I was wondering what kind of relationships there are between your merged
> model (i.e. after selecting UML Editor > Package > Merge...) and the other
> source models (Infrastructure, Superstructure). Ideally, after the merge,
> your model should have no lingering dependencies on any other model,
> otherwise you'll need to implement (pieces of it) yourself... Again, if you
> want to attach your model we could try to see what is going wrong...
>
> Kenn
>
> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
> news:fb3fj7$v3e$1@build.eclipse.org...
>> Kenn,
>>
>> I didn't understand what do you mean exactly. After applying the package
>> merge I didn't find any import in the resulting package to merge it to my
>> metamodel, is it what do you mean?
>>
>>
>> Manar,
>>
>>
>>
>> Kenn Hussey wrote:
>>> Manar,
>>>
>>> After you merge these packages, are there remaining references to
>>> elements in them? For example, if you perform the package merge, save the
>>> model, and inspect the serialization, to you see lingering references to
>>> InfrastructureLibrary.uml?
>>>
>>> Kenn
>>>
>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>>> news:famqhn$gnk$1@build.eclipse.org...
>>>> Kenn,
>>>>
>>>> Firstly, I merge the PrimitiveTypes, BehavioralFeatures,
>>>> StructuralFeatures, Relationships packages, which I use directly. After
>>>> that I add a merge for the Classifiers, TypedElements, Namespaces, and
>>>> Elements packages, which Imported by the packages that I use. In both
>>>> cases the same errors happened.
>>>>
>>>>
>>>>
>>>> Manar
>>>>
>>>>
>>>> Kenn Hussey wrote:
>>>>> Manar,
>>>>>
>>>>> Are you sure you are merging all packages from Abstractions that are
>>>>> directly or indirectly referenced from elements in your domain (e.g. as
>>>>> types, superclasses, etc.)?
>>>>>
>>>>> Kenn
>>>>>
>>>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>>>>> news:fama83$ahr$1@build.eclipse.org...
>>>>>> Kenn,
>>>>>>
>>>>>> I did a package merge instead of a package import. Validation before
>>>>>> applying the package merge was done successfully. But, after applying
>>>>>> the package merge and validating the metamodel, the validation get the
>>>>>> same error as before.
>>>>>>
>>>>>> While generating the code, still there is an obligation to generate
>>>>>> code for the abstractionLibrary package. Moreover, the generated code
>>>>>> has errors ?
>>>>>>
>>>>>> Is there a mistake while referring to the InfrastructureLibrary
>>>>>> package? or what?
>>>>>>
>>>>>>
>>>>>> Thanks,
>>>>>> Manar
>>>>>>
>>>>>>
>>>>>> Kenn Hussey wrote:
>>>>>>> Manar,
>>>>>>>
>>>>>>> Sorry for the delayed response. See answers below.
>>>>>>>
>>>>>>> Kenn
>>>>>>>
>>>>>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>>>>>>> news:fabvhl$k6f$1@build.eclipse.org...
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I build a metamodel as a heavyweight extension.I do the following
>>>>>>>> steps:
>>>>>>>> - create an empty UML model
>>>>>>>> - convert the model to a metamodel
>>>>>>>> - apply the ecore profile, and then apply the epackage stereotype to
>>>>>>>> the
>>>>>>>> root model element
>>>>>>>> - add some elements for the metamodel
>>>>>>>> - merge the primitive types package
>>>>>>>> - add the infrastructure.uml as a resource to my metamodel (Note: I
>>>>>>>> added it by using the editor. I added it from a project in my
>>>>>>>> workspace that containing
>>>>>>>> platform:/resource/org.eclipse.uml2.source\src\org.eclipse.u ml2.uml_2.1.0.v200706141134\model\Infrastructure.uml)
>>>>>>>> - While creating the elements of the metamodels I extended classes
>>>>>>>> from the subpackages of the Abstractions package. So, I imported the
>>>>>>>> packages that containing the classes which I extend.
>>>>>>>> - finally I apply the package merge, and convert it again to a
>>>>>>>> metamodel.
>>>>>>>>
>>>>>>>> My questions are:
>>>>>>>> - After these steps I did a validation, and an error occur " Not all
>>>>>>>> the members of a namespace'<<metamodel, ePackage>> <Model> MAS-UML'
>>>>>>>> are distinguishable within it." ??
>>>>>>>>
>>>>>>> These warnings can usually be ignored. I suspect it's complaining
>>>>>>> about the primitive types, i.e. that names like 'Integer' exist both
>>>>>>> as owned members in your merged package, and as members directly or
>>>>>>> indirecty imported from another namespace. However, the package
>>>>>>> imports will be troublesome - see below.
>>>>>>>
>>>>>>>> - I tried to do these steps without doing package import and I
>>>>>>>> didn't notice any difference or errors happened. so, what is the
>>>>>>>> need for doing a package import in a metamodeling?
>>>>>>>>
>>>>>>> Strictly speaking, you don't _need_ package imports. Semantically,
>>>>>>> all they do is allow you to refer to a named element without using
>>>>>>> its qualified name. Is is, however, good practice to declare your
>>>>>>> dependencies this way...
>>>>>>>
>>>>>>>> - After creating the metamodel I create an EMF project for code
>>>>>>>> generation. Here, I obligated to generate code for the
>>>>>>>> infrastructureLibrary package, which I didn't need. Why that?
>>>>>>>>
>>>>>>> Well, after a merge, you shouldn't have any lingering dependencies on
>>>>>>> other packages such as ones in InfrastructureLibrary. Since UML2 does
>>>>>>> not provide an implementation of InfrastructureLibrary on its own,
>>>>>>> you'll need to implement it yourself. However, I would recommend
>>>>>>> _merging_ the packages from Abstractions that contain the types you
>>>>>>> are extending rather than importing them. That way, you will be
>>>>>>> implementing the types within your own (heavyweight) namespace and
>>>>>>> the imports won't linger (and hence the namespace warnings would go
>>>>>>> away).
>>>>>>>
>>>>>>>> - After the code generation, there are some errors in the generated
>>>>>>>> code for the infrastructureLibrary package and for my metamodel
>>>>>>>> code. all the errors in the impl files and said that xxx cannot be
>>>>>>>> resolved??
>>>>>>>>
>>>>>>> Without knowing more about the errors, it's hard to say how to fix
>>>>>>> them, but I suspect that if you ensure that everything from UML that
>>>>>>> you need gets merged into your domain, and that you reference
>>>>>>> existing implementations of things that aren't in your domain, you'll
>>>>>>> be better off...
>>>>>>>
>>>>>>>> Sorry for this long mail, and thanks in advance.
>>>>>>>>
>>>>>>>> Manar
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> I applied the epackage
>>>>>>>> stereotype to the root element, merged the primitive types package,
>>>>>>>> and
>>>>>>>> import some sub-packaged from the the Abstractions package
>>>>>>>>
>


--------------050206070400050203010900
Content-Type: text/xml;
name="MAS_UML3.uml"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="MAS_UML3.uml"

<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Ecore="http://www.eclipse.org/uml2/schemas/Ecore/4" xmlns:Standard="http://www.eclipse.org/uml2/schemas/Standard/1" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML" xsi:schemaLocation="http://www.eclipse.org/uml2/schemas/Ecore/4 pathmap://UML_PROFILES/Ecore.profile.uml#_B7dOIMEREduRdatXod jBjA http://www.eclipse.org/uml2/schemas/Standard/1 pathmap://UML_PROFILES/Standard.profile.uml#_yzU58YinEdqtvbn fB2L_5w">
<uml:Model xmi:id="_0" name="MAS_UML" viewpoint="">
<eAnnotations xmi:id="_http2F2Fwww.eclipse.org2Fuml22F2.0.02FUML" source="http://www.eclipse.org/uml2/2.0.0/UML">
<eAnnotations xmi:id=" _http2F2Fwww.eclipse.org2Fuml22F2.0.02FUML-_UMLPrimitiveType s " source="UMLPrimitiveTypes" references="Boolean Integer String UnlimitedNatural"/>
<eAnnotations xmi:id=" _http2F2Fwww.eclipse.org2Fuml22F2.0.02FUML-_InfrastructureLi braryCoreAbstractionsBehavioralFeatures " source=" InfrastructureLibrary::Core::Abstractions::BehavioralFeature s " references="BehavioralFeature-parameter BehavioralFeature-isDistinguishableFrom BehavioralFeature Parameter A_parameter_behavioralFeature-_ownedEnd.0 A_parameter_behavioralFeature"/>
<eAnnotations xmi:id=" _http2F2Fwww.eclipse.org2Fuml22F2.0.02FUML-_InfrastructureLi braryCoreAbstractionsStructuralFeatures " source=" InfrastructureLibrary::Core::Abstractions::StructuralFeature s " references="StructuralFeature"/>
<eAnnotations xmi:id=" _http2F2Fwww.eclipse.org2Fuml22F2.0.02FUML-_InfrastructureLi braryCoreAbstractionsRelationships " source="InfrastructureLibrary::Core::Abstractions::Relationships " references="DirectedRelationship-source DirectedRelationship-target DirectedRelationship Relationship-relatedElement Relationship A_relatedElement_relationship-_ownedEnd.0 A_relatedElement_relationship A_source_directedRelationship-_ownedEnd.0 A_source_directedRelationship A_target_directedRelationship-_ownedEnd.0 A_target_directedRelationship"/>
<eAnnotations xmi:id=" _http2F2Fwww.eclipse.org2Fuml22F2.0.02FUML-_InfrastructureLi braryCoreAbstractionsClassifiers " source="InfrastructureLibrary::Core::Abstractions::Classifiers " references="Classifier-feature Classifier-allFeatures Classifier Feature-featuringClassifier Feature A_feature_featuringClassifier"/>
<eAnnotations xmi:id=" _http2F2Fwww.eclipse.org2Fuml22F2.0.02FUML-_InfrastructureLi braryCoreAbstractionsTypedElements " source="InfrastructureLibrary::Core::Abstractions::TypedElements " references="Type-conformsTo Type TypedElement-type TypedElement A_type_typedElement-_ownedEnd.0 A_type_typedElement"/>
<eAnnotations xmi:id=" _http2F2Fwww.eclipse.org2Fuml22F2.0.02FUML-_InfrastructureLi braryCoreAbstractionsNamespaces " source="InfrastructureLibrary::Core::Abstractions::Namespaces " references="NamedElement-name NamedElement-qualifiedName NamedElement-namespace NamedElement-allNamespaces NamedElement-isDistinguishableFrom NamedElement-separator NamedElement-qualifiedName.1 NamedElement Namespace-ownedMember Namespace-member Namespace-getNamesOfMember Namespace-membersAreDistinguishable Namespace A_ownedMember_namespace A_member_namespace-_ownedEnd.0 A_member_namespace"/>
<eAnnotations xmi:id=" _http2F2Fwww.eclipse.org2Fuml22F2.0.02FUML-_InfrastructureLi braryCoreAbstractionsOwnerships " source="InfrastructureLibrary::Core::Abstractions::Ownerships " references="Element-ownedElement Element-owner Element-ownedComment Element-allOwnedElements Element-mustBeOwned Element A_ownedElement_owner A_ownedComment_owningElement-owningElement A_ownedComment_owningElement"/>
<eAnnotations xmi:id=" _http2F2Fwww.eclipse.org2Fuml22F2.0.02FUML-_InfrastructureLi braryCoreAbstractionsElements " source="InfrastructureLibrary::Core::Abstractions::Elements " references="Element"/>
</eAnnotations>
<packagedElement xmi:type="uml:Class" xmi:id="AgentType" name="AgentType">
<generalization xmi:id="AgentType-_generalization.0">
<general xmi:type="uml:Class" href=" ../org.eclipse.uml2.source/src/org.eclipse.uml2.uml_2.1.0.v2 00706141134/model/Infrastructure.uml#_3ADC7B74022D3CA00A2A01 8F "/>
</generalization>
<ownedAttribute xmi:id="AgentType-play" name="play" type="Play" aggregation="composite" association="A_play_player">
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="AgentType-play-_upperValue" value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="AgentType-play-_lowerValue"/>
</ownedAttribute>
<ownedAttribute xmi:id="AgentType-ontology" name="ontology" type="Ontology" association="Knows">
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="AgentType-ontology-_upperValue" value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="AgentType-ontology-_lowerValue"/>
</ownedAttribute>
<ownedAttribute xmi:id="AgentType-ownedBelieve" name="ownedBelieve" type="Beliefs" aggregation="composite" association="A_ownedBelieve_agent">
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="AgentType-ownedBelieve-_upperValue" value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="AgentType-ownedBelieve-_lowerValue"/>
</ownedAttribute>
<ownedAttribute xmi:id="AgentType-ownedGoal" name="ownedGoal" type="Goal" aggregation="composite" association="A_ownedGoal_agent">
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="AgentType-ownedGoal-_upperValue" value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="AgentType-ownedGoal-_lowerValue"/>
</ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="Role" name="Role">
<generalization xmi:id="Role-_generalization.0">
<general xmi:type="uml:Class" href=" ../org.eclipse.uml2.source/src/org.eclipse.uml2.uml_2.1.0.v2 00706141134/model/Infrastructure.uml#_3ADC7B74022D3CA00A2A01 8F "/>
</generalization>
<ownedAttribute xmi:id="Role-ownedGoal" name="ownedGoal" type="Goal" aggregation="composite" association="A_ownedGoal_role">
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Role-ownedGoal-_upperValue" value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="Role-ownedGoal-_lowerValue" value="1"/>
</ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="Beliefs" name="Beliefs">
<generalization xmi:id="Beliefs-_generalization.0">
<general xmi:type="uml:Class" href=" ../org.eclipse.uml2.source/src/org.eclipse.uml2.uml_2.1.0.v2 00706141134/model/Infrastructure.uml#_3ADC7B74022D3CA00A4100 02 "/>
</generalization>
<ownedAttribute xmi:id="Beliefs-Language" name="Language">
<type xmi:type="uml:PrimitiveType" href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
</ownedAttribute>
<ownedAttribute xmi:id="Beliefs-Title" name="Title">
<type xmi:type="uml:PrimitiveType" href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
</ownedAttribute>
<ownedAttribute xmi:id="Beliefs-rule" name="rule">
<type xmi:type="uml:PrimitiveType" href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Beliefs-rule-_upperValue" value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="Beliefs-rule-_lowerValue"/>
</ownedAttribute>
<ownedAttribute xmi:id="Beliefs-agent" name="agent" type="AgentType" association="A_ownedBelieve_agent"/>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="Ontology" name="Ontology">
<generalization xmi:id="Ontology-_generalization.0">
<general xmi:type="uml:Class" href=" ../org.eclipse.uml2.source/src/org.eclipse.uml2.uml_2.1.0.v2 00706141134/model/Infrastructure.uml#_3ADC7B74022D3CA00A2A01 8F "/>
</generalization>
<ownedAttribute xmi:id="Ontology-Language" name="Language">
<type xmi:type="uml:PrimitiveType" href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
</ownedAttribute>
<ownedAttribute xmi:id="Ontology-Title" name="Title">
<type xmi:type="uml:PrimitiveType" href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
</ownedAttribute>
<ownedAttribute xmi:id="Ontology-Location" name="Location">
<type xmi:type="uml:PrimitiveType" href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
</ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="Goal" name="Goal">
<generalization xmi:id="Goal-_generalization.0">
<general xmi:type="uml:Class" href=" ../org.eclipse.uml2.source/src/org.eclipse.uml2.uml_2.1.0.v2 00706141134/model/Infrastructure.uml#_3ADC7B74022D3CA00A4100 02 "/>
</generalization>
<ownedAttribute xmi:id="Goal-Language" name="Language">
<type xmi:type="uml:PrimitiveType" href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
</ownedAttribute>
<ownedAttribute xmi:id="Goal-Title" name="Title">
<type xmi:type="uml:PrimitiveType" href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
</ownedAttribute>
<ownedAttribute xmi:id="Goal-Description" name="Description">
<type xmi:type="uml:PrimitiveType" href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
</ownedAttribute>
<ownedAttribute xmi:id="Goal-Goal_Content" name="Goal_Content">
<type xmi:type="uml:PrimitiveType" href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
</ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="Play" name="Play">
<generalization xmi:id="Play-_generalization.0">
<general xmi:type="uml:Class" href=" ../org.eclipse.uml2.source/src/org.eclipse.uml2.uml_2.1.0.v2 00706141134/model/Infrastructure.uml#_3ADC7B74022D3D51445B01 FA "/>
</generalization>
<ownedAttribute xmi:id="Play-player" name="player" type="AgentType" association="A_play_player">
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Play-player-_upperValue" value="1"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="Play-player-_lowerValue" value="1"/>
</ownedAttribute>
<ownedAttribute xmi:id="Play-role" name="role" type="Role" association="A_role_play">
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Play-role-_upperValue" value="1"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="Play-role-_lowerValue" value="1"/>
</ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:Association" xmi:id="A_play_player" name="A_play_player" visibility="private" memberEnd="AgentType-play Play-player"/>
<packagedElement xmi:type="uml:Association" xmi:id="A_role_play" name="A_role_play" visibility="private" memberEnd="A_role_play-_ownedEnd.0 Play-role">
<ownedEnd xmi:id="A_role_play-_ownedEnd.0" type="Play" association="A_role_play">
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="A_role_play-_ownedEnd.0-_upperValue" value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="A_role_play-_ownedEnd.0-_lowerValue"/>
</ownedEnd>
</packagedElement>
<packagedElement xmi:type="uml:Association" xmi:id="Knows" name="Knows" visibility="private" memberEnd="Knows-agentType AgentType-ontology">
<ownedEnd xmi:id="Knows-agentType" name="agentType" type="AgentType" association="Knows">
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Knows-agentType-_upperValue" value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="Knows-agentType-_lowerValue"/>
</ownedEnd>
</packagedElement>
<packagedElement xmi:type="uml:Association" xmi:id="A_ownedBelieve_agent" name="A_ownedBelieve_agent" visibility="private" memberEnd="AgentType-ownedBelieve Beliefs-agent"/>
<packagedElement xmi:type="uml:Association" xmi:id="A_ownedGoal_agent" name="A_ownedGoal_agent" visibility="private" memberEnd="AgentType-ownedGoal A_ownedGoal_agent-agent">
<ownedEnd xmi:id="A_ownedGoal_agent-agent" name="agent" type="AgentType" association="A_ownedGoal_agent">
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="A_ownedGoal_agent-agent-_lowerValue"/>
</ownedEnd>
</packagedElement>
<packagedElement xmi:type="uml:Association" xmi:id="A_ownedGoal_role" name="A_ownedGoal_role" visibility="private" memberEnd="Role-ownedGoal A_ownedGoal_role-role">
<ownedEnd xmi:id="A_ownedGoal_role-role" name="role" type="Role" association="A_ownedGoal_role"/>
</packagedElement>
<packagedElement xmi:type="uml:PrimitiveType" xmi:id="Boolean" name="Boolean" visibility="private"/>
<packagedElement xmi:type="uml:PrimitiveType" xmi:id="Integer" name="Integer" visibility="private"/>
<packagedElement xmi:type="uml:PrimitiveType" xmi:id="String" name="String" visibility="private"/>
<packagedElement xmi:type="uml:PrimitiveType" xmi:id="UnlimitedNatural" name="UnlimitedNatural" visibility="private"/>
<packagedElement xmi:type="uml:Class" xmi:id="BehavioralFeature" name="BehavioralFeature" isAbstract="true">
<ownedComment xmi:id="BehavioralFeature-_ownedComment.0" annotatedElement="BehavioralFeature">
<body>A behavioral feature is a feature of a classifier that specifies an aspect of the behavior of its instances.</body>
</ownedComment>
<generalization xmi:id="BehavioralFeature-_generalization.0" general="Feature"/>
<generalization xmi:id="BehavioralFeature-_generalization.1" general="Namespace"/>
<ownedAttribute xmi:id="BehavioralFeature-parameter" name="parameter" type="Parameter" isOrdered="true" isReadOnly="true" isDerived="true" subsettedProperty="Namespace-member" association="A_parameter_behavioralFeature">
<ownedComment xmi:id="BehavioralFeature-parameter-_ownedComment.0" annotatedElement="BehavioralFeature-parameter">
<body>Specifies the parameters of the BehavioralFeature.</body>
</ownedComment>
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="BehavioralFeature-parameter-_upperValue" value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="BehavioralFeature-parameter-_lowerValue"/>
</ownedAttribute>
<ownedOperation xmi:id="BehavioralFeature-isDistinguishableFrom" name="isDistinguishableFrom" isQuery="true" redefinedOperation="NamedElement-isDistinguishableFrom" bodyCondition="BehavioralFeature-isDistinguishableFrom-spec ">
<ownedComment xmi:id="BehavioralFeature-isDistinguishableFrom-_ownedComment.0 " annotatedElement="BehavioralFeature-isDistinguishableFrom">
<body>The query isDistinguishableFrom() determines whether two BehavioralFeatures may coexist in the same Namespace. It specifies that they have to have different signatures.</body>
</ownedComment>
<ownedRule xmi:id="BehavioralFeature-isDistinguishableFrom-spec" name="spec" constrainedElement="BehavioralFeature-isDistinguishableFrom ">
<specification xmi:type="uml:OpaqueExpression" xmi:id="BehavioralFeature-isDistinguishableFrom-spec-_specification ">
<language>OCL</language>
<body>result = if n.oclIsKindOf(BehavioralFeature)&#xA;then&#xA; if ns.getNamesOfMember(self)->intersection(ns.getNamesOfMember(n))- >notEmpty()&#xA; then Set{}->including(self)->including(n)->isUnique( bf | bf.parameter->collect(type))&#xA; else true&#xA; endif&#xA;else true&#xA;endif</body>
</specification>
</ownedRule>
<ownedParameter xmi:id="BehavioralFeature-isDistinguishableFrom-_ownedParameter.0 " direction="return">
<type xmi:type="uml:PrimitiveType" href=" ../org.eclipse.uml2.source/src/org.eclipse.uml2.uml_2.1.0.v2 00706141134/model/Infrastructure.uml#_3ADC7B74022D3CA010AC00 90 "/>
</ownedParameter>
<ownedParameter xmi:id="BehavioralFeature-isDistinguishableFrom-n" name="n" type="NamedElement"/>
<ownedParameter xmi:id="BehavioralFeature-isDistinguishableFrom-ns" name="ns" type="Namespace"/>
</ownedOperation>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="Parameter" name="Parameter" isAbstract="true">
<ownedComment xmi:id="Parameter-_ownedComment.0" annotatedElement="Parameter">
<body>A parameter is a specification of an argument used to pass information into or out of an invocation of a behavioral feature.</body>
</ownedComment>
<generalization xmi:id="Parameter-_generalization.0" general="TypedElement"/>
</packagedElement>
<packagedElement xmi:type="uml:Association" xmi:id="A_parameter_behavioralFeature" name="A_parameter_behavioralFeature" visibility="private" memberEnd="BehavioralFeature-parameter A_parameter_behavioralFeature-_ownedEnd.0">
<generalization xmi:id="A_parameter_behavioralFeature-_generalization.0" general="A_member_namespace"/>
<ownedEnd xmi:id="A_parameter_behavioralFeature-_ownedEnd.0" type="BehavioralFeature" association="A_parameter_behavioralFeature">
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="A_parameter_behavioralFeature-_ownedEnd.0-_upperValue " value="1"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="A_parameter_behavioralFeature-_ownedEnd.0-_lowerValue "/>
</ownedEnd>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="StructuralFeature" name="StructuralFeature" isAbstract="true">
<ownedComment xmi:id="StructuralFeature-_ownedComment.0" annotatedElement="StructuralFeature">
<body>A structural feature is a typed feature of a classifier that specifies the structure of instances of the classifier.</body>
</ownedComment>
<generalization xmi:id="StructuralFeature-_generalization.0" general="Feature"/>
<generalization xmi:id="StructuralFeature-_generalization.1" general="TypedElement"/>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="DirectedRelationship" name="DirectedRelationship" isAbstract="true">
<ownedComment xmi:id="DirectedRelationship-_ownedComment.0" annotatedElement="DirectedRelationship">
<body>A directed relationship represents a relationship between a collection of source model elements and a collection of target model elements.</body>
</ownedComment>
<generalization xmi:id="DirectedRelationship-_generalization.0" general="Relationship"/>
<ownedAttribute xmi:id="DirectedRelationship-source" name="source" type="Element" isReadOnly="true" isDerived="true" subsettedProperty="Relationship-relatedElement" association="A_source_directedRelationship">
<ownedComment xmi:id="DirectedRelationship-source-_ownedComment.0" annotatedElement="DirectedRelationship-source">
<body>Specifies the sources of the DirectedRelationship.</body>
</ownedComment>
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="DirectedRelationship-source-_upperValue" value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="DirectedRelationship-source-_lowerValue" value="1"/>
</ownedAttribute>
<ownedAttribute xmi:id="DirectedRelationship-target" name="target" type="Element" isReadOnly="true" isDerived="true" subsettedProperty="Relationship-relatedElement" association="A_target_directedRelationship">
<ownedComment xmi:id="DirectedRelationship-target-_ownedComment.0" annotatedElement="DirectedRelationship-target">
<body>Specifies the targets of the DirectedRelationship.</body>
</ownedComment>
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="DirectedRelationship-target-_upperValue" value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="DirectedRelationship-target-_lowerValue" value="1"/>
</ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="Relationship" name="Relationship" isAbstract="true">
<ownedComment xmi:id="Relationship-_ownedComment.0" annotatedElement="Relationship">
<body>Relationship is an abstract concept that specifies some kind of relationship between elements.</body>
</ownedComment>
<generalization xmi:id="Relationship-_generalization.0" general="Element"/>
<ownedAttribute xmi:id="Relationship-relatedElement" name="relatedElement" type="Element" isReadOnly="true" isDerived="true" isDerivedUnion="true" association="A_relatedElement_relationship">
<ownedComment xmi:id="Relationship-relatedElement-_ownedComment.0" annotatedElement="Relationship-relatedElement">
<body>Specifies the elements related by the Relationship.</body>
</ownedComment>
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Relationship-relatedElement-_upperValue" value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="Relationship-relatedElement-_lowerValue" value="1"/>
</ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:Association" xmi:id="A_relatedElement_relationship" name="A_relatedElement_relationship" visibility="private" memberEnd="Relationship-relatedElement A_relatedElement_relationship-_ownedEnd.0">
<ownedEnd xmi:id="A_relatedElement_relationship-_ownedEnd.0" type="Relationship" association="A_relatedElement_relationship">
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="A_relatedElement_relationship-_ownedEnd.0-_upperValue " value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="A_relatedElement_relationship-_ownedEnd.0-_lowerValue "/>
</ownedEnd>
</packagedElement>
<packagedElement xmi:type="uml:Association" xmi:id="A_source_directedRelationship" name="A_source_directedRelationship" visibility="private" memberEnd="DirectedRelationship-source A_source_directedRelationship-_ownedEnd.0">
<generalization xmi:id="A_source_directedRelationship-_generalization.0" general="A_relatedElement_relationship"/>
<ownedEnd xmi:id="A_source_directedRelationship-_ownedEnd.0" type="DirectedRelationship" association="A_source_directedRelationship">
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="A_source_directedRelationship-_ownedEnd.0-_upperValue " value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="A_source_directedRelationship-_ownedEnd.0-_lowerValue "/>
</ownedEnd>
</packagedElement>
<packagedElement xmi:type="uml:Association" xmi:id="A_target_directedRelationship" name="A_target_directedRelationship" visibility="private" memberEnd="DirectedRelationship-target A_target_directedRelationship-_ownedEnd.0">
<generalization xmi:id="A_target_directedRelationship-_generalization.0" general="A_relatedElement_relationship"/>
<ownedEnd xmi:id="A_target_directedRelationship-_ownedEnd.0" type="DirectedRelationship" association="A_target_directedRelationship">
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="A_target_directedRelationship-_ownedEnd.0-_upperValue " value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="A_target_directedRelationship-_ownedEnd.0-_lowerValue "/>
</ownedEnd>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="Classifier" name="Classifier" isAbstract="true">
<ownedComment xmi:id="Classifier-_ownedComment.0" annotatedElement="Classifier">
<body>A classifier is a classification of instances - it describes a set of instances that have features in common.</body>
</ownedComment>
<generalization xmi:id="Classifier-_generalization.0" general="Namespace"/>
<ownedAttribute xmi:id="Classifier-feature" name="feature" type="Feature" isReadOnly="true" isDerived="true" subsettedProperty="Namespace-member" association="A_feature_featuringClassifier">
<ownedComment xmi:id="Classifier-feature-_ownedComment.0" annotatedElement="Classifier-feature">
<body>Specifies each feature defined in the classifier.</body>
</ownedComment>
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Classifier-feature-_upperValue" value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="Classifier-feature-_lowerValue"/>
</ownedAttribute>
<ownedOperation xmi:id="Classifier-allFeatures" name="allFeatures" isQuery="true" bodyCondition="Classifier-allFeatures-spec">
<ownedComment xmi:id="Classifier-allFeatures-_ownedComment.0" annotatedElement="Classifier-allFeatures">
<body>The query allFeatures() gives all of the features in the namespace of the classifier. In general, through mechanisms such as inheritance, this will be a larger set than feature.</body>
</ownedComment>
<ownedRule xmi:id="Classifier-allFeatures-spec" name="spec" constrainedElement="Classifier-allFeatures">
<specification xmi:type="uml:OpaqueExpression" xmi:id="Classifier-allFeatures-spec-_specification">
<language>OCL</language>
<body>result = member->select(oclIsKindOf(Feature))</body>
</specification>
</ownedRule>
<ownedParameter xmi:id="Classifier-allFeatures-_ownedParameter.0" type="Feature" direction="return">
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Classifier-allFeatures-_ownedParameter.0-_upperValue " value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="Classifier-allFeatures-_ownedParameter.0-_lowerValue "/>
</ownedParameter>
</ownedOperation>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="Feature" name="Feature" isAbstract="true">
<ownedComment xmi:id="Feature-_ownedComment.0" annotatedElement="Feature">
<body>A feature declares a behavioral or structural characteristic of instances of classifiers.</body>
</ownedComment>
<generalization xmi:id="Feature-_generalization.0" general="NamedElement"/>
<ownedAttribute xmi:id="Feature-featuringClassifier" name="featuringClassifier" type="Classifier" isReadOnly="true" isDerived="true" association="A_feature_featuringClassifier">
<ownedComment xmi:id="Feature-featuringClassifier-_ownedComment.0" annotatedElement="Feature-featuringClassifier">
<body>The Classifiers that have this Feature as a feature.</body>
</ownedComment>
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Feature-featuringClassifier-_upperValue" value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="Feature-featuringClassifier-_lowerValue"/>
</ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:Association" xmi:id="A_feature_featuringClassifier" name="A_feature_featuringClassifier" visibility="private" memberEnd="Classifier-feature Feature-featuringClassifier">
<generalization xmi:id="A_feature_featuringClassifier-_generalization.0" general="A_member_namespace"/>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="Type" name="Type" isAbstract="true">
<ownedComment xmi:id="Type-_ownedComment.0" annotatedElement="Type">
<body>A type constrains the values represented by a typed element.</body>
</ownedComment>
<generalization xmi:id="Type-_generalization.0" general="NamedElement"/>
<ownedOperation xmi:id="Type-conformsTo" name="conformsTo" isQuery="true" bodyCondition="Type-conformsTo-spec">
<ownedComment xmi:id="Type-conformsTo-_ownedComment.0" annotatedElement="Type-conformsTo">
<body>The query conformsTo() gives true for a type that conforms to another. By default, two types do not conform to each other. This query is intended to be redefined for specific conformance situations.</body>
</ownedComment>
<ownedRule xmi:id="Type-conformsTo-spec" name="spec" constrainedElement="Type-conformsTo">
<specification xmi:type="uml:OpaqueExpression" xmi:id="Type-conformsTo-spec-_specification">
<language>OCL</language>
<body>result = false</body>
</specification>
</ownedRule>
<ownedParameter xmi:id="Type-conformsTo-_ownedParameter.0" direction="return">
<type xmi:type="uml:PrimitiveType" href=" ../org.eclipse.uml2.source/src/org.eclipse.uml2.uml_2.1.0.v2 00706141134/model/Infrastructure.uml#_3ADC7B74022D3CA010AC00 90 "/>
</ownedParameter>
<ownedParameter xmi:id="Type-conformsTo-other" name="other" type="Type"/>
</ownedOperation>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="TypedElement" name="TypedElement" isAbstract="true">
<ownedComment xmi:id="TypedElement-_ownedComment.0" annotatedElement="TypedElement">
<body>A typed element has a type.</body>
</ownedComment>
<generalization xmi:id="TypedElement-_generalization.0" general="NamedElement"/>
<ownedAttribute xmi:id="TypedElement-type" name="type" type="Type" association="A_type_typedElement">
<ownedComment xmi:id="TypedElement-type-_ownedComment.0" annotatedElement="TypedElement-type">
<body>The type of the TypedElement.</body>
</ownedComment>
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="TypedElement-type-_upperValue" value="1"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="TypedElement-type-_lowerValue"/>
</ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:Association" xmi:id="A_type_typedElement" name="A_type_typedElement" visibility="private" memberEnd="TypedElement-type A_type_typedElement-_ownedEnd.0">
<ownedEnd xmi:id="A_type_typedElement-_ownedEnd.0" type="TypedElement" association="A_type_typedElement">
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="A_type_typedElement-_ownedEnd.0-_upperValue" value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="A_type_typedElement-_ownedEnd.0-_lowerValue"/>
</ownedEnd>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="NamedElement" name="NamedElement" isAbstract="true">
<ownedComment xmi:id="NamedElement-_ownedComment.0" annotatedElement="NamedElement">
<body>A named element is an element in a model that may have a name.</body>
</ownedComment>
<ownedRule xmi:id="NamedElement-has_no_qualified_name" name="has_no_qualified_name" constrainedElement="NamedElement">
<ownedComment xmi:id="NamedElement-has_no_qualified_name-_ownedComment.0" annotatedElement="NamedElement-has_no_qualified_name">
<body>If there is no name, or one of the containing namespaces has no name, there is no qualified name.</body>
</ownedComment>
<specification xmi:type="uml:OpaqueExpression" xmi:id="NamedElement-has_no_qualified_name-_specification">
<language>OCL</language>
<body>(self.name->isEmpty() or self.allNamespaces()->select(ns | ns.name->isEmpty())->notEmpty())&#xD;&#xA; implies self.qualifiedName->isEmpty()</body>
</specification>
</ownedRule>
<ownedRule xmi:id="NamedElement-has_qualified_name" name="has_qualified_name" constrainedElement="NamedElement">
<ownedComment xmi:id="NamedElement-has_qualified_name-_ownedComment.0" annotatedElement="NamedElement-has_qualified_name">
<body>When there is a name, and all of the containing namespaces have a name, the qualified name is constructed from the names of the containing namespaces.</body>
</ownedComment>
<specification xmi:type="uml:OpaqueExpression" xmi:id="NamedElement-has_qualified_name-_specification">
<language>OCL</language>
<body>(self.name->notEmpty() and self.allNamespaces()->select(ns | ns.name->isEmpty())->isEmpty()) implies&#xA; self.qualifiedName = self.allNamespaces()->iterate( ns : Namespace; result: String = self.name | ns.name->union(self.separator())->union(result))</body>
</specification>
</ownedRule>
<generalization xmi:id="NamedElement-_generalization.0" general="Element"/>
<ownedAttribute xmi:id="NamedElement-name" name="name">
<ownedComment xmi:id="NamedElement-name-_ownedComment.0" annotatedElement="NamedElement-name">
<body>The name of the NamedElement.</body>
</ownedComment>
<type xmi:type="uml:PrimitiveType" href=" ../org.eclipse.uml2.source/src/org.eclipse.uml2.uml_2.1.0.v2 00706141134/model/Infrastructure.uml#_3ADC7B74022D3CA010B103 C3 "/>
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="NamedElement-name-_upperValue" value="1"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="NamedElement-name-_lowerValue"/>
</ownedAttribute>
<ownedAttribute xmi:id="NamedElement-qualifiedName" name="qualifiedName" isReadOnly="true" isDerived="true">
<ownedComment xmi:id="NamedElement-qualifiedName-_ownedComment.0" annotatedElement="NamedElement-qualifiedName">
<body>A name which allows the NamedElement to be identified within a hierarchy of nested Namespaces. It is constructed from the names of the containing namespaces starting at the root of the hierarchy and ending with the name of the NamedElement itself.</body>
</ownedComment>
<type xmi:type="uml:PrimitiveType" href=" ../org.eclipse.uml2.source/src/org.eclipse.uml2.uml_2..1.0.v 200706141134/model/Infrastructure.uml#_3ADC7B74022D3CA010B10 3C3 "/>
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="NamedElement-qualifiedName-_upperValue" value="1"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="NamedElement-qualifiedName-_lowerValue"/>
</ownedAttribute>
<ownedAttribute xmi:id="NamedElement-namespace" name="namespace" type="Namespace" isReadOnly="true" isDerived="true" subsettedProperty="Element-owner" association="A_ownedMember_namespace">
<ownedComment xmi:id="NamedElement-namespace-_ownedComment.0" annotatedElement="NamedElement-namespace">
<body>Specifies the namespace that owns the NamedElement.</body>
</ownedComment>
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="NamedElement-namespace-_upperValue" value="1"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="NamedElement-namespace-_lowerValue"/>
</ownedAttribute>
<ownedOperation xmi:id="NamedElement-allNamespaces" name="allNamespaces" isQuery="true" bodyCondition="NamedElement-allNamespaces-spec">
<ownedComment xmi:id="NamedElement-allNamespaces-_ownedComment.0" annotatedElement="NamedElement-allNamespaces">
<body>The query allNamespaces() gives the sequence of namespaces in which the NamedElement is nested, working outwards.</body>
</ownedComment>
<ownedRule xmi:id="NamedElement-allNamespaces-spec" name="spec" constrainedElement="NamedElement-allNamespaces">
<specification xmi:type="uml:OpaqueExpression" xmi:id="NamedElement-allNamespaces-spec-_specification">
<language>OCL</language>
<body>result = if self.namespace->isEmpty()&#xA;then Sequence{}&#xA;else self.namespace.allNamespaces()->prepend(self.namespace)&#xA;endif </body>
</specification>
</ownedRule>
<ownedParameter xmi:id="NamedElement-allNamespaces-_ownedParameter.0" type="Namespace" isOrdered="true" direction="return">
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="NamedElement-allNamespaces-_ownedParameter.0-_upperValue " value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="NamedElement-allNamespaces-_ownedParameter.0-_lowerValue "/>
</ownedParameter>
</ownedOperation>
<ownedOperation xmi:id="NamedElement-isDistinguishableFrom" name="isDistinguishableFrom" isQuery="true" bodyCondition="NamedElement-isDistinguishableFrom-spec">
<ownedComment xmi:id="NamedElement-isDistinguishableFrom-_ownedComment.0" annotatedElement="NamedElement-isDistinguishableFrom">
<body>The query isDistinguishableFrom() determines whether two NamedElements may logically co-exist within a Namespace. By default, two named elements are distinguishable if (a) they have unrelated types or (b) they have related types but different names.</body>
</ownedComment>
<ownedRule xmi:id="NamedElement-isDistinguishableFrom-spec" name="spec" constrainedElement="NamedElement-isDistinguishableFrom">
<specification xmi:type="uml:OpaqueExpression" xmi:id="NamedElement-isDistinguishableFrom-spec-_specification ">
<language>OCL</language>
<body>result = if self.oclIsKindOf(n.oclType) or n.oclIsKindOf(self.oclType)&#xA;then ns.getNamesOfMember(self)->intersection(ns.getNamesOfMember(n))- >isEmpty()&#xA;else true&#xA;endif</body>
</specification>
</ownedRule>
<ownedParameter xmi:id="NamedElement-isDistinguishableFrom-_ownedParameter.0 " direction="return">
<type xmi:type="uml:PrimitiveType" href=" ../org.eclipse.uml2.source/src/org.eclipse.uml2.uml_2.1.0.v2 00706141134/model/Infrastructure.uml#_3ADC7B74022D3CA010AC00 90 "/>
</ownedParameter>
<ownedParameter xmi:id="NamedElement-isDistinguishableFrom-n" name="n" type="NamedElement"/>
<ownedParameter xmi:id="NamedElement-isDistinguishableFrom-ns" name="ns" type="Namespace"/>
</ownedOperation>
<ownedOperation xmi:id="NamedElement-separator" name="separator" isQuery="true" bodyCondition="NamedElement-separator-spec">
<ownedComment xmi:id="NamedElement-separator-_ownedComment.0" annotatedElement="NamedElement-separator">
<body>The query separator() gives the string that is used to separate names when constructing a qualified name.</body>
</ownedComment>
<ownedRule xmi:id="NamedElement-separator-spec" name="spec" constrainedElement="NamedElement-separator">
<specification xmi:type="uml:OpaqueExpression" xmi:id="NamedElement-separator-spec-_specification">
<language>OCL</language>
<body>result = '::'</body>
</specification>
</ownedRule>
<ownedParameter xmi:id="NamedElement-separator-_ownedParameter.0" direction="return">
<type xmi:type="uml:PrimitiveType" href=" ../org.eclipse.uml2.source/src/org.eclipse.uml2.uml_2.1.0.v2 00706141134/model/Infrastructure.uml#_3ADC7B74022D3CA010B103 C3 "/>
</ownedParameter>
</ownedOperation>
<ownedOperation xmi:id="NamedElement-qualifiedName.1" name="qualifiedName" isQuery="true" bodyCondition="NamedElement-qualifiedName.1-spe
Re: errors while metamodeling [message #475578 is a reply to message #475571] Fri, 31 August 2007 14:31 Go to previous messageGo to next message
Manar El-Kady is currently offline Manar El-KadyFriend
Messages: 78
Registered: July 2009
Member
I discovered that I must obtain the OCL pugins that are used in the
generated code. So, After I installed it, the remaining errors are "The
string literal is not closed by a double-qoute " in all the OCL
expressions For example,

protected static final String ALL_NAMESPACES__EOCL_EXP = "result = if
self.namespace->isEmpty()
then Sequence{}
else self.namespace.allNamespaces()->prepend(self.namespace)
endif";

that I corrected to

protected static final String ALL_NAMESPACES__EOCL_EXP = "result = if
self.namespace->isEmpty(" +
"then Sequence{}" +
"else self.namespace.allNamespaces()->prepend(self.namespace)" +
"endif";


After correcting all the invalid OCL expression, there are unresolved
types errors for createUnlimitedNaturalFromString, and UnlimitedNatural,
which I can't solve.

I used eclipse, emf, and UML2 version RC3, and OCL mdt-ocl-runtime-1.1.zip


Manar



Manar El-Kady wrote:
> Kenn,
> Attached, you can find the model after applying the package merge and
> another one before applying the package merge.
>
>
> Manar,
>
>
> Kenn Hussey wrote:
>> Manar,
>>
>> I was wondering what kind of relationships there are between your
>> merged model (i.e. after selecting UML Editor > Package > Merge...)
>> and the other source models (Infrastructure, Superstructure). Ideally,
>> after the merge, your model should have no lingering dependencies on
>> any other model, otherwise you'll need to implement (pieces of it)
>> yourself... Again, if you want to attach your model we could try to
>> see what is going wrong...
>>
>> Kenn
>>
>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>> news:fb3fj7$v3e$1@build.eclipse.org...
>>> Kenn,
>>>
>>> I didn't understand what do you mean exactly. After applying the
>>> package merge I didn't find any import in the resulting package to
>>> merge it to my metamodel, is it what do you mean?
>>>
>>>
>>> Manar,
>>>
>>>
>>>
>>> Kenn Hussey wrote:
>>>> Manar,
>>>>
>>>> After you merge these packages, are there remaining references to
>>>> elements in them? For example, if you perform the package merge,
>>>> save the model, and inspect the serialization, to you see lingering
>>>> references to InfrastructureLibrary.uml?
>>>>
>>>> Kenn
>>>>
>>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>>>> news:famqhn$gnk$1@build.eclipse.org...
>>>>> Kenn,
>>>>>
>>>>> Firstly, I merge the PrimitiveTypes, BehavioralFeatures,
>>>>> StructuralFeatures, Relationships packages, which I use directly.
>>>>> After that I add a merge for the Classifiers, TypedElements,
>>>>> Namespaces, and Elements packages, which Imported by the packages
>>>>> that I use. In both cases the same errors happened.
>>>>>
>>>>>
>>>>>
>>>>> Manar
>>>>>
>>>>>
>>>>> Kenn Hussey wrote:
>>>>>> Manar,
>>>>>>
>>>>>> Are you sure you are merging all packages from Abstractions that
>>>>>> are directly or indirectly referenced from elements in your domain
>>>>>> (e.g. as types, superclasses, etc.)?
>>>>>>
>>>>>> Kenn
>>>>>>
>>>>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>>>>>> news:fama83$ahr$1@build.eclipse.org...
>>>>>>> Kenn,
>>>>>>>
>>>>>>> I did a package merge instead of a package import. Validation
>>>>>>> before applying the package merge was done successfully. But,
>>>>>>> after applying the package merge and validating the metamodel,
>>>>>>> the validation get the same error as before.
>>>>>>>
>>>>>>> While generating the code, still there is an obligation to
>>>>>>> generate code for the abstractionLibrary package. Moreover, the
>>>>>>> generated code has errors ?
>>>>>>>
>>>>>>> Is there a mistake while referring to the InfrastructureLibrary
>>>>>>> package? or what?
>>>>>>>
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Manar
>>>>>>>
>>>>>>>
>>>>>>> Kenn Hussey wrote:
>>>>>>>> Manar,
>>>>>>>>
>>>>>>>> Sorry for the delayed response. See answers below.
>>>>>>>>
>>>>>>>> Kenn
>>>>>>>>
>>>>>>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>>>>>>>> news:fabvhl$k6f$1@build.eclipse.org...
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> I build a metamodel as a heavyweight extension.I do the
>>>>>>>>> following steps:
>>>>>>>>> - create an empty UML model
>>>>>>>>> - convert the model to a metamodel
>>>>>>>>> - apply the ecore profile, and then apply the epackage
>>>>>>>>> stereotype to the
>>>>>>>>> root model element
>>>>>>>>> - add some elements for the metamodel
>>>>>>>>> - merge the primitive types package
>>>>>>>>> - add the infrastructure.uml as a resource to my metamodel
>>>>>>>>> (Note: I added it by using the editor. I added it from a
>>>>>>>>> project in my workspace that containing
>>>>>>>>> platform:/resource/org.eclipse.uml2.source\src\org.eclipse.u ml2.uml_2.1.0.v200706141134\model\Infrastructure.uml)
>>>>>>>>>
>>>>>>>>> - While creating the elements of the metamodels I extended
>>>>>>>>> classes from the subpackages of the Abstractions package. So, I
>>>>>>>>> imported the packages that containing the classes which I extend.
>>>>>>>>> - finally I apply the package merge, and convert it again to a
>>>>>>>>> metamodel.
>>>>>>>>>
>>>>>>>>> My questions are:
>>>>>>>>> - After these steps I did a validation, and an error occur "
>>>>>>>>> Not all the members of a namespace'<<metamodel, ePackage>>
>>>>>>>>> <Model> MAS-UML' are distinguishable within it." ??
>>>>>>>>>
>>>>>>>> These warnings can usually be ignored. I suspect it's
>>>>>>>> complaining about the primitive types, i.e. that names like
>>>>>>>> 'Integer' exist both as owned members in your merged package,
>>>>>>>> and as members directly or indirecty imported from another
>>>>>>>> namespace. However, the package imports will be troublesome -
>>>>>>>> see below.
>>>>>>>>
>>>>>>>>> - I tried to do these steps without doing package import and I
>>>>>>>>> didn't notice any difference or errors happened. so, what is
>>>>>>>>> the need for doing a package import in a metamodeling?
>>>>>>>>>
>>>>>>>> Strictly speaking, you don't _need_ package imports.
>>>>>>>> Semantically, all they do is allow you to refer to a named
>>>>>>>> element without using its qualified name. Is is, however, good
>>>>>>>> practice to declare your dependencies this way...
>>>>>>>>
>>>>>>>>> - After creating the metamodel I create an EMF project for code
>>>>>>>>> generation. Here, I obligated to generate code for the
>>>>>>>>> infrastructureLibrary package, which I didn't need. Why that?
>>>>>>>>>
>>>>>>>> Well, after a merge, you shouldn't have any lingering
>>>>>>>> dependencies on other packages such as ones in
>>>>>>>> InfrastructureLibrary. Since UML2 does not provide an
>>>>>>>> implementation of InfrastructureLibrary on its own, you'll need
>>>>>>>> to implement it yourself. However, I would recommend _merging_
>>>>>>>> the packages from Abstractions that contain the types you are
>>>>>>>> extending rather than importing them. That way, you will be
>>>>>>>> implementing the types within your own (heavyweight) namespace
>>>>>>>> and the imports won't linger (and hence the namespace warnings
>>>>>>>> would go away).
>>>>>>>>
>>>>>>>>> - After the code generation, there are some errors in the
>>>>>>>>> generated code for the infrastructureLibrary package and for my
>>>>>>>>> metamodel code. all the errors in the impl files and said that
>>>>>>>>> xxx cannot be resolved??
>>>>>>>>>
>>>>>>>> Without knowing more about the errors, it's hard to say how to
>>>>>>>> fix them, but I suspect that if you ensure that everything from
>>>>>>>> UML that you need gets merged into your domain, and that you
>>>>>>>> reference existing implementations of things that aren't in your
>>>>>>>> domain, you'll be better off...
>>>>>>>>
>>>>>>>>> Sorry for this long mail, and thanks in advance.
>>>>>>>>>
>>>>>>>>> Manar
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> I applied the epackage
>>>>>>>>> stereotype to the root element, merged the primitive types
>>>>>>>>> package, and
>>>>>>>>> import some sub-packaged from the the Abstractions package
>>>>>>>>>
>>
>
Re: errors while metamodeling [message #475775 is a reply to message #475578] Wed, 05 September 2007 19:06 Go to previous messageGo to next message
Manar El-Kady is currently offline Manar El-KadyFriend
Messages: 78
Registered: July 2009
Member
Hi,

I am waiting for reply to my post. Anyone can help me?

Manar,


Manar El-Kady wrote:
>
> I discovered that I must obtain the OCL pugins that are used in the
> generated code. So, After I installed it, the remaining errors are "The
> string literal is not closed by a double-qoute " in all the OCL
> expressions For example,
>
> protected static final String ALL_NAMESPACES__EOCL_EXP = "result = if
> self.namespace->isEmpty()
> then Sequence{}
> else self.namespace.allNamespaces()->prepend(self.namespace)
> endif";
>
> that I corrected to
>
> protected static final String ALL_NAMESPACES__EOCL_EXP = "result = if
> self.namespace->isEmpty(" +
> "then Sequence{}" +
> "else self.namespace.allNamespaces()->prepend(self.namespace)" +
> "endif";
>
>
> After correcting all the invalid OCL expression, there are unresolved
> types errors for createUnlimitedNaturalFromString, and UnlimitedNatural,
> which I can't solve.
>
> I used eclipse, emf, and UML2 version RC3, and OCL mdt-ocl-runtime-1.1.zip
>
>
> Manar
>
>
>
> Manar El-Kady wrote:
>> Kenn,
>> Attached, you can find the model after applying the package merge and
>> another one before applying the package merge.
>>
>>
>> Manar,
>>
>>
>> Kenn Hussey wrote:
>>> Manar,
>>>
>>> I was wondering what kind of relationships there are between your
>>> merged model (i.e. after selecting UML Editor > Package > Merge...)
>>> and the other source models (Infrastructure, Superstructure).
>>> Ideally, after the merge, your model should have no lingering
>>> dependencies on any other model, otherwise you'll need to implement
>>> (pieces of it) yourself... Again, if you want to attach your model we
>>> could try to see what is going wrong...
>>>
>>> Kenn
>>>
>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>>> news:fb3fj7$v3e$1@build.eclipse.org...
>>>> Kenn,
>>>>
>>>> I didn't understand what do you mean exactly. After applying the
>>>> package merge I didn't find any import in the resulting package to
>>>> merge it to my metamodel, is it what do you mean?
>>>>
>>>>
>>>> Manar,
>>>>
>>>>
>>>>
>>>> Kenn Hussey wrote:
>>>>> Manar,
>>>>>
>>>>> After you merge these packages, are there remaining references to
>>>>> elements in them? For example, if you perform the package merge,
>>>>> save the model, and inspect the serialization, to you see lingering
>>>>> references to InfrastructureLibrary.uml?
>>>>>
>>>>> Kenn
>>>>>
>>>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>>>>> news:famqhn$gnk$1@build.eclipse.org...
>>>>>> Kenn,
>>>>>>
>>>>>> Firstly, I merge the PrimitiveTypes, BehavioralFeatures,
>>>>>> StructuralFeatures, Relationships packages, which I use directly.
>>>>>> After that I add a merge for the Classifiers, TypedElements,
>>>>>> Namespaces, and Elements packages, which Imported by the packages
>>>>>> that I use. In both cases the same errors happened.
>>>>>>
>>>>>>
>>>>>>
>>>>>> Manar
>>>>>>
>>>>>>
>>>>>> Kenn Hussey wrote:
>>>>>>> Manar,
>>>>>>>
>>>>>>> Are you sure you are merging all packages from Abstractions that
>>>>>>> are directly or indirectly referenced from elements in your
>>>>>>> domain (e.g. as types, superclasses, etc.)?
>>>>>>>
>>>>>>> Kenn
>>>>>>>
>>>>>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>>>>>>> news:fama83$ahr$1@build.eclipse.org...
>>>>>>>> Kenn,
>>>>>>>>
>>>>>>>> I did a package merge instead of a package import. Validation
>>>>>>>> before applying the package merge was done successfully. But,
>>>>>>>> after applying the package merge and validating the metamodel,
>>>>>>>> the validation get the same error as before.
>>>>>>>>
>>>>>>>> While generating the code, still there is an obligation to
>>>>>>>> generate code for the abstractionLibrary package. Moreover, the
>>>>>>>> generated code has errors ?
>>>>>>>>
>>>>>>>> Is there a mistake while referring to the InfrastructureLibrary
>>>>>>>> package? or what?
>>>>>>>>
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Manar
>>>>>>>>
>>>>>>>>
>>>>>>>> Kenn Hussey wrote:
>>>>>>>>> Manar,
>>>>>>>>>
>>>>>>>>> Sorry for the delayed response. See answers below.
>>>>>>>>>
>>>>>>>>> Kenn
>>>>>>>>>
>>>>>>>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>>>>>>>>> news:fabvhl$k6f$1@build.eclipse.org...
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> I build a metamodel as a heavyweight extension.I do the
>>>>>>>>>> following steps:
>>>>>>>>>> - create an empty UML model
>>>>>>>>>> - convert the model to a metamodel
>>>>>>>>>> - apply the ecore profile, and then apply the epackage
>>>>>>>>>> stereotype to the
>>>>>>>>>> root model element
>>>>>>>>>> - add some elements for the metamodel
>>>>>>>>>> - merge the primitive types package
>>>>>>>>>> - add the infrastructure.uml as a resource to my metamodel
>>>>>>>>>> (Note: I added it by using the editor. I added it from a
>>>>>>>>>> project in my workspace that containing
>>>>>>>>>> platform:/resource/org.eclipse.uml2.source\src\org.eclipse.u ml2.uml_2.1.0.v200706141134\model\Infrastructure.uml)
>>>>>>>>>>
>>>>>>>>>> - While creating the elements of the metamodels I extended
>>>>>>>>>> classes from the subpackages of the Abstractions package. So,
>>>>>>>>>> I imported the packages that containing the classes which I
>>>>>>>>>> extend.
>>>>>>>>>> - finally I apply the package merge, and convert it again to a
>>>>>>>>>> metamodel.
>>>>>>>>>>
>>>>>>>>>> My questions are:
>>>>>>>>>> - After these steps I did a validation, and an error occur "
>>>>>>>>>> Not all the members of a namespace'<<metamodel, ePackage>>
>>>>>>>>>> <Model> MAS-UML' are distinguishable within it." ??
>>>>>>>>>>
>>>>>>>>> These warnings can usually be ignored. I suspect it's
>>>>>>>>> complaining about the primitive types, i.e. that names like
>>>>>>>>> 'Integer' exist both as owned members in your merged package,
>>>>>>>>> and as members directly or indirecty imported from another
>>>>>>>>> namespace. However, the package imports will be troublesome -
>>>>>>>>> see below.
>>>>>>>>>
>>>>>>>>>> - I tried to do these steps without doing package import and I
>>>>>>>>>> didn't notice any difference or errors happened. so, what is
>>>>>>>>>> the need for doing a package import in a metamodeling?
>>>>>>>>>>
>>>>>>>>> Strictly speaking, you don't _need_ package imports.
>>>>>>>>> Semantically, all they do is allow you to refer to a named
>>>>>>>>> element without using its qualified name. Is is, however, good
>>>>>>>>> practice to declare your dependencies this way...
>>>>>>>>>
>>>>>>>>>> - After creating the metamodel I create an EMF project for
>>>>>>>>>> code generation. Here, I obligated to generate code for the
>>>>>>>>>> infrastructureLibrary package, which I didn't need. Why that?
>>>>>>>>>>
>>>>>>>>> Well, after a merge, you shouldn't have any lingering
>>>>>>>>> dependencies on other packages such as ones in
>>>>>>>>> InfrastructureLibrary. Since UML2 does not provide an
>>>>>>>>> implementation of InfrastructureLibrary on its own, you'll need
>>>>>>>>> to implement it yourself. However, I would recommend _merging_
>>>>>>>>> the packages from Abstractions that contain the types you are
>>>>>>>>> extending rather than importing them. That way, you will be
>>>>>>>>> implementing the types within your own (heavyweight) namespace
>>>>>>>>> and the imports won't linger (and hence the namespace warnings
>>>>>>>>> would go away).
>>>>>>>>>
>>>>>>>>>> - After the code generation, there are some errors in the
>>>>>>>>>> generated code for the infrastructureLibrary package and for
>>>>>>>>>> my metamodel code. all the errors in the impl files and said
>>>>>>>>>> that xxx cannot be resolved??
>>>>>>>>>>
>>>>>>>>> Without knowing more about the errors, it's hard to say how to
>>>>>>>>> fix them, but I suspect that if you ensure that everything from
>>>>>>>>> UML that you need gets merged into your domain, and that you
>>>>>>>>> reference existing implementations of things that aren't in
>>>>>>>>> your domain, you'll be better off...
>>>>>>>>>
>>>>>>>>>> Sorry for this long mail, and thanks in advance.
>>>>>>>>>>
>>>>>>>>>> Manar
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> I applied the epackage
>>>>>>>>>> stereotype to the root element, merged the primitive types
>>>>>>>>>> package, and
>>>>>>>>>> import some sub-packaged from the the Abstractions package
>>>>>>>>>>
>>>
>>
Re: errors while metamodeling [message #475781 is a reply to message #475775] Thu, 06 September 2007 13:22 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Manar,

I'll have a look at your model and get back to you.

- James.


"Manar El-Kady" <manar.elkady@gmail.com> wrote in message
news:fbmuob$4d5$1@build.eclipse.org...
> Hi,
>
> I am waiting for reply to my post. Anyone can help me?
>
> Manar,
>
>
> Manar El-Kady wrote:
> >
> > I discovered that I must obtain the OCL pugins that are used in the
> > generated code. So, After I installed it, the remaining errors are "The
> > string literal is not closed by a double-qoute " in all the OCL
> > expressions For example,
> >
> > protected static final String ALL_NAMESPACES__EOCL_EXP = "result = if
> > self.namespace->isEmpty()
> > then Sequence{}
> > else self.namespace.allNamespaces()->prepend(self.namespace)
> > endif";
> >
> > that I corrected to
> >
> > protected static final String ALL_NAMESPACES__EOCL_EXP = "result = if
> > self.namespace->isEmpty(" +
> > "then Sequence{}" +
> > "else self.namespace.allNamespaces()->prepend(self.namespace)" +
> > "endif";
> >
> >
> > After correcting all the invalid OCL expression, there are unresolved
> > types errors for createUnlimitedNaturalFromString, and UnlimitedNatural,
> > which I can't solve.
> >
> > I used eclipse, emf, and UML2 version RC3, and OCL
mdt-ocl-runtime-1.1.zip
> >
> >
> > Manar
> >
> >
> >
> > Manar El-Kady wrote:
> >> Kenn,
> >> Attached, you can find the model after applying the package merge and
> >> another one before applying the package merge.
> >>
> >>
> >> Manar,
> >>
> >>
> >> Kenn Hussey wrote:
> >>> Manar,
> >>>
> >>> I was wondering what kind of relationships there are between your
> >>> merged model (i.e. after selecting UML Editor > Package > Merge...)
> >>> and the other source models (Infrastructure, Superstructure).
> >>> Ideally, after the merge, your model should have no lingering
> >>> dependencies on any other model, otherwise you'll need to implement
> >>> (pieces of it) yourself... Again, if you want to attach your model we
> >>> could try to see what is going wrong...
> >>>
> >>> Kenn
> >>>
> >>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
> >>> news:fb3fj7$v3e$1@build.eclipse.org...
> >>>> Kenn,
> >>>>
> >>>> I didn't understand what do you mean exactly. After applying the
> >>>> package merge I didn't find any import in the resulting package to
> >>>> merge it to my metamodel, is it what do you mean?
> >>>>
> >>>>
> >>>> Manar,
> >>>>
> >>>>
> >>>>
> >>>> Kenn Hussey wrote:
> >>>>> Manar,
> >>>>>
> >>>>> After you merge these packages, are there remaining references to
> >>>>> elements in them? For example, if you perform the package merge,
> >>>>> save the model, and inspect the serialization, to you see lingering
> >>>>> references to InfrastructureLibrary.uml?
> >>>>>
> >>>>> Kenn
> >>>>>
> >>>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
> >>>>> news:famqhn$gnk$1@build.eclipse.org...
> >>>>>> Kenn,
> >>>>>>
> >>>>>> Firstly, I merge the PrimitiveTypes, BehavioralFeatures,
> >>>>>> StructuralFeatures, Relationships packages, which I use directly.
> >>>>>> After that I add a merge for the Classifiers, TypedElements,
> >>>>>> Namespaces, and Elements packages, which Imported by the packages
> >>>>>> that I use. In both cases the same errors happened.
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> Manar
> >>>>>>
> >>>>>>
> >>>>>> Kenn Hussey wrote:
> >>>>>>> Manar,
> >>>>>>>
> >>>>>>> Are you sure you are merging all packages from Abstractions that
> >>>>>>> are directly or indirectly referenced from elements in your
> >>>>>>> domain (e.g. as types, superclasses, etc.)?
> >>>>>>>
> >>>>>>> Kenn
> >>>>>>>
> >>>>>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
> >>>>>>> news:fama83$ahr$1@build.eclipse.org...
> >>>>>>>> Kenn,
> >>>>>>>>
> >>>>>>>> I did a package merge instead of a package import. Validation
> >>>>>>>> before applying the package merge was done successfully. But,
> >>>>>>>> after applying the package merge and validating the metamodel,
> >>>>>>>> the validation get the same error as before.
> >>>>>>>>
> >>>>>>>> While generating the code, still there is an obligation to
> >>>>>>>> generate code for the abstractionLibrary package. Moreover, the
> >>>>>>>> generated code has errors ?
> >>>>>>>>
> >>>>>>>> Is there a mistake while referring to the InfrastructureLibrary
> >>>>>>>> package? or what?
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> Thanks,
> >>>>>>>> Manar
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> Kenn Hussey wrote:
> >>>>>>>>> Manar,
> >>>>>>>>>
> >>>>>>>>> Sorry for the delayed response. See answers below.
> >>>>>>>>>
> >>>>>>>>> Kenn
> >>>>>>>>>
> >>>>>>>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
> >>>>>>>>> news:fabvhl$k6f$1@build.eclipse.org...
> >>>>>>>>>> Hi,
> >>>>>>>>>>
> >>>>>>>>>> I build a metamodel as a heavyweight extension.I do the
> >>>>>>>>>> following steps:
> >>>>>>>>>> - create an empty UML model
> >>>>>>>>>> - convert the model to a metamodel
> >>>>>>>>>> - apply the ecore profile, and then apply the epackage
> >>>>>>>>>> stereotype to the
> >>>>>>>>>> root model element
> >>>>>>>>>> - add some elements for the metamodel
> >>>>>>>>>> - merge the primitive types package
> >>>>>>>>>> - add the infrastructure.uml as a resource to my metamodel
> >>>>>>>>>> (Note: I added it by using the editor. I added it from a
> >>>>>>>>>> project in my workspace that containing
> >>>>>>>>>>
platform:/resource/org.eclipse.uml2.source\src\org.eclipse.u ml2.uml_2.1.0.v2
00706141134\model\Infrastructure.uml)
> >>>>>>>>>>
> >>>>>>>>>> - While creating the elements of the metamodels I extended
> >>>>>>>>>> classes from the subpackages of the Abstractions package. So,
> >>>>>>>>>> I imported the packages that containing the classes which I
> >>>>>>>>>> extend.
> >>>>>>>>>> - finally I apply the package merge, and convert it again to a
> >>>>>>>>>> metamodel.
> >>>>>>>>>>
> >>>>>>>>>> My questions are:
> >>>>>>>>>> - After these steps I did a validation, and an error occur "
> >>>>>>>>>> Not all the members of a namespace'<<metamodel, ePackage>>
> >>>>>>>>>> <Model> MAS-UML' are distinguishable within it." ??
> >>>>>>>>>>
> >>>>>>>>> These warnings can usually be ignored. I suspect it's
> >>>>>>>>> complaining about the primitive types, i.e. that names like
> >>>>>>>>> 'Integer' exist both as owned members in your merged package,
> >>>>>>>>> and as members directly or indirecty imported from another
> >>>>>>>>> namespace. However, the package imports will be troublesome -
> >>>>>>>>> see below.
> >>>>>>>>>
> >>>>>>>>>> - I tried to do these steps without doing package import and I
> >>>>>>>>>> didn't notice any difference or errors happened. so, what is
> >>>>>>>>>> the need for doing a package import in a metamodeling?
> >>>>>>>>>>
> >>>>>>>>> Strictly speaking, you don't _need_ package imports.
> >>>>>>>>> Semantically, all they do is allow you to refer to a named
> >>>>>>>>> element without using its qualified name. Is is, however, good
> >>>>>>>>> practice to declare your dependencies this way...
> >>>>>>>>>
> >>>>>>>>>> - After creating the metamodel I create an EMF project for
> >>>>>>>>>> code generation. Here, I obligated to generate code for the
> >>>>>>>>>> infrastructureLibrary package, which I didn't need. Why that?
> >>>>>>>>>>
> >>>>>>>>> Well, after a merge, you shouldn't have any lingering
> >>>>>>>>> dependencies on other packages such as ones in
> >>>>>>>>> InfrastructureLibrary. Since UML2 does not provide an
> >>>>>>>>> implementation of InfrastructureLibrary on its own, you'll need
> >>>>>>>>> to implement it yourself. However, I would recommend _merging_
> >>>>>>>>> the packages from Abstractions that contain the types you are
> >>>>>>>>> extending rather than importing them. That way, you will be
> >>>>>>>>> implementing the types within your own (heavyweight) namespace
> >>>>>>>>> and the imports won't linger (and hence the namespace warnings
> >>>>>>>>> would go away).
> >>>>>>>>>
> >>>>>>>>>> - After the code generation, there are some errors in the
> >>>>>>>>>> generated code for the infrastructureLibrary package and for
> >>>>>>>>>> my metamodel code. all the errors in the impl files and said
> >>>>>>>>>> that xxx cannot be resolved??
> >>>>>>>>>>
> >>>>>>>>> Without knowing more about the errors, it's hard to say how to
> >>>>>>>>> fix them, but I suspect that if you ensure that everything from
> >>>>>>>>> UML that you need gets merged into your domain, and that you
> >>>>>>>>> reference existing implementations of things that aren't in
> >>>>>>>>> your domain, you'll be better off...
> >>>>>>>>>
> >>>>>>>>>> Sorry for this long mail, and thanks in advance.
> >>>>>>>>>>
> >>>>>>>>>> Manar
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>> I applied the epackage
> >>>>>>>>>> stereotype to the root element, merged the primitive types
> >>>>>>>>>> package, and
> >>>>>>>>>> import some sub-packaged from the the Abstractions package
> >>>>>>>>>>
> >>>
> >>
Re: errors while metamodeling [message #475850 is a reply to message #475570] Mon, 10 September 2007 17:40 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
It looks like the merged model still has "lingering" references to
Infrastructure etc.
For example, MAS_UML3.uml still has hrefs such as ...
<generalization xmi:id="AgentType-_generalization.0">

<general xmi:type="uml:Class"
href=" ../org.eclipse.uml2.source/src/org.eclipse.uml2.uml_2.1.0.v2 00706141134/model/Infrastructure.uml#_3ADC7B74022D3CA00A2A01 8F "/>

</generalization>


- James.

"Kenn Hussey" <Kenn.Hussey@embarcadero.com> wrote in message
news:fb70ub$oha$1@build.eclipse.org...
> Manar,
>
> I was wondering what kind of relationships there are between your merged
> model (i.e. after selecting UML Editor > Package > Merge...) and the other
> source models (Infrastructure, Superstructure). Ideally, after the merge,
> your model should have no lingering dependencies on any other model,
> otherwise you'll need to implement (pieces of it) yourself... Again, if
> you want to attach your model we could try to see what is going wrong...
>
> Kenn
>
> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
> news:fb3fj7$v3e$1@build.eclipse.org...
>> Kenn,
>>
>> I didn't understand what do you mean exactly. After applying the package
>> merge I didn't find any import in the resulting package to merge it to my
>> metamodel, is it what do you mean?
>>
>>
>> Manar,
>>
>>
>>
>> Kenn Hussey wrote:
>>> Manar,
>>>
>>> After you merge these packages, are there remaining references to
>>> elements in them? For example, if you perform the package merge, save
>>> the model, and inspect the serialization, to you see lingering
>>> references to InfrastructureLibrary.uml?
>>>
>>> Kenn
>>>
>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>>> news:famqhn$gnk$1@build.eclipse.org...
>>>> Kenn,
>>>>
>>>> Firstly, I merge the PrimitiveTypes, BehavioralFeatures,
>>>> StructuralFeatures, Relationships packages, which I use directly. After
>>>> that I add a merge for the Classifiers, TypedElements, Namespaces, and
>>>> Elements packages, which Imported by the packages that I use. In both
>>>> cases the same errors happened.
>>>>
>>>>
>>>>
>>>> Manar
>>>>
>>>>
>>>> Kenn Hussey wrote:
>>>>> Manar,
>>>>>
>>>>> Are you sure you are merging all packages from Abstractions that are
>>>>> directly or indirectly referenced from elements in your domain (e.g.
>>>>> as types, superclasses, etc.)?
>>>>>
>>>>> Kenn
>>>>>
>>>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>>>>> news:fama83$ahr$1@build.eclipse.org...
>>>>>> Kenn,
>>>>>>
>>>>>> I did a package merge instead of a package import. Validation before
>>>>>> applying the package merge was done successfully. But, after applying
>>>>>> the package merge and validating the metamodel, the validation get
>>>>>> the same error as before.
>>>>>>
>>>>>> While generating the code, still there is an obligation to generate
>>>>>> code for the abstractionLibrary package. Moreover, the generated code
>>>>>> has errors ?
>>>>>>
>>>>>> Is there a mistake while referring to the InfrastructureLibrary
>>>>>> package? or what?
>>>>>>
>>>>>>
>>>>>> Thanks,
>>>>>> Manar
>>>>>>
>>>>>>
>>>>>> Kenn Hussey wrote:
>>>>>>> Manar,
>>>>>>>
>>>>>>> Sorry for the delayed response. See answers below.
>>>>>>>
>>>>>>> Kenn
>>>>>>>
>>>>>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>>>>>>> news:fabvhl$k6f$1@build.eclipse.org...
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I build a metamodel as a heavyweight extension.I do the following
>>>>>>>> steps:
>>>>>>>> - create an empty UML model
>>>>>>>> - convert the model to a metamodel
>>>>>>>> - apply the ecore profile, and then apply the epackage stereotype
>>>>>>>> to the
>>>>>>>> root model element
>>>>>>>> - add some elements for the metamodel
>>>>>>>> - merge the primitive types package
>>>>>>>> - add the infrastructure.uml as a resource to my metamodel (Note: I
>>>>>>>> added it by using the editor. I added it from a project in my
>>>>>>>> workspace that containing
>>>>>>>> platform:/resource/org.eclipse.uml2.source\src\org.eclipse.u ml2.uml_2.1.0.v200706141134\model\Infrastructure.uml)
>>>>>>>> - While creating the elements of the metamodels I extended classes
>>>>>>>> from the subpackages of the Abstractions package. So, I imported
>>>>>>>> the packages that containing the classes which I extend.
>>>>>>>> - finally I apply the package merge, and convert it again to a
>>>>>>>> metamodel.
>>>>>>>>
>>>>>>>> My questions are:
>>>>>>>> - After these steps I did a validation, and an error occur " Not
>>>>>>>> all the members of a namespace'<<metamodel, ePackage>> <Model>
>>>>>>>> MAS-UML' are distinguishable within it." ??
>>>>>>>>
>>>>>>> These warnings can usually be ignored. I suspect it's complaining
>>>>>>> about the primitive types, i.e. that names like 'Integer' exist both
>>>>>>> as owned members in your merged package, and as members directly or
>>>>>>> indirecty imported from another namespace. However, the package
>>>>>>> imports will be troublesome - see below.
>>>>>>>
>>>>>>>> - I tried to do these steps without doing package import and I
>>>>>>>> didn't notice any difference or errors happened. so, what is the
>>>>>>>> need for doing a package import in a metamodeling?
>>>>>>>>
>>>>>>> Strictly speaking, you don't _need_ package imports. Semantically,
>>>>>>> all they do is allow you to refer to a named element without using
>>>>>>> its qualified name. Is is, however, good practice to declare your
>>>>>>> dependencies this way...
>>>>>>>
>>>>>>>> - After creating the metamodel I create an EMF project for code
>>>>>>>> generation. Here, I obligated to generate code for the
>>>>>>>> infrastructureLibrary package, which I didn't need. Why that?
>>>>>>>>
>>>>>>> Well, after a merge, you shouldn't have any lingering dependencies
>>>>>>> on other packages such as ones in InfrastructureLibrary. Since UML2
>>>>>>> does not provide an implementation of InfrastructureLibrary on its
>>>>>>> own, you'll need to implement it yourself. However, I would
>>>>>>> recommend _merging_ the packages from Abstractions that contain the
>>>>>>> types you are extending rather than importing them. That way, you
>>>>>>> will be implementing the types within your own (heavyweight)
>>>>>>> namespace and the imports won't linger (and hence the namespace
>>>>>>> warnings would go away).
>>>>>>>
>>>>>>>> - After the code generation, there are some errors in the generated
>>>>>>>> code for the infrastructureLibrary package and for my metamodel
>>>>>>>> code. all the errors in the impl files and said that xxx cannot be
>>>>>>>> resolved??
>>>>>>>>
>>>>>>> Without knowing more about the errors, it's hard to say how to fix
>>>>>>> them, but I suspect that if you ensure that everything from UML that
>>>>>>> you need gets merged into your domain, and that you reference
>>>>>>> existing implementations of things that aren't in your domain,
>>>>>>> you'll be better off...
>>>>>>>
>>>>>>>> Sorry for this long mail, and thanks in advance.
>>>>>>>>
>>>>>>>> Manar
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> I applied the epackage
>>>>>>>> stereotype to the root element, merged the primitive types package,
>>>>>>>> and
>>>>>>>> import some sub-packaged from the the Abstractions package
>>>>>>>>
>>>
>
Re: errors while metamodeling [message #624423 is a reply to message #475140] Mon, 20 August 2007 12:20 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------000504070401020309090206
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Manar,

Comments below.


Manar El-Kady wrote:
> Hi,
>
> I build a metamodel as a heavyweight extension.I do the following steps:
> - create an empty UML model
> - convert the model to a metamodel
> - apply the ecore profile, and then apply the epackage stereotype to the
> root model element
> - add some elements for the metamodel
> - merge the primitive types package
> - add the infrastructure.uml as a resource to my metamodel (Note: I
> added it by using the editor. I added it from a project in my
> workspace that containing
> platform:/resource/org.eclipse.uml2.source\src\org.eclipse.u ml2.uml_2.1.0.v200706141134\model\Infrastructure.uml)
>
I think you should have loaded it using

platform:/plugin/org.eclipse.uml2.uml/model/Infrastructure.u ml

Don't ever use "\" in a URI since it's treated as just an ordinary
character like "_" not like "/".
> - While creating the elements of the metamodels I extended classes
> from the subpackages of the Abstractions package. So, I imported the
> packages that containing the classes which I extend.
> - finally I apply the package merge, and convert it again to a metamodel.
>
> My questions are:
> - After these steps I did a validation, and an error occur " Not all
> the members of a namespace'<<metamodel, ePackage>> <Model> MAS-UML'
> are distinguishable within it." ??
I'm not sure, but it sounds like you have multiple versions of the same
model, which could be caused by the problem above where you load the
model with one URI, there are other references to this model using a
different URI.
>
> - I tried to do these steps without doing package import and I didn't
> notice any difference or errors happened. so, what is the need for
> doing a package import in a metamodeling?
>
> - After creating the metamodel I create an EMF project for code
> generation. Here, I obligated to generate code for the
> infrastructureLibrary package, which I didn't need. Why that?
In the final step of the wizard, you need to specify a GenModel for any
packages that already exist and you don't want to generate yourself but
rather want to reuse an existing generated model.
>
> - After the code generation, there are some errors in the generated
> code for the infrastructureLibrary package and for my metamodel code.
> all the errors in the impl files and said that xxx cannot be resolved??
I'm sure you'll need to specify a dependency on the UML2 model in the
final step of the wizard if you are trying to extend that model. Note
that once the plugin.xml and MANIFEST.MF exist, they won't be
regenerated unless you delete them, so even fixing the problems above
won't fix these files unless you delete them before you generate.
>
>
> Sorry for this long mail, and thanks in advance.
>
> Manar
>
>
>
>
>
>
>
>
>
>
> I applied the epackage
> stereotype to the root element, merged the primitive types package, and
> import some sub-packaged from the the Abstractions package
>


--------------000504070401020309090206
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Manar,<br>
<br>
Comments below. <br>
<br>
<br>
Manar El-Kady wrote:
<blockquote cite="mid:fabvhl$k6f$1@build.eclipse.org" type="cite">Hi,
<br>
<br>
I build a metamodel as a heavyweight extension.I do the following
steps:
<br>
- create an empty UML model
<br>
- convert the model to a metamodel
<br>
- apply the ecore profile, and then apply the epackage stereotype to
the
<br>
root model element
<br>
- add some elements for the metamodel
<br>
- merge the primitive types package
<br>
- add the infrastructure.uml as a resource to my metamodel (Note: I
added it by using the editor. I added it from a project in my workspace
that containing
platform:/resource/org.eclipse.uml2.source\src\org.eclipse.u ml2.uml_2.1.0.v200706141134\model\Infrastructure.uml)
<br>
</blockquote>
I think you should have loaded it using<br>
<blockquote> platform:/plugin/org.eclipse.uml2.uml/model/Infrastructure.u ml <br>
</blockquote>
Don't ever use "\" in a URI since it's treated as just an ordinary
character like "_" not like "/".<br>
<blockquote cite="mid:fabvhl$k6f$1@build.eclipse.org" type="cite">-
While creating the elements of the metamodels I extended classes from
the subpackages of the Abstractions package. So, I imported the
packages that containing the classes which I extend.
<br>
- finally I apply the package merge, and convert it again to a
metamodel.
<br>
<br>
My questions are:
<br>
- After these steps I did a validation, and an error occur " Not all
the members of a namespace'&lt;&lt;metamodel, ePackage&gt;&gt;
&lt;Model&gt; MAS-UML' are distinguishable within it." ??
<br>
</blockquote>
I'm not sure, but it sounds like you have multiple versions of the same
model, which could be caused by the problem above where you load the
model with one URI, there are other references to this model using a
different URI.<br>
<blockquote cite="mid:fabvhl$k6f$1@build.eclipse.org" type="cite"><br>
- I tried to do these steps without doing package import and I didn't
notice any difference or errors happened. so, what is the need for
doing a package import in a metamodeling?
<br>
<br>
- After creating the metamodel I create an EMF project for code
generation. Here, I obligated to generate code for the
infrastructureLibrary package, which I didn't need. Why that?
<br>
</blockquote>
In the final step of the wizard, you need to specify a GenModel for any
packages that already exist and you don't want to generate yourself but
rather want to reuse an existing generated model.<br>
<blockquote cite="mid:fabvhl$k6f$1@build.eclipse.org" type="cite"><br>
- After the code generation, there are some errors in the generated
code for the infrastructureLibrary package and for my metamodel code.
all the errors in the impl files and said that xxx cannot be resolved??
<br>
</blockquote>
I'm sure you'll need to specify a dependency on the UML2 model in the
final step of the wizard if you are trying to extend that model.&nbsp; Note
that once the plugin.xml and MANIFEST.MF exist, they won't be
regenerated unless you delete them, so even fixing the problems above
won't fix these files unless you delete them before you generate.<br>
<blockquote cite="mid:fabvhl$k6f$1@build.eclipse.org" type="cite"><br>
<br>
Sorry for this long mail, and thanks in advance.
<br>
<br>
Manar
<br>
<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
I applied the epackage
<br>
stereotype to the root element, merged the primitive types package, and
<br>
import some sub-packaged from the the Abstractions package
<br>
<br>
</blockquote>
<br>
</body>
</html>

--------------000504070401020309090206--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: errors while metamodeling [message #624424 is a reply to message #475141] Mon, 20 August 2007 13:51 Go to previous message
Manar El-Kady is currently offline Manar El-KadyFriend
Messages: 78
Registered: July 2009
Member
Ed Merks wrote:
> Manar,
>
> Comments below.
>
>
> Manar El-Kady wrote:
>> Hi,
>>
>> I build a metamodel as a heavyweight extension.I do the following steps:
>> - create an empty UML model
>> - convert the model to a metamodel
>> - apply the ecore profile, and then apply the epackage stereotype to the
>> root model element
>> - add some elements for the metamodel
>> - merge the primitive types package
>> - add the infrastructure.uml as a resource to my metamodel (Note: I
>> added it by using the editor. I added it from a project in my
>> workspace that containing
>> platform:/resource/org.eclipse.uml2.source\src\org.eclipse.u ml2.uml_2.1.0.v200706141134\model\Infrastructure.uml)
>>
> I think you should have loaded it using
>
> platform:/plugin/org.eclipse.uml2.uml/model/Infrastructure.u ml
>

I did it but an error file not found raised

I tried to add "/" after "platform:/" and the error
" platform:/plugin/org.eclipse.uml2.uml/model/Infrastructure.u ml " showed

I tried to add the name of the jar file that exist in my plugin folder
" platform:/plugin/org.eclipse.uml2.uml_2.1.0.v200706141134/mo del/Infrastructure.uml ",
then a file not found error raised??


> Don't ever use "\" in a URI since it's treated as just an ordinary
> character like "_" not like "/".
>> - While creating the elements of the metamodels I extended classes
>> from the subpackages of the Abstractions package. So, I imported the
>> packages that containing the classes which I extend.
>> - finally I apply the package merge, and convert it again to a metamodel.
>>
>> My questions are:
>> - After these steps I did a validation, and an error occur " Not all
>> the members of a namespace'<<metamodel, ePackage>> <Model> MAS-UML'
>> are distinguishable within it." ??
> I'm not sure, but it sounds like you have multiple versions of the same
> model, which could be caused by the problem above where you load the
> model with one URI, there are other references to this model using a
> different URI.
>>
>> - I tried to do these steps without doing package import and I didn't
>> notice any difference or errors happened. so, what is the need for
>> doing a package import in a metamodeling?
>>
>> - After creating the metamodel I create an EMF project for code
>> generation. Here, I obligated to generate code for the
>> infrastructureLibrary package, which I didn't need. Why that?
> In the final step of the wizard, you need to specify a GenModel for any
> packages that already exist and you don't want to generate yourself but
> rather want to reuse an existing generated model.
>>
>> - After the code generation, there are some errors in the generated
>> code for the infrastructureLibrary package and for my metamodel code.
>> all the errors in the impl files and said that xxx cannot be resolved??
> I'm sure you'll need to specify a dependency on the UML2 model in the
> final step of the wizard if you are trying to extend that model. Note
> that once the plugin.xml and MANIFEST.MF exist, they won't be
> regenerated unless you delete them, so even fixing the problems above
> won't fix these files unless you delete them before you generate.
>>
>>
>> Sorry for this long mail, and thanks in advance.
>>
>> Manar
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
Re: errors while metamodeling [message #624425 is a reply to message #475142] Mon, 20 August 2007 14:08 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------060109010005040605060000
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Manar,

I see. The build.properties doesn't include them in the binary plugin,
so I suppose the way you did it is the only way

bin.includes = about.html,\
plugin.*,\
.,\
model/*.ecore,\
model/*.ecore2xml,\
model/*.genmodel,\
META-INF/
src.includes = about.html,\
model/*.ecore2ecore,\
* model/*.uml,\*
templates/
exclude.. = **/doc-files/**
javacSource = 1.5
javacTarget = 1.5

I get those same warnings when I validate the instance I have directly
from CVS, so I suppose those warnings are something to ignore.

That still leaves your other questions unanswered, so someone with UML2
expertise will need to answer those. Definitely change your "\" to "/"
though or you're likely to have problems.


Manar El-Kady wrote:
>
> Ed Merks wrote:
>> Manar,
>>
>> Comments below.
>>
>>
>> Manar El-Kady wrote:
>>> Hi,
>>>
>>> I build a metamodel as a heavyweight extension.I do the following
>>> steps:
>>> - create an empty UML model
>>> - convert the model to a metamodel
>>> - apply the ecore profile, and then apply the epackage stereotype to
>>> the
>>> root model element
>>> - add some elements for the metamodel
>>> - merge the primitive types package
>>> - add the infrastructure.uml as a resource to my metamodel (Note: I
>>> added it by using the editor. I added it from a project in my
>>> workspace that containing
>>> platform:/resource/org.eclipse.uml2.source\src\org.eclipse.u ml2.uml_2.1.0.v200706141134\model\Infrastructure.uml)
>>>
>> I think you should have loaded it using
>>
>> platform:/plugin/org.eclipse.uml2.uml/model/Infrastructure.u ml
>>
>
> I did it but an error file not found raised
>
> I tried to add "/" after "platform:/" and the error
> " platform:/plugin/org.eclipse.uml2.uml/model/Infrastructure.u ml " showed
>
> I tried to add the name of the jar file that exist in my plugin folder
> " platform:/plugin/org.eclipse.uml2.uml_2.1.0.v200706141134/mo del/Infrastructure.uml ",
> then a file not found error raised??
>
>
>> Don't ever use "\" in a URI since it's treated as just an ordinary
>> character like "_" not like "/".
>>> - While creating the elements of the metamodels I extended classes
>>> from the subpackages of the Abstractions package. So, I imported the
>>> packages that containing the classes which I extend.
>>> - finally I apply the package merge, and convert it again to a
>>> metamodel.
>>>
>>> My questions are:
>>> - After these steps I did a validation, and an error occur " Not all
>>> the members of a namespace'<<metamodel, ePackage>> <Model> MAS-UML'
>>> are distinguishable within it." ??
>> I'm not sure, but it sounds like you have multiple versions of the
>> same model, which could be caused by the problem above where you load
>> the model with one URI, there are other references to this model
>> using a different URI.
>>>
>>> - I tried to do these steps without doing package import and I
>>> didn't notice any difference or errors happened. so, what is the
>>> need for doing a package import in a metamodeling?
>>>
>>> - After creating the metamodel I create an EMF project for code
>>> generation. Here, I obligated to generate code for the
>>> infrastructureLibrary package, which I didn't need. Why that?
>> In the final step of the wizard, you need to specify a GenModel for
>> any packages that already exist and you don't want to generate
>> yourself but rather want to reuse an existing generated model.
>>>
>>> - After the code generation, there are some errors in the generated
>>> code for the infrastructureLibrary package and for my metamodel
>>> code. all the errors in the impl files and said that xxx cannot be
>>> resolved??
>> I'm sure you'll need to specify a dependency on the UML2 model in the
>> final step of the wizard if you are trying to extend that model.
>> Note that once the plugin.xml and MANIFEST.MF exist, they won't be
>> regenerated unless you delete them, so even fixing the problems above
>> won't fix these files unless you delete them before you generate.
>>>
>>>
>>> Sorry for this long mail, and thanks in advance.
>>>
>>> Manar
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>


--------------060109010005040605060000
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Manar,<br>
<br>
I see.&nbsp; The build.properties doesn't include them in the binary plugin,
so I suppose the way you did it is the only way<br>
<blockquote>bin.includes = about.html,\<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; plugin.*,\<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; .,\<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; model/*.ecore,\<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; model/*.ecore2xml,\<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; model/*.genmodel,\<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; META-INF/<br>
src.includes = about.html,\<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; model/*.ecore2ecore,\<br>
<b> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; model/*.uml,\</b><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; templates/<br>
exclude.. = **/doc-files/**<br>
javacSource = 1.5<br>
javacTarget = 1.5<br>
</blockquote>
I get those same warnings when I validate the instance I have directly
from CVS, so I suppose those warnings are something to ignore.<br>
<br>
That still leaves your other questions unanswered, so someone with UML2
expertise will need to answer those.&nbsp; Definitely change your "\" to "/"
though or you're likely to have problems.<br>
<br>
<br>
Manar El-Kady wrote:
<blockquote cite="mid:fac69v$dcj$1@build.eclipse.org" type="cite"><br>
Ed Merks wrote:
<br>
<blockquote type="cite">Manar,
<br>
<br>
Comments below.
<br>
<br>
<br>
Manar El-Kady wrote:
<br>
<blockquote type="cite">Hi,
<br>
<br>
I build a metamodel as a heavyweight extension.I do the following
steps:
<br>
- create an empty UML model
<br>
- convert the model to a metamodel
<br>
- apply the ecore profile, and then apply the epackage stereotype to
the
<br>
root model element
<br>
- add some elements for the metamodel
<br>
- merge the primitive types package
<br>
- add the infrastructure.uml as a resource to my metamodel (Note: I
added it by using the editor. I added it from a project in my workspace
that containing
platform:/resource/org.eclipse.uml2.source\src\org.eclipse.u ml2.uml_2.1.0.v200706141134\model\Infrastructure.uml)
<br>
</blockquote>
I think you should have loaded it using
<br>
<br>
&nbsp;&nbsp;&nbsp; platform:/plugin/org.eclipse.uml2.uml/model/Infrastructure.u ml
<br>
<br>
</blockquote>
<br>
I did it but an error file not found raised
<br>
<br>
I tried to add "/" after "platform:/" and the error
" platform:/plugin/org.eclipse.uml2.uml/model/Infrastructure.u ml " showed
<br>
<br>
I tried to add the name of the jar file that exist in my plugin folder
" platform:/plugin/org.eclipse.uml2.uml_2.1.0.v200706141134/mo del/Infrastructure.uml ",
then a file not found error raised??
<br>
<br>
<br>
<blockquote type="cite">Don't ever use "\" in a URI since it's
treated as just an ordinary character like "_" not like "/".
<br>
<blockquote type="cite">- While creating the elements of the
metamodels I extended classes from the subpackages of the Abstractions
package. So, I imported the packages that containing the classes which
I extend.
<br>
- finally I apply the package merge, and convert it again to a
metamodel.
<br>
<br>
My questions are:
<br>
- After these steps I did a validation, and an error occur " Not all
the members of a namespace'&lt;&lt;metamodel, ePackage&gt;&gt;
&lt;Model&gt; MAS-UML' are distinguishable within it." ??
<br>
</blockquote>
I'm not sure, but it sounds like you have multiple versions of the same
model, which could be caused by the problem above where you load the
model with one URI, there are other references to this model using a
different URI.
<br>
<blockquote type="cite"><br>
- I tried to do these steps without doing package import and I didn't
notice any difference or errors happened. so, what is the need for
doing a package import in a metamodeling?
<br>
<br>
- After creating the metamodel I create an EMF project for code
generation. Here, I obligated to generate code for the
infrastructureLibrary package, which I didn't need. Why that?
<br>
</blockquote>
In the final step of the wizard, you need to specify a GenModel for any
packages that already exist and you don't want to generate yourself but
rather want to reuse an existing generated model.
<br>
<blockquote type="cite"><br>
- After the code generation, there are some errors in the generated
code for the infrastructureLibrary package and for my metamodel code.
all the errors in the impl files and said that xxx cannot be resolved??
<br>
</blockquote>
I'm sure you'll need to specify a dependency on the UML2 model in the
final step of the wizard if you are trying to extend that model.&nbsp; Note
that once the plugin.xml and MANIFEST.MF exist, they won't be
regenerated unless you delete them, so even fixing the problems above
won't fix these files unless you delete them before you generate.
<br>
<blockquote type="cite"><br>
<br>
Sorry for this long mail, and thanks in advance.
<br>
<br>
Manar
<br>
<br>
<br>
&nbsp;&nbsp;&nbsp; <br>
<br>
<br>
<br>
<br>
<br>
<br>
</blockquote>
</blockquote>
</blockquote>
<br>
</body>
</html>

--------------060109010005040605060000--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: errors while metamodeling [message #624469 is a reply to message #475140] Thu, 23 August 2007 13:52 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Manar,

Sorry for the delayed response. See answers below.

Kenn

"Manar El-Kady" <manar.elkady@gmail.com> wrote in message
news:fabvhl$k6f$1@build.eclipse.org...
> Hi,
>
> I build a metamodel as a heavyweight extension.I do the following steps:
> - create an empty UML model
> - convert the model to a metamodel
> - apply the ecore profile, and then apply the epackage stereotype to the
> root model element
> - add some elements for the metamodel
> - merge the primitive types package
> - add the infrastructure.uml as a resource to my metamodel (Note: I added
> it by using the editor. I added it from a project in my workspace that
> containing
> platform:/resource/org.eclipse.uml2.source\src\org.eclipse.u ml2.uml_2.1.0.v200706141134\model\Infrastructure.uml)
> - While creating the elements of the metamodels I extended classes from
> the subpackages of the Abstractions package. So, I imported the packages
> that containing the classes which I extend.
> - finally I apply the package merge, and convert it again to a metamodel.
>
> My questions are:
> - After these steps I did a validation, and an error occur " Not all the
> members of a namespace'<<metamodel, ePackage>> <Model> MAS-UML' are
> distinguishable within it." ??
>

These warnings can usually be ignored. I suspect it's complaining about the
primitive types, i.e. that names like 'Integer' exist both as owned members
in your merged package, and as members directly or indirecty imported from
another namespace. However, the package imports will be troublesome - see
below.

> - I tried to do these steps without doing package import and I didn't
> notice any difference or errors happened. so, what is the need for doing a
> package import in a metamodeling?
>

Strictly speaking, you don't _need_ package imports. Semantically, all they
do is allow you to refer to a named element without using its qualified
name. Is is, however, good practice to declare your dependencies this way...

> - After creating the metamodel I create an EMF project for code
> generation. Here, I obligated to generate code for the
> infrastructureLibrary package, which I didn't need. Why that?
>

Well, after a merge, you shouldn't have any lingering dependencies on other
packages such as ones in InfrastructureLibrary. Since UML2 does not provide
an implementation of InfrastructureLibrary on its own, you'll need to
implement it yourself. However, I would recommend _merging_ the packages
from Abstractions that contain the types you are extending rather than
importing them. That way, you will be implementing the types within your own
(heavyweight) namespace and the imports won't linger (and hence the
namespace warnings would go away).

> - After the code generation, there are some errors in the generated code
> for the infrastructureLibrary package and for my metamodel code. all the
> errors in the impl files and said that xxx cannot be resolved??
>

Without knowing more about the errors, it's hard to say how to fix them, but
I suspect that if you ensure that everything from UML that you need gets
merged into your domain, and that you reference existing implementations of
things that aren't in your domain, you'll be better off...

>
> Sorry for this long mail, and thanks in advance.
>
> Manar
>
>
>
>
>
>
>
>
>
>
> I applied the epackage
> stereotype to the root element, merged the primitive types package, and
> import some sub-packaged from the the Abstractions package
>
Re: errors while metamodeling [message #624520 is a reply to message #475205] Fri, 24 August 2007 09:59 Go to previous message
Manar El-Kady is currently offline Manar El-KadyFriend
Messages: 78
Registered: July 2009
Member
Kenn,

I did a package merge instead of a package import. Validation before
applying the package merge was done successfully. But, after applying
the package merge and validating the metamodel, the validation get the
same error as before.

While generating the code, still there is an obligation to generate code
for the abstractionLibrary package. Moreover, the generated code has
errors ?

Is there a mistake while referring to the InfrastructureLibrary package?
or what?


Thanks,
Manar


Kenn Hussey wrote:
> Manar,
>
> Sorry for the delayed response. See answers below.
>
> Kenn
>
> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
> news:fabvhl$k6f$1@build.eclipse.org...
>> Hi,
>>
>> I build a metamodel as a heavyweight extension.I do the following steps:
>> - create an empty UML model
>> - convert the model to a metamodel
>> - apply the ecore profile, and then apply the epackage stereotype to the
>> root model element
>> - add some elements for the metamodel
>> - merge the primitive types package
>> - add the infrastructure.uml as a resource to my metamodel (Note: I added
>> it by using the editor. I added it from a project in my workspace that
>> containing
>> platform:/resource/org.eclipse.uml2.source\src\org.eclipse.u ml2.uml_2.1.0.v200706141134\model\Infrastructure.uml)
>> - While creating the elements of the metamodels I extended classes from
>> the subpackages of the Abstractions package. So, I imported the packages
>> that containing the classes which I extend.
>> - finally I apply the package merge, and convert it again to a metamodel.
>>
>> My questions are:
>> - After these steps I did a validation, and an error occur " Not all the
>> members of a namespace'<<metamodel, ePackage>> <Model> MAS-UML' are
>> distinguishable within it." ??
>>
>
> These warnings can usually be ignored. I suspect it's complaining about the
> primitive types, i.e. that names like 'Integer' exist both as owned members
> in your merged package, and as members directly or indirecty imported from
> another namespace. However, the package imports will be troublesome - see
> below.
>
>> - I tried to do these steps without doing package import and I didn't
>> notice any difference or errors happened. so, what is the need for doing a
>> package import in a metamodeling?
>>
>
> Strictly speaking, you don't _need_ package imports. Semantically, all they
> do is allow you to refer to a named element without using its qualified
> name. Is is, however, good practice to declare your dependencies this way...
>
>> - After creating the metamodel I create an EMF project for code
>> generation. Here, I obligated to generate code for the
>> infrastructureLibrary package, which I didn't need. Why that?
>>
>
> Well, after a merge, you shouldn't have any lingering dependencies on other
> packages such as ones in InfrastructureLibrary. Since UML2 does not provide
> an implementation of InfrastructureLibrary on its own, you'll need to
> implement it yourself. However, I would recommend _merging_ the packages
> from Abstractions that contain the types you are extending rather than
> importing them. That way, you will be implementing the types within your own
> (heavyweight) namespace and the imports won't linger (and hence the
> namespace warnings would go away).
>
>> - After the code generation, there are some errors in the generated code
>> for the infrastructureLibrary package and for my metamodel code. all the
>> errors in the impl files and said that xxx cannot be resolved??
>>
>
> Without knowing more about the errors, it's hard to say how to fix them, but
> I suspect that if you ensure that everything from UML that you need gets
> merged into your domain, and that you reference existing implementations of
> things that aren't in your domain, you'll be better off...
>
>> Sorry for this long mail, and thanks in advance.
>>
>> Manar
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> I applied the epackage
>> stereotype to the root element, merged the primitive types package, and
>> import some sub-packaged from the the Abstractions package
>>
>
>
Re: errors while metamodeling [message #624522 is a reply to message #475214] Fri, 24 August 2007 12:55 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Manar,

Are you sure you are merging all packages from Abstractions that are
directly or indirectly referenced from elements in your domain (e.g. as
types, superclasses, etc.)?

Kenn

"Manar El-Kady" <manar.elkady@gmail.com> wrote in message
news:fama83$ahr$1@build.eclipse.org...
> Kenn,
>
> I did a package merge instead of a package import. Validation before
> applying the package merge was done successfully. But, after applying the
> package merge and validating the metamodel, the validation get the same
> error as before.
>
> While generating the code, still there is an obligation to generate code
> for the abstractionLibrary package. Moreover, the generated code has
> errors ?
>
> Is there a mistake while referring to the InfrastructureLibrary package?
> or what?
>
>
> Thanks,
> Manar
>
>
> Kenn Hussey wrote:
>> Manar,
>>
>> Sorry for the delayed response. See answers below.
>>
>> Kenn
>>
>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>> news:fabvhl$k6f$1@build.eclipse.org...
>>> Hi,
>>>
>>> I build a metamodel as a heavyweight extension.I do the following steps:
>>> - create an empty UML model
>>> - convert the model to a metamodel
>>> - apply the ecore profile, and then apply the epackage stereotype to the
>>> root model element
>>> - add some elements for the metamodel
>>> - merge the primitive types package
>>> - add the infrastructure.uml as a resource to my metamodel (Note: I
>>> added it by using the editor. I added it from a project in my workspace
>>> that containing
>>> platform:/resource/org.eclipse.uml2.source\src\org.eclipse.u ml2.uml_2.1.0.v200706141134\model\Infrastructure.uml)
>>> - While creating the elements of the metamodels I extended classes from
>>> the subpackages of the Abstractions package. So, I imported the packages
>>> that containing the classes which I extend.
>>> - finally I apply the package merge, and convert it again to a
>>> metamodel.
>>>
>>> My questions are:
>>> - After these steps I did a validation, and an error occur " Not all the
>>> members of a namespace'<<metamodel, ePackage>> <Model> MAS-UML' are
>>> distinguishable within it." ??
>>>
>>
>> These warnings can usually be ignored. I suspect it's complaining about
>> the primitive types, i.e. that names like 'Integer' exist both as owned
>> members in your merged package, and as members directly or indirecty
>> imported from another namespace. However, the package imports will be
>> troublesome - see below.
>>
>>> - I tried to do these steps without doing package import and I didn't
>>> notice any difference or errors happened. so, what is the need for doing
>>> a package import in a metamodeling?
>>>
>>
>> Strictly speaking, you don't _need_ package imports. Semantically, all
>> they do is allow you to refer to a named element without using its
>> qualified name. Is is, however, good practice to declare your
>> dependencies this way...
>>
>>> - After creating the metamodel I create an EMF project for code
>>> generation. Here, I obligated to generate code for the
>>> infrastructureLibrary package, which I didn't need. Why that?
>>>
>>
>> Well, after a merge, you shouldn't have any lingering dependencies on
>> other packages such as ones in InfrastructureLibrary. Since UML2 does not
>> provide an implementation of InfrastructureLibrary on its own, you'll
>> need to implement it yourself. However, I would recommend _merging_ the
>> packages from Abstractions that contain the types you are extending
>> rather than importing them. That way, you will be implementing the types
>> within your own (heavyweight) namespace and the imports won't linger (and
>> hence the namespace warnings would go away).
>>
>>> - After the code generation, there are some errors in the generated code
>>> for the infrastructureLibrary package and for my metamodel code. all the
>>> errors in the impl files and said that xxx cannot be resolved??
>>>
>>
>> Without knowing more about the errors, it's hard to say how to fix them,
>> but I suspect that if you ensure that everything from UML that you need
>> gets merged into your domain, and that you reference existing
>> implementations of things that aren't in your domain, you'll be better
>> off...
>>
>>> Sorry for this long mail, and thanks in advance.
>>>
>>> Manar
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> I applied the epackage
>>> stereotype to the root element, merged the primitive types package, and
>>> import some sub-packaged from the the Abstractions package
>>>
>>
Re: errors while metamodeling [message #624525 is a reply to message #475216] Fri, 24 August 2007 14:37 Go to previous message
Manar El-Kady is currently offline Manar El-KadyFriend
Messages: 78
Registered: July 2009
Member
Kenn,

Firstly, I merge the PrimitiveTypes, BehavioralFeatures,
StructuralFeatures, Relationships packages, which I use directly. After
that I add a merge for the Classifiers, TypedElements, Namespaces, and
Elements packages, which Imported by the packages that I use. In both
cases the same errors happened.



Manar


Kenn Hussey wrote:
> Manar,
>
> Are you sure you are merging all packages from Abstractions that are
> directly or indirectly referenced from elements in your domain (e.g. as
> types, superclasses, etc.)?
>
> Kenn
>
> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
> news:fama83$ahr$1@build.eclipse.org...
>> Kenn,
>>
>> I did a package merge instead of a package import. Validation before
>> applying the package merge was done successfully. But, after applying the
>> package merge and validating the metamodel, the validation get the same
>> error as before.
>>
>> While generating the code, still there is an obligation to generate code
>> for the abstractionLibrary package. Moreover, the generated code has
>> errors ?
>>
>> Is there a mistake while referring to the InfrastructureLibrary package?
>> or what?
>>
>>
>> Thanks,
>> Manar
>>
>>
>> Kenn Hussey wrote:
>>> Manar,
>>>
>>> Sorry for the delayed response. See answers below.
>>>
>>> Kenn
>>>
>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>>> news:fabvhl$k6f$1@build.eclipse.org...
>>>> Hi,
>>>>
>>>> I build a metamodel as a heavyweight extension.I do the following steps:
>>>> - create an empty UML model
>>>> - convert the model to a metamodel
>>>> - apply the ecore profile, and then apply the epackage stereotype to the
>>>> root model element
>>>> - add some elements for the metamodel
>>>> - merge the primitive types package
>>>> - add the infrastructure.uml as a resource to my metamodel (Note: I
>>>> added it by using the editor. I added it from a project in my workspace
>>>> that containing
>>>> platform:/resource/org.eclipse.uml2.source\src\org.eclipse.u ml2.uml_2.1.0.v200706141134\model\Infrastructure.uml)
>>>> - While creating the elements of the metamodels I extended classes from
>>>> the subpackages of the Abstractions package. So, I imported the packages
>>>> that containing the classes which I extend.
>>>> - finally I apply the package merge, and convert it again to a
>>>> metamodel.
>>>>
>>>> My questions are:
>>>> - After these steps I did a validation, and an error occur " Not all the
>>>> members of a namespace'<<metamodel, ePackage>> <Model> MAS-UML' are
>>>> distinguishable within it." ??
>>>>
>>> These warnings can usually be ignored. I suspect it's complaining about
>>> the primitive types, i.e. that names like 'Integer' exist both as owned
>>> members in your merged package, and as members directly or indirecty
>>> imported from another namespace. However, the package imports will be
>>> troublesome - see below.
>>>
>>>> - I tried to do these steps without doing package import and I didn't
>>>> notice any difference or errors happened. so, what is the need for doing
>>>> a package import in a metamodeling?
>>>>
>>> Strictly speaking, you don't _need_ package imports. Semantically, all
>>> they do is allow you to refer to a named element without using its
>>> qualified name. Is is, however, good practice to declare your
>>> dependencies this way...
>>>
>>>> - After creating the metamodel I create an EMF project for code
>>>> generation. Here, I obligated to generate code for the
>>>> infrastructureLibrary package, which I didn't need. Why that?
>>>>
>>> Well, after a merge, you shouldn't have any lingering dependencies on
>>> other packages such as ones in InfrastructureLibrary. Since UML2 does not
>>> provide an implementation of InfrastructureLibrary on its own, you'll
>>> need to implement it yourself. However, I would recommend _merging_ the
>>> packages from Abstractions that contain the types you are extending
>>> rather than importing them. That way, you will be implementing the types
>>> within your own (heavyweight) namespace and the imports won't linger (and
>>> hence the namespace warnings would go away).
>>>
>>>> - After the code generation, there are some errors in the generated code
>>>> for the infrastructureLibrary package and for my metamodel code. all the
>>>> errors in the impl files and said that xxx cannot be resolved??
>>>>
>>> Without knowing more about the errors, it's hard to say how to fix them,
>>> but I suspect that if you ensure that everything from UML that you need
>>> gets merged into your domain, and that you reference existing
>>> implementations of things that aren't in your domain, you'll be better
>>> off...
>>>
>>>> Sorry for this long mail, and thanks in advance.
>>>>
>>>> Manar
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> I applied the epackage
>>>> stereotype to the root element, merged the primitive types package, and
>>>> import some sub-packaged from the the Abstractions package
>>>>
>
Re: errors while metamodeling [message #624554 is a reply to message #475219] Tue, 28 August 2007 23:00 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Manar,

After you merge these packages, are there remaining references to elements
in them? For example, if you perform the package merge, save the model, and
inspect the serialization, to you see lingering references to
InfrastructureLibrary.uml?

Kenn

"Manar El-Kady" <manar.elkady@gmail.com> wrote in message
news:famqhn$gnk$1@build.eclipse.org...
> Kenn,
>
> Firstly, I merge the PrimitiveTypes, BehavioralFeatures,
> StructuralFeatures, Relationships packages, which I use directly. After
> that I add a merge for the Classifiers, TypedElements, Namespaces, and
> Elements packages, which Imported by the packages that I use. In both
> cases the same errors happened.
>
>
>
> Manar
>
>
> Kenn Hussey wrote:
>> Manar,
>>
>> Are you sure you are merging all packages from Abstractions that are
>> directly or indirectly referenced from elements in your domain (e.g. as
>> types, superclasses, etc.)?
>>
>> Kenn
>>
>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>> news:fama83$ahr$1@build.eclipse.org...
>>> Kenn,
>>>
>>> I did a package merge instead of a package import. Validation before
>>> applying the package merge was done successfully. But, after applying
>>> the package merge and validating the metamodel, the validation get the
>>> same error as before.
>>>
>>> While generating the code, still there is an obligation to generate code
>>> for the abstractionLibrary package. Moreover, the generated code has
>>> errors ?
>>>
>>> Is there a mistake while referring to the InfrastructureLibrary package?
>>> or what?
>>>
>>>
>>> Thanks,
>>> Manar
>>>
>>>
>>> Kenn Hussey wrote:
>>>> Manar,
>>>>
>>>> Sorry for the delayed response. See answers below.
>>>>
>>>> Kenn
>>>>
>>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>>>> news:fabvhl$k6f$1@build.eclipse.org...
>>>>> Hi,
>>>>>
>>>>> I build a metamodel as a heavyweight extension.I do the following
>>>>> steps:
>>>>> - create an empty UML model
>>>>> - convert the model to a metamodel
>>>>> - apply the ecore profile, and then apply the epackage stereotype to
>>>>> the
>>>>> root model element
>>>>> - add some elements for the metamodel
>>>>> - merge the primitive types package
>>>>> - add the infrastructure.uml as a resource to my metamodel (Note: I
>>>>> added it by using the editor. I added it from a project in my
>>>>> workspace that containing
>>>>> platform:/resource/org.eclipse.uml2.source\src\org.eclipse.u ml2.uml_2.1.0.v200706141134\model\Infrastructure.uml)
>>>>> - While creating the elements of the metamodels I extended classes
>>>>> from the subpackages of the Abstractions package. So, I imported the
>>>>> packages that containing the classes which I extend.
>>>>> - finally I apply the package merge, and convert it again to a
>>>>> metamodel.
>>>>>
>>>>> My questions are:
>>>>> - After these steps I did a validation, and an error occur " Not all
>>>>> the members of a namespace'<<metamodel, ePackage>> <Model> MAS-UML'
>>>>> are distinguishable within it." ??
>>>>>
>>>> These warnings can usually be ignored. I suspect it's complaining about
>>>> the primitive types, i.e. that names like 'Integer' exist both as owned
>>>> members in your merged package, and as members directly or indirecty
>>>> imported from another namespace. However, the package imports will be
>>>> troublesome - see below.
>>>>
>>>>> - I tried to do these steps without doing package import and I didn't
>>>>> notice any difference or errors happened. so, what is the need for
>>>>> doing a package import in a metamodeling?
>>>>>
>>>> Strictly speaking, you don't _need_ package imports. Semantically, all
>>>> they do is allow you to refer to a named element without using its
>>>> qualified name. Is is, however, good practice to declare your
>>>> dependencies this way...
>>>>
>>>>> - After creating the metamodel I create an EMF project for code
>>>>> generation. Here, I obligated to generate code for the
>>>>> infrastructureLibrary package, which I didn't need. Why that?
>>>>>
>>>> Well, after a merge, you shouldn't have any lingering dependencies on
>>>> other packages such as ones in InfrastructureLibrary. Since UML2 does
>>>> not provide an implementation of InfrastructureLibrary on its own,
>>>> you'll need to implement it yourself. However, I would recommend
>>>> _merging_ the packages from Abstractions that contain the types you are
>>>> extending rather than importing them. That way, you will be
>>>> implementing the types within your own (heavyweight) namespace and the
>>>> imports won't linger (and hence the namespace warnings would go away).
>>>>
>>>>> - After the code generation, there are some errors in the generated
>>>>> code for the infrastructureLibrary package and for my metamodel code.
>>>>> all the errors in the impl files and said that xxx cannot be
>>>>> resolved??
>>>>>
>>>> Without knowing more about the errors, it's hard to say how to fix
>>>> them, but I suspect that if you ensure that everything from UML that
>>>> you need gets merged into your domain, and that you reference existing
>>>> implementations of things that aren't in your domain, you'll be better
>>>> off...
>>>>
>>>>> Sorry for this long mail, and thanks in advance.
>>>>>
>>>>> Manar
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> I applied the epackage
>>>>> stereotype to the root element, merged the primitive types package,
>>>>> and
>>>>> import some sub-packaged from the the Abstractions package
>>>>>
>>
Re: errors while metamodeling [message #624559 is a reply to message #475264] Wed, 29 August 2007 09:50 Go to previous message
Manar El-Kady is currently offline Manar El-KadyFriend
Messages: 78
Registered: July 2009
Member
Kenn,

I didn't understand what do you mean exactly. After applying the package
merge I didn't find any import in the resulting package to merge it to
my metamodel, is it what do you mean?


Manar,



Kenn Hussey wrote:
> Manar,
>
> After you merge these packages, are there remaining references to elements
> in them? For example, if you perform the package merge, save the model, and
> inspect the serialization, to you see lingering references to
> InfrastructureLibrary.uml?
>
> Kenn
>
> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
> news:famqhn$gnk$1@build.eclipse.org...
>> Kenn,
>>
>> Firstly, I merge the PrimitiveTypes, BehavioralFeatures,
>> StructuralFeatures, Relationships packages, which I use directly. After
>> that I add a merge for the Classifiers, TypedElements, Namespaces, and
>> Elements packages, which Imported by the packages that I use. In both
>> cases the same errors happened.
>>
>>
>>
>> Manar
>>
>>
>> Kenn Hussey wrote:
>>> Manar,
>>>
>>> Are you sure you are merging all packages from Abstractions that are
>>> directly or indirectly referenced from elements in your domain (e.g. as
>>> types, superclasses, etc.)?
>>>
>>> Kenn
>>>
>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>>> news:fama83$ahr$1@build.eclipse.org...
>>>> Kenn,
>>>>
>>>> I did a package merge instead of a package import. Validation before
>>>> applying the package merge was done successfully. But, after applying
>>>> the package merge and validating the metamodel, the validation get the
>>>> same error as before.
>>>>
>>>> While generating the code, still there is an obligation to generate code
>>>> for the abstractionLibrary package. Moreover, the generated code has
>>>> errors ?
>>>>
>>>> Is there a mistake while referring to the InfrastructureLibrary package?
>>>> or what?
>>>>
>>>>
>>>> Thanks,
>>>> Manar
>>>>
>>>>
>>>> Kenn Hussey wrote:
>>>>> Manar,
>>>>>
>>>>> Sorry for the delayed response. See answers below.
>>>>>
>>>>> Kenn
>>>>>
>>>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>>>>> news:fabvhl$k6f$1@build.eclipse.org...
>>>>>> Hi,
>>>>>>
>>>>>> I build a metamodel as a heavyweight extension.I do the following
>>>>>> steps:
>>>>>> - create an empty UML model
>>>>>> - convert the model to a metamodel
>>>>>> - apply the ecore profile, and then apply the epackage stereotype to
>>>>>> the
>>>>>> root model element
>>>>>> - add some elements for the metamodel
>>>>>> - merge the primitive types package
>>>>>> - add the infrastructure.uml as a resource to my metamodel (Note: I
>>>>>> added it by using the editor. I added it from a project in my
>>>>>> workspace that containing
>>>>>> platform:/resource/org.eclipse.uml2.source\src\org.eclipse.u ml2.uml_2.1.0.v200706141134\model\Infrastructure.uml)
>>>>>> - While creating the elements of the metamodels I extended classes
>>>>>> from the subpackages of the Abstractions package. So, I imported the
>>>>>> packages that containing the classes which I extend.
>>>>>> - finally I apply the package merge, and convert it again to a
>>>>>> metamodel.
>>>>>>
>>>>>> My questions are:
>>>>>> - After these steps I did a validation, and an error occur " Not all
>>>>>> the members of a namespace'<<metamodel, ePackage>> <Model> MAS-UML'
>>>>>> are distinguishable within it." ??
>>>>>>
>>>>> These warnings can usually be ignored. I suspect it's complaining about
>>>>> the primitive types, i.e. that names like 'Integer' exist both as owned
>>>>> members in your merged package, and as members directly or indirecty
>>>>> imported from another namespace. However, the package imports will be
>>>>> troublesome - see below.
>>>>>
>>>>>> - I tried to do these steps without doing package import and I didn't
>>>>>> notice any difference or errors happened. so, what is the need for
>>>>>> doing a package import in a metamodeling?
>>>>>>
>>>>> Strictly speaking, you don't _need_ package imports. Semantically, all
>>>>> they do is allow you to refer to a named element without using its
>>>>> qualified name. Is is, however, good practice to declare your
>>>>> dependencies this way...
>>>>>
>>>>>> - After creating the metamodel I create an EMF project for code
>>>>>> generation. Here, I obligated to generate code for the
>>>>>> infrastructureLibrary package, which I didn't need. Why that?
>>>>>>
>>>>> Well, after a merge, you shouldn't have any lingering dependencies on
>>>>> other packages such as ones in InfrastructureLibrary. Since UML2 does
>>>>> not provide an implementation of InfrastructureLibrary on its own,
>>>>> you'll need to implement it yourself. However, I would recommend
>>>>> _merging_ the packages from Abstractions that contain the types you are
>>>>> extending rather than importing them. That way, you will be
>>>>> implementing the types within your own (heavyweight) namespace and the
>>>>> imports won't linger (and hence the namespace warnings would go away).
>>>>>
>>>>>> - After the code generation, there are some errors in the generated
>>>>>> code for the infrastructureLibrary package and for my metamodel code.
>>>>>> all the errors in the impl files and said that xxx cannot be
>>>>>> resolved??
>>>>>>
>>>>> Without knowing more about the errors, it's hard to say how to fix
>>>>> them, but I suspect that if you ensure that everything from UML that
>>>>> you need gets merged into your domain, and that you reference existing
>>>>> implementations of things that aren't in your domain, you'll be better
>>>>> off...
>>>>>
>>>>>> Sorry for this long mail, and thanks in advance.
>>>>>>
>>>>>> Manar
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> I applied the epackage
>>>>>> stereotype to the root element, merged the primitive types package,
>>>>>> and
>>>>>> import some sub-packaged from the the Abstractions package
>>>>>>
>
>
Re: errors while metamodeling [message #624597 is a reply to message #475352] Thu, 30 August 2007 18:06 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Manar,

I was wondering what kind of relationships there are between your merged
model (i.e. after selecting UML Editor > Package > Merge...) and the other
source models (Infrastructure, Superstructure). Ideally, after the merge,
your model should have no lingering dependencies on any other model,
otherwise you'll need to implement (pieces of it) yourself... Again, if you
want to attach your model we could try to see what is going wrong...

Kenn

"Manar El-Kady" <manar.elkady@gmail.com> wrote in message
news:fb3fj7$v3e$1@build.eclipse.org...
> Kenn,
>
> I didn't understand what do you mean exactly. After applying the package
> merge I didn't find any import in the resulting package to merge it to my
> metamodel, is it what do you mean?
>
>
> Manar,
>
>
>
> Kenn Hussey wrote:
>> Manar,
>>
>> After you merge these packages, are there remaining references to
>> elements in them? For example, if you perform the package merge, save the
>> model, and inspect the serialization, to you see lingering references to
>> InfrastructureLibrary.uml?
>>
>> Kenn
>>
>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>> news:famqhn$gnk$1@build.eclipse.org...
>>> Kenn,
>>>
>>> Firstly, I merge the PrimitiveTypes, BehavioralFeatures,
>>> StructuralFeatures, Relationships packages, which I use directly. After
>>> that I add a merge for the Classifiers, TypedElements, Namespaces, and
>>> Elements packages, which Imported by the packages that I use. In both
>>> cases the same errors happened.
>>>
>>>
>>>
>>> Manar
>>>
>>>
>>> Kenn Hussey wrote:
>>>> Manar,
>>>>
>>>> Are you sure you are merging all packages from Abstractions that are
>>>> directly or indirectly referenced from elements in your domain (e.g. as
>>>> types, superclasses, etc.)?
>>>>
>>>> Kenn
>>>>
>>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>>>> news:fama83$ahr$1@build.eclipse.org...
>>>>> Kenn,
>>>>>
>>>>> I did a package merge instead of a package import. Validation before
>>>>> applying the package merge was done successfully. But, after applying
>>>>> the package merge and validating the metamodel, the validation get the
>>>>> same error as before.
>>>>>
>>>>> While generating the code, still there is an obligation to generate
>>>>> code for the abstractionLibrary package. Moreover, the generated code
>>>>> has errors ?
>>>>>
>>>>> Is there a mistake while referring to the InfrastructureLibrary
>>>>> package? or what?
>>>>>
>>>>>
>>>>> Thanks,
>>>>> Manar
>>>>>
>>>>>
>>>>> Kenn Hussey wrote:
>>>>>> Manar,
>>>>>>
>>>>>> Sorry for the delayed response. See answers below.
>>>>>>
>>>>>> Kenn
>>>>>>
>>>>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>>>>>> news:fabvhl$k6f$1@build.eclipse.org...
>>>>>>> Hi,
>>>>>>>
>>>>>>> I build a metamodel as a heavyweight extension.I do the following
>>>>>>> steps:
>>>>>>> - create an empty UML model
>>>>>>> - convert the model to a metamodel
>>>>>>> - apply the ecore profile, and then apply the epackage stereotype to
>>>>>>> the
>>>>>>> root model element
>>>>>>> - add some elements for the metamodel
>>>>>>> - merge the primitive types package
>>>>>>> - add the infrastructure.uml as a resource to my metamodel (Note: I
>>>>>>> added it by using the editor. I added it from a project in my
>>>>>>> workspace that containing
>>>>>>> platform:/resource/org.eclipse.uml2.source\src\org.eclipse.u ml2.uml_2.1.0.v200706141134\model\Infrastructure.uml)
>>>>>>> - While creating the elements of the metamodels I extended classes
>>>>>>> from the subpackages of the Abstractions package. So, I imported the
>>>>>>> packages that containing the classes which I extend.
>>>>>>> - finally I apply the package merge, and convert it again to a
>>>>>>> metamodel.
>>>>>>>
>>>>>>> My questions are:
>>>>>>> - After these steps I did a validation, and an error occur " Not all
>>>>>>> the members of a namespace'<<metamodel, ePackage>> <Model> MAS-UML'
>>>>>>> are distinguishable within it." ??
>>>>>>>
>>>>>> These warnings can usually be ignored. I suspect it's complaining
>>>>>> about the primitive types, i.e. that names like 'Integer' exist both
>>>>>> as owned members in your merged package, and as members directly or
>>>>>> indirecty imported from another namespace. However, the package
>>>>>> imports will be troublesome - see below.
>>>>>>
>>>>>>> - I tried to do these steps without doing package import and I
>>>>>>> didn't notice any difference or errors happened. so, what is the
>>>>>>> need for doing a package import in a metamodeling?
>>>>>>>
>>>>>> Strictly speaking, you don't _need_ package imports. Semantically,
>>>>>> all they do is allow you to refer to a named element without using
>>>>>> its qualified name. Is is, however, good practice to declare your
>>>>>> dependencies this way...
>>>>>>
>>>>>>> - After creating the metamodel I create an EMF project for code
>>>>>>> generation. Here, I obligated to generate code for the
>>>>>>> infrastructureLibrary package, which I didn't need. Why that?
>>>>>>>
>>>>>> Well, after a merge, you shouldn't have any lingering dependencies on
>>>>>> other packages such as ones in InfrastructureLibrary. Since UML2 does
>>>>>> not provide an implementation of InfrastructureLibrary on its own,
>>>>>> you'll need to implement it yourself. However, I would recommend
>>>>>> _merging_ the packages from Abstractions that contain the types you
>>>>>> are extending rather than importing them. That way, you will be
>>>>>> implementing the types within your own (heavyweight) namespace and
>>>>>> the imports won't linger (and hence the namespace warnings would go
>>>>>> away).
>>>>>>
>>>>>>> - After the code generation, there are some errors in the generated
>>>>>>> code for the infrastructureLibrary package and for my metamodel
>>>>>>> code. all the errors in the impl files and said that xxx cannot be
>>>>>>> resolved??
>>>>>>>
>>>>>> Without knowing more about the errors, it's hard to say how to fix
>>>>>> them, but I suspect that if you ensure that everything from UML that
>>>>>> you need gets merged into your domain, and that you reference
>>>>>> existing implementations of things that aren't in your domain, you'll
>>>>>> be better off...
>>>>>>
>>>>>>> Sorry for this long mail, and thanks in advance.
>>>>>>>
>>>>>>> Manar
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> I applied the epackage
>>>>>>> stereotype to the root element, merged the primitive types package,
>>>>>>> and
>>>>>>> import some sub-packaged from the the Abstractions package
>>>>>>>
>>
Re: errors while metamodeling [message #624598 is a reply to message #475570] Thu, 30 August 2007 20:27 Go to previous message
Manar El-Kady is currently offline Manar El-KadyFriend
Messages: 78
Registered: July 2009
Member
This is a multi-part message in MIME format.
--------------050206070400050203010900
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Kenn,
Attached, you can find the model after applying the package merge and
another one before applying the package merge.


Manar,


Kenn Hussey wrote:
> Manar,
>
> I was wondering what kind of relationships there are between your merged
> model (i.e. after selecting UML Editor > Package > Merge...) and the other
> source models (Infrastructure, Superstructure). Ideally, after the merge,
> your model should have no lingering dependencies on any other model,
> otherwise you'll need to implement (pieces of it) yourself... Again, if you
> want to attach your model we could try to see what is going wrong...
>
> Kenn
>
> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
> news:fb3fj7$v3e$1@build.eclipse.org...
>> Kenn,
>>
>> I didn't understand what do you mean exactly. After applying the package
>> merge I didn't find any import in the resulting package to merge it to my
>> metamodel, is it what do you mean?
>>
>>
>> Manar,
>>
>>
>>
>> Kenn Hussey wrote:
>>> Manar,
>>>
>>> After you merge these packages, are there remaining references to
>>> elements in them? For example, if you perform the package merge, save the
>>> model, and inspect the serialization, to you see lingering references to
>>> InfrastructureLibrary.uml?
>>>
>>> Kenn
>>>
>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>>> news:famqhn$gnk$1@build.eclipse.org...
>>>> Kenn,
>>>>
>>>> Firstly, I merge the PrimitiveTypes, BehavioralFeatures,
>>>> StructuralFeatures, Relationships packages, which I use directly. After
>>>> that I add a merge for the Classifiers, TypedElements, Namespaces, and
>>>> Elements packages, which Imported by the packages that I use. In both
>>>> cases the same errors happened.
>>>>
>>>>
>>>>
>>>> Manar
>>>>
>>>>
>>>> Kenn Hussey wrote:
>>>>> Manar,
>>>>>
>>>>> Are you sure you are merging all packages from Abstractions that are
>>>>> directly or indirectly referenced from elements in your domain (e.g. as
>>>>> types, superclasses, etc.)?
>>>>>
>>>>> Kenn
>>>>>
>>>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>>>>> news:fama83$ahr$1@build.eclipse.org...
>>>>>> Kenn,
>>>>>>
>>>>>> I did a package merge instead of a package import. Validation before
>>>>>> applying the package merge was done successfully. But, after applying
>>>>>> the package merge and validating the metamodel, the validation get the
>>>>>> same error as before.
>>>>>>
>>>>>> While generating the code, still there is an obligation to generate
>>>>>> code for the abstractionLibrary package. Moreover, the generated code
>>>>>> has errors ?
>>>>>>
>>>>>> Is there a mistake while referring to the InfrastructureLibrary
>>>>>> package? or what?
>>>>>>
>>>>>>
>>>>>> Thanks,
>>>>>> Manar
>>>>>>
>>>>>>
>>>>>> Kenn Hussey wrote:
>>>>>>> Manar,
>>>>>>>
>>>>>>> Sorry for the delayed response. See answers below.
>>>>>>>
>>>>>>> Kenn
>>>>>>>
>>>>>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>>>>>>> news:fabvhl$k6f$1@build.eclipse.org...
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I build a metamodel as a heavyweight extension.I do the following
>>>>>>>> steps:
>>>>>>>> - create an empty UML model
>>>>>>>> - convert the model to a metamodel
>>>>>>>> - apply the ecore profile, and then apply the epackage stereotype to
>>>>>>>> the
>>>>>>>> root model element
>>>>>>>> - add some elements for the metamodel
>>>>>>>> - merge the primitive types package
>>>>>>>> - add the infrastructure.uml as a resource to my metamodel (Note: I
>>>>>>>> added it by using the editor. I added it from a project in my
>>>>>>>> workspace that containing
>>>>>>>> platform:/resource/org.eclipse.uml2.source\src\org.eclipse.u ml2.uml_2.1.0.v200706141134\model\Infrastructure.uml)
>>>>>>>> - While creating the elements of the metamodels I extended classes
>>>>>>>> from the subpackages of the Abstractions package. So, I imported the
>>>>>>>> packages that containing the classes which I extend.
>>>>>>>> - finally I apply the package merge, and convert it again to a
>>>>>>>> metamodel.
>>>>>>>>
>>>>>>>> My questions are:
>>>>>>>> - After these steps I did a validation, and an error occur " Not all
>>>>>>>> the members of a namespace'<<metamodel, ePackage>> <Model> MAS-UML'
>>>>>>>> are distinguishable within it." ??
>>>>>>>>
>>>>>>> These warnings can usually be ignored. I suspect it's complaining
>>>>>>> about the primitive types, i.e. that names like 'Integer' exist both
>>>>>>> as owned members in your merged package, and as members directly or
>>>>>>> indirecty imported from another namespace. However, the package
>>>>>>> imports will be troublesome - see below.
>>>>>>>
>>>>>>>> - I tried to do these steps without doing package import and I
>>>>>>>> didn't notice any difference or errors happened. so, what is the
>>>>>>>> need for doing a package import in a metamodeling?
>>>>>>>>
>>>>>>> Strictly speaking, you don't _need_ package imports. Semantically,
>>>>>>> all they do is allow you to refer to a named element without using
>>>>>>> its qualified name. Is is, however, good practice to declare your
>>>>>>> dependencies this way...
>>>>>>>
>>>>>>>> - After creating the metamodel I create an EMF project for code
>>>>>>>> generation. Here, I obligated to generate code for the
>>>>>>>> infrastructureLibrary package, which I didn't need. Why that?
>>>>>>>>
>>>>>>> Well, after a merge, you shouldn't have any lingering dependencies on
>>>>>>> other packages such as ones in InfrastructureLibrary. Since UML2 does
>>>>>>> not provide an implementation of InfrastructureLibrary on its own,
>>>>>>> you'll need to implement it yourself. However, I would recommend
>>>>>>> _merging_ the packages from Abstractions that contain the types you
>>>>>>> are extending rather than importing them. That way, you will be
>>>>>>> implementing the types within your own (heavyweight) namespace and
>>>>>>> the imports won't linger (and hence the namespace warnings would go
>>>>>>> away).
>>>>>>>
>>>>>>>> - After the code generation, there are some errors in the generated
>>>>>>>> code for the infrastructureLibrary package and for my metamodel
>>>>>>>> code. all the errors in the impl files and said that xxx cannot be
>>>>>>>> resolved??
>>>>>>>>
>>>>>>> Without knowing more about the errors, it's hard to say how to fix
>>>>>>> them, but I suspect that if you ensure that everything from UML that
>>>>>>> you need gets merged into your domain, and that you reference
>>>>>>> existing implementations of things that aren't in your domain, you'll
>>>>>>> be better off...
>>>>>>>
>>>>>>>> Sorry for this long mail, and thanks in advance.
>>>>>>>>
>>>>>>>> Manar
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> I applied the epackage
>>>>>>>> stereotype to the root element, merged the primitive types package,
>>>>>>>> and
>>>>>>>> import some sub-packaged from the the Abstractions package
>>>>>>>>
>


--------------050206070400050203010900
Content-Type: text/xml;
name="MAS_UML3.uml"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="MAS_UML3.uml"

<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="2.1" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Ecore="http://www.eclipse.org/uml2/schemas/Ecore/4" xmlns:Standard="http://www.eclipse.org/uml2/schemas/Standard/1" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML" xsi:schemaLocation="http://www.eclipse.org/uml2/schemas/Ecore/4 pathmap://UML_PROFILES/Ecore.profile.uml#_B7dOIMEREduRdatXod jBjA http://www.eclipse.org/uml2/schemas/Standard/1 pathmap://UML_PROFILES/Standard.profile.uml#_yzU58YinEdqtvbn fB2L_5w">
<uml:Model xmi:id="_0" name="MAS_UML" viewpoint="">
<eAnnotations xmi:id="_http2F2Fwww.eclipse.org2Fuml22F2.0.02FUML" source="http://www.eclipse.org/uml2/2.0.0/UML">
<eAnnotations xmi:id=" _http2F2Fwww.eclipse.org2Fuml22F2.0.02FUML-_UMLPrimitiveType s " source="UMLPrimitiveTypes" references="Boolean Integer String UnlimitedNatural"/>
<eAnnotations xmi:id=" _http2F2Fwww.eclipse.org2Fuml22F2.0.02FUML-_InfrastructureLi braryCoreAbstractionsBehavioralFeatures " source=" InfrastructureLibrary::Core::Abstractions::BehavioralFeature s " references="BehavioralFeature-parameter BehavioralFeature-isDistinguishableFrom BehavioralFeature Parameter A_parameter_behavioralFeature-_ownedEnd.0 A_parameter_behavioralFeature"/>
<eAnnotations xmi:id=" _http2F2Fwww.eclipse.org2Fuml22F2.0.02FUML-_InfrastructureLi braryCoreAbstractionsStructuralFeatures " source=" InfrastructureLibrary::Core::Abstractions::StructuralFeature s " references="StructuralFeature"/>
<eAnnotations xmi:id=" _http2F2Fwww.eclipse.org2Fuml22F2.0.02FUML-_InfrastructureLi braryCoreAbstractionsRelationships " source="InfrastructureLibrary::Core::Abstractions::Relationships " references="DirectedRelationship-source DirectedRelationship-target DirectedRelationship Relationship-relatedElement Relationship A_relatedElement_relationship-_ownedEnd.0 A_relatedElement_relationship A_source_directedRelationship-_ownedEnd.0 A_source_directedRelationship A_target_directedRelationship-_ownedEnd.0 A_target_directedRelationship"/>
<eAnnotations xmi:id=" _http2F2Fwww.eclipse.org2Fuml22F2.0.02FUML-_InfrastructureLi braryCoreAbstractionsClassifiers " source="InfrastructureLibrary::Core::Abstractions::Classifiers " references="Classifier-feature Classifier-allFeatures Classifier Feature-featuringClassifier Feature A_feature_featuringClassifier"/>
<eAnnotations xmi:id=" _http2F2Fwww.eclipse.org2Fuml22F2.0.02FUML-_InfrastructureLi braryCoreAbstractionsTypedElements " source="InfrastructureLibrary::Core::Abstractions::TypedElements " references="Type-conformsTo Type TypedElement-type TypedElement A_type_typedElement-_ownedEnd.0 A_type_typedElement"/>
<eAnnotations xmi:id=" _http2F2Fwww.eclipse.org2Fuml22F2.0.02FUML-_InfrastructureLi braryCoreAbstractionsNamespaces " source="InfrastructureLibrary::Core::Abstractions::Namespaces " references="NamedElement-name NamedElement-qualifiedName NamedElement-namespace NamedElement-allNamespaces NamedElement-isDistinguishableFrom NamedElement-separator NamedElement-qualifiedName.1 NamedElement Namespace-ownedMember Namespace-member Namespace-getNamesOfMember Namespace-membersAreDistinguishable Namespace A_ownedMember_namespace A_member_namespace-_ownedEnd.0 A_member_namespace"/>
<eAnnotations xmi:id=" _http2F2Fwww.eclipse.org2Fuml22F2.0.02FUML-_InfrastructureLi braryCoreAbstractionsOwnerships " source="InfrastructureLibrary::Core::Abstractions::Ownerships " references="Element-ownedElement Element-owner Element-ownedComment Element-allOwnedElements Element-mustBeOwned Element A_ownedElement_owner A_ownedComment_owningElement-owningElement A_ownedComment_owningElement"/>
<eAnnotations xmi:id=" _http2F2Fwww.eclipse.org2Fuml22F2.0.02FUML-_InfrastructureLi braryCoreAbstractionsElements " source="InfrastructureLibrary::Core::Abstractions::Elements " references="Element"/>
</eAnnotations>
<packagedElement xmi:type="uml:Class" xmi:id="AgentType" name="AgentType">
<generalization xmi:id="AgentType-_generalization.0">
<general xmi:type="uml:Class" href=" ../org.eclipse.uml2.source/src/org.eclipse.uml2.uml_2.1.0.v2 00706141134/model/Infrastructure.uml#_3ADC7B74022D3CA00A2A01 8F "/>
</generalization>
<ownedAttribute xmi:id="AgentType-play" name="play" type="Play" aggregation="composite" association="A_play_player">
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="AgentType-play-_upperValue" value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="AgentType-play-_lowerValue"/>
</ownedAttribute>
<ownedAttribute xmi:id="AgentType-ontology" name="ontology" type="Ontology" association="Knows">
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="AgentType-ontology-_upperValue" value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="AgentType-ontology-_lowerValue"/>
</ownedAttribute>
<ownedAttribute xmi:id="AgentType-ownedBelieve" name="ownedBelieve" type="Beliefs" aggregation="composite" association="A_ownedBelieve_agent">
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="AgentType-ownedBelieve-_upperValue" value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="AgentType-ownedBelieve-_lowerValue"/>
</ownedAttribute>
<ownedAttribute xmi:id="AgentType-ownedGoal" name="ownedGoal" type="Goal" aggregation="composite" association="A_ownedGoal_agent">
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="AgentType-ownedGoal-_upperValue" value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="AgentType-ownedGoal-_lowerValue"/>
</ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="Role" name="Role">
<generalization xmi:id="Role-_generalization.0">
<general xmi:type="uml:Class" href=" ../org.eclipse.uml2.source/src/org.eclipse.uml2.uml_2.1.0.v2 00706141134/model/Infrastructure.uml#_3ADC7B74022D3CA00A2A01 8F "/>
</generalization>
<ownedAttribute xmi:id="Role-ownedGoal" name="ownedGoal" type="Goal" aggregation="composite" association="A_ownedGoal_role">
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Role-ownedGoal-_upperValue" value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="Role-ownedGoal-_lowerValue" value="1"/>
</ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="Beliefs" name="Beliefs">
<generalization xmi:id="Beliefs-_generalization.0">
<general xmi:type="uml:Class" href=" ../org.eclipse.uml2.source/src/org.eclipse.uml2.uml_2.1.0.v2 00706141134/model/Infrastructure.uml#_3ADC7B74022D3CA00A4100 02 "/>
</generalization>
<ownedAttribute xmi:id="Beliefs-Language" name="Language">
<type xmi:type="uml:PrimitiveType" href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
</ownedAttribute>
<ownedAttribute xmi:id="Beliefs-Title" name="Title">
<type xmi:type="uml:PrimitiveType" href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
</ownedAttribute>
<ownedAttribute xmi:id="Beliefs-rule" name="rule">
<type xmi:type="uml:PrimitiveType" href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Beliefs-rule-_upperValue" value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="Beliefs-rule-_lowerValue"/>
</ownedAttribute>
<ownedAttribute xmi:id="Beliefs-agent" name="agent" type="AgentType" association="A_ownedBelieve_agent"/>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="Ontology" name="Ontology">
<generalization xmi:id="Ontology-_generalization.0">
<general xmi:type="uml:Class" href=" ../org.eclipse.uml2.source/src/org.eclipse.uml2.uml_2.1.0.v2 00706141134/model/Infrastructure.uml#_3ADC7B74022D3CA00A2A01 8F "/>
</generalization>
<ownedAttribute xmi:id="Ontology-Language" name="Language">
<type xmi:type="uml:PrimitiveType" href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
</ownedAttribute>
<ownedAttribute xmi:id="Ontology-Title" name="Title">
<type xmi:type="uml:PrimitiveType" href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
</ownedAttribute>
<ownedAttribute xmi:id="Ontology-Location" name="Location">
<type xmi:type="uml:PrimitiveType" href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
</ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="Goal" name="Goal">
<generalization xmi:id="Goal-_generalization.0">
<general xmi:type="uml:Class" href=" ../org.eclipse.uml2.source/src/org.eclipse.uml2.uml_2.1.0.v2 00706141134/model/Infrastructure.uml#_3ADC7B74022D3CA00A4100 02 "/>
</generalization>
<ownedAttribute xmi:id="Goal-Language" name="Language">
<type xmi:type="uml:PrimitiveType" href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
</ownedAttribute>
<ownedAttribute xmi:id="Goal-Title" name="Title">
<type xmi:type="uml:PrimitiveType" href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
</ownedAttribute>
<ownedAttribute xmi:id="Goal-Description" name="Description">
<type xmi:type="uml:PrimitiveType" href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
</ownedAttribute>
<ownedAttribute xmi:id="Goal-Goal_Content" name="Goal_Content">
<type xmi:type="uml:PrimitiveType" href=" pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
</ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="Play" name="Play">
<generalization xmi:id="Play-_generalization.0">
<general xmi:type="uml:Class" href=" ../org.eclipse.uml2.source/src/org.eclipse.uml2.uml_2.1.0.v2 00706141134/model/Infrastructure.uml#_3ADC7B74022D3D51445B01 FA "/>
</generalization>
<ownedAttribute xmi:id="Play-player" name="player" type="AgentType" association="A_play_player">
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Play-player-_upperValue" value="1"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="Play-player-_lowerValue" value="1"/>
</ownedAttribute>
<ownedAttribute xmi:id="Play-role" name="role" type="Role" association="A_role_play">
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Play-role-_upperValue" value="1"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="Play-role-_lowerValue" value="1"/>
</ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:Association" xmi:id="A_play_player" name="A_play_player" visibility="private" memberEnd="AgentType-play Play-player"/>
<packagedElement xmi:type="uml:Association" xmi:id="A_role_play" name="A_role_play" visibility="private" memberEnd="A_role_play-_ownedEnd.0 Play-role">
<ownedEnd xmi:id="A_role_play-_ownedEnd.0" type="Play" association="A_role_play">
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="A_role_play-_ownedEnd.0-_upperValue" value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="A_role_play-_ownedEnd.0-_lowerValue"/>
</ownedEnd>
</packagedElement>
<packagedElement xmi:type="uml:Association" xmi:id="Knows" name="Knows" visibility="private" memberEnd="Knows-agentType AgentType-ontology">
<ownedEnd xmi:id="Knows-agentType" name="agentType" type="AgentType" association="Knows">
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Knows-agentType-_upperValue" value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="Knows-agentType-_lowerValue"/>
</ownedEnd>
</packagedElement>
<packagedElement xmi:type="uml:Association" xmi:id="A_ownedBelieve_agent" name="A_ownedBelieve_agent" visibility="private" memberEnd="AgentType-ownedBelieve Beliefs-agent"/>
<packagedElement xmi:type="uml:Association" xmi:id="A_ownedGoal_agent" name="A_ownedGoal_agent" visibility="private" memberEnd="AgentType-ownedGoal A_ownedGoal_agent-agent">
<ownedEnd xmi:id="A_ownedGoal_agent-agent" name="agent" type="AgentType" association="A_ownedGoal_agent">
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="A_ownedGoal_agent-agent-_lowerValue"/>
</ownedEnd>
</packagedElement>
<packagedElement xmi:type="uml:Association" xmi:id="A_ownedGoal_role" name="A_ownedGoal_role" visibility="private" memberEnd="Role-ownedGoal A_ownedGoal_role-role">
<ownedEnd xmi:id="A_ownedGoal_role-role" name="role" type="Role" association="A_ownedGoal_role"/>
</packagedElement>
<packagedElement xmi:type="uml:PrimitiveType" xmi:id="Boolean" name="Boolean" visibility="private"/>
<packagedElement xmi:type="uml:PrimitiveType" xmi:id="Integer" name="Integer" visibility="private"/>
<packagedElement xmi:type="uml:PrimitiveType" xmi:id="String" name="String" visibility="private"/>
<packagedElement xmi:type="uml:PrimitiveType" xmi:id="UnlimitedNatural" name="UnlimitedNatural" visibility="private"/>
<packagedElement xmi:type="uml:Class" xmi:id="BehavioralFeature" name="BehavioralFeature" isAbstract="true">
<ownedComment xmi:id="BehavioralFeature-_ownedComment.0" annotatedElement="BehavioralFeature">
<body>A behavioral feature is a feature of a classifier that specifies an aspect of the behavior of its instances.</body>
</ownedComment>
<generalization xmi:id="BehavioralFeature-_generalization.0" general="Feature"/>
<generalization xmi:id="BehavioralFeature-_generalization.1" general="Namespace"/>
<ownedAttribute xmi:id="BehavioralFeature-parameter" name="parameter" type="Parameter" isOrdered="true" isReadOnly="true" isDerived="true" subsettedProperty="Namespace-member" association="A_parameter_behavioralFeature">
<ownedComment xmi:id="BehavioralFeature-parameter-_ownedComment.0" annotatedElement="BehavioralFeature-parameter">
<body>Specifies the parameters of the BehavioralFeature.</body>
</ownedComment>
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="BehavioralFeature-parameter-_upperValue" value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="BehavioralFeature-parameter-_lowerValue"/>
</ownedAttribute>
<ownedOperation xmi:id="BehavioralFeature-isDistinguishableFrom" name="isDistinguishableFrom" isQuery="true" redefinedOperation="NamedElement-isDistinguishableFrom" bodyCondition="BehavioralFeature-isDistinguishableFrom-spec ">
<ownedComment xmi:id="BehavioralFeature-isDistinguishableFrom-_ownedComment.0 " annotatedElement="BehavioralFeature-isDistinguishableFrom">
<body>The query isDistinguishableFrom() determines whether two BehavioralFeatures may coexist in the same Namespace. It specifies that they have to have different signatures.</body>
</ownedComment>
<ownedRule xmi:id="BehavioralFeature-isDistinguishableFrom-spec" name="spec" constrainedElement="BehavioralFeature-isDistinguishableFrom ">
<specification xmi:type="uml:OpaqueExpression" xmi:id="BehavioralFeature-isDistinguishableFrom-spec-_specification ">
<language>OCL</language>
<body>result = if n.oclIsKindOf(BehavioralFeature)&#xA;then&#xA; if ns.getNamesOfMember(self)->intersection(ns.getNamesOfMember(n))- >notEmpty()&#xA; then Set{}->including(self)->including(n)->isUnique( bf | bf.parameter->collect(type))&#xA; else true&#xA; endif&#xA;else true&#xA;endif</body>
</specification>
</ownedRule>
<ownedParameter xmi:id="BehavioralFeature-isDistinguishableFrom-_ownedParameter.0 " direction="return">
<type xmi:type="uml:PrimitiveType" href=" ../org.eclipse.uml2.source/src/org.eclipse.uml2.uml_2.1.0.v2 00706141134/model/Infrastructure.uml#_3ADC7B74022D3CA010AC00 90 "/>
</ownedParameter>
<ownedParameter xmi:id="BehavioralFeature-isDistinguishableFrom-n" name="n" type="NamedElement"/>
<ownedParameter xmi:id="BehavioralFeature-isDistinguishableFrom-ns" name="ns" type="Namespace"/>
</ownedOperation>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="Parameter" name="Parameter" isAbstract="true">
<ownedComment xmi:id="Parameter-_ownedComment.0" annotatedElement="Parameter">
<body>A parameter is a specification of an argument used to pass information into or out of an invocation of a behavioral feature.</body>
</ownedComment>
<generalization xmi:id="Parameter-_generalization.0" general="TypedElement"/>
</packagedElement>
<packagedElement xmi:type="uml:Association" xmi:id="A_parameter_behavioralFeature" name="A_parameter_behavioralFeature" visibility="private" memberEnd="BehavioralFeature-parameter A_parameter_behavioralFeature-_ownedEnd.0">
<generalization xmi:id="A_parameter_behavioralFeature-_generalization.0" general="A_member_namespace"/>
<ownedEnd xmi:id="A_parameter_behavioralFeature-_ownedEnd.0" type="BehavioralFeature" association="A_parameter_behavioralFeature">
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="A_parameter_behavioralFeature-_ownedEnd.0-_upperValue " value="1"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="A_parameter_behavioralFeature-_ownedEnd.0-_lowerValue "/>
</ownedEnd>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="StructuralFeature" name="StructuralFeature" isAbstract="true">
<ownedComment xmi:id="StructuralFeature-_ownedComment.0" annotatedElement="StructuralFeature">
<body>A structural feature is a typed feature of a classifier that specifies the structure of instances of the classifier.</body>
</ownedComment>
<generalization xmi:id="StructuralFeature-_generalization.0" general="Feature"/>
<generalization xmi:id="StructuralFeature-_generalization.1" general="TypedElement"/>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="DirectedRelationship" name="DirectedRelationship" isAbstract="true">
<ownedComment xmi:id="DirectedRelationship-_ownedComment.0" annotatedElement="DirectedRelationship">
<body>A directed relationship represents a relationship between a collection of source model elements and a collection of target model elements.</body>
</ownedComment>
<generalization xmi:id="DirectedRelationship-_generalization.0" general="Relationship"/>
<ownedAttribute xmi:id="DirectedRelationship-source" name="source" type="Element" isReadOnly="true" isDerived="true" subsettedProperty="Relationship-relatedElement" association="A_source_directedRelationship">
<ownedComment xmi:id="DirectedRelationship-source-_ownedComment.0" annotatedElement="DirectedRelationship-source">
<body>Specifies the sources of the DirectedRelationship.</body>
</ownedComment>
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="DirectedRelationship-source-_upperValue" value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="DirectedRelationship-source-_lowerValue" value="1"/>
</ownedAttribute>
<ownedAttribute xmi:id="DirectedRelationship-target" name="target" type="Element" isReadOnly="true" isDerived="true" subsettedProperty="Relationship-relatedElement" association="A_target_directedRelationship">
<ownedComment xmi:id="DirectedRelationship-target-_ownedComment.0" annotatedElement="DirectedRelationship-target">
<body>Specifies the targets of the DirectedRelationship.</body>
</ownedComment>
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="DirectedRelationship-target-_upperValue" value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="DirectedRelationship-target-_lowerValue" value="1"/>
</ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="Relationship" name="Relationship" isAbstract="true">
<ownedComment xmi:id="Relationship-_ownedComment.0" annotatedElement="Relationship">
<body>Relationship is an abstract concept that specifies some kind of relationship between elements.</body>
</ownedComment>
<generalization xmi:id="Relationship-_generalization.0" general="Element"/>
<ownedAttribute xmi:id="Relationship-relatedElement" name="relatedElement" type="Element" isReadOnly="true" isDerived="true" isDerivedUnion="true" association="A_relatedElement_relationship">
<ownedComment xmi:id="Relationship-relatedElement-_ownedComment.0" annotatedElement="Relationship-relatedElement">
<body>Specifies the elements related by the Relationship.</body>
</ownedComment>
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Relationship-relatedElement-_upperValue" value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="Relationship-relatedElement-_lowerValue" value="1"/>
</ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:Association" xmi:id="A_relatedElement_relationship" name="A_relatedElement_relationship" visibility="private" memberEnd="Relationship-relatedElement A_relatedElement_relationship-_ownedEnd.0">
<ownedEnd xmi:id="A_relatedElement_relationship-_ownedEnd.0" type="Relationship" association="A_relatedElement_relationship">
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="A_relatedElement_relationship-_ownedEnd.0-_upperValue " value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="A_relatedElement_relationship-_ownedEnd.0-_lowerValue "/>
</ownedEnd>
</packagedElement>
<packagedElement xmi:type="uml:Association" xmi:id="A_source_directedRelationship" name="A_source_directedRelationship" visibility="private" memberEnd="DirectedRelationship-source A_source_directedRelationship-_ownedEnd.0">
<generalization xmi:id="A_source_directedRelationship-_generalization.0" general="A_relatedElement_relationship"/>
<ownedEnd xmi:id="A_source_directedRelationship-_ownedEnd.0" type="DirectedRelationship" association="A_source_directedRelationship">
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="A_source_directedRelationship-_ownedEnd.0-_upperValue " value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="A_source_directedRelationship-_ownedEnd.0-_lowerValue "/>
</ownedEnd>
</packagedElement>
<packagedElement xmi:type="uml:Association" xmi:id="A_target_directedRelationship" name="A_target_directedRelationship" visibility="private" memberEnd="DirectedRelationship-target A_target_directedRelationship-_ownedEnd.0">
<generalization xmi:id="A_target_directedRelationship-_generalization.0" general="A_relatedElement_relationship"/>
<ownedEnd xmi:id="A_target_directedRelationship-_ownedEnd.0" type="DirectedRelationship" association="A_target_directedRelationship">
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="A_target_directedRelationship-_ownedEnd.0-_upperValue " value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="A_target_directedRelationship-_ownedEnd.0-_lowerValue "/>
</ownedEnd>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="Classifier" name="Classifier" isAbstract="true">
<ownedComment xmi:id="Classifier-_ownedComment.0" annotatedElement="Classifier">
<body>A classifier is a classification of instances - it describes a set of instances that have features in common.</body>
</ownedComment>
<generalization xmi:id="Classifier-_generalization.0" general="Namespace"/>
<ownedAttribute xmi:id="Classifier-feature" name="feature" type="Feature" isReadOnly="true" isDerived="true" subsettedProperty="Namespace-member" association="A_feature_featuringClassifier">
<ownedComment xmi:id="Classifier-feature-_ownedComment.0" annotatedElement="Classifier-feature">
<body>Specifies each feature defined in the classifier.</body>
</ownedComment>
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Classifier-feature-_upperValue" value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="Classifier-feature-_lowerValue"/>
</ownedAttribute>
<ownedOperation xmi:id="Classifier-allFeatures" name="allFeatures" isQuery="true" bodyCondition="Classifier-allFeatures-spec">
<ownedComment xmi:id="Classifier-allFeatures-_ownedComment.0" annotatedElement="Classifier-allFeatures">
<body>The query allFeatures() gives all of the features in the namespace of the classifier. In general, through mechanisms such as inheritance, this will be a larger set than feature.</body>
</ownedComment>
<ownedRule xmi:id="Classifier-allFeatures-spec" name="spec" constrainedElement="Classifier-allFeatures">
<specification xmi:type="uml:OpaqueExpression" xmi:id="Classifier-allFeatures-spec-_specification">
<language>OCL</language>
<body>result = member->select(oclIsKindOf(Feature))</body>
</specification>
</ownedRule>
<ownedParameter xmi:id="Classifier-allFeatures-_ownedParameter.0" type="Feature" direction="return">
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Classifier-allFeatures-_ownedParameter.0-_upperValue " value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="Classifier-allFeatures-_ownedParameter.0-_lowerValue "/>
</ownedParameter>
</ownedOperation>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="Feature" name="Feature" isAbstract="true">
<ownedComment xmi:id="Feature-_ownedComment.0" annotatedElement="Feature">
<body>A feature declares a behavioral or structural characteristic of instances of classifiers.</body>
</ownedComment>
<generalization xmi:id="Feature-_generalization.0" general="NamedElement"/>
<ownedAttribute xmi:id="Feature-featuringClassifier" name="featuringClassifier" type="Classifier" isReadOnly="true" isDerived="true" association="A_feature_featuringClassifier">
<ownedComment xmi:id="Feature-featuringClassifier-_ownedComment.0" annotatedElement="Feature-featuringClassifier">
<body>The Classifiers that have this Feature as a feature.</body>
</ownedComment>
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="Feature-featuringClassifier-_upperValue" value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="Feature-featuringClassifier-_lowerValue"/>
</ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:Association" xmi:id="A_feature_featuringClassifier" name="A_feature_featuringClassifier" visibility="private" memberEnd="Classifier-feature Feature-featuringClassifier">
<generalization xmi:id="A_feature_featuringClassifier-_generalization.0" general="A_member_namespace"/>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="Type" name="Type" isAbstract="true">
<ownedComment xmi:id="Type-_ownedComment.0" annotatedElement="Type">
<body>A type constrains the values represented by a typed element.</body>
</ownedComment>
<generalization xmi:id="Type-_generalization.0" general="NamedElement"/>
<ownedOperation xmi:id="Type-conformsTo" name="conformsTo" isQuery="true" bodyCondition="Type-conformsTo-spec">
<ownedComment xmi:id="Type-conformsTo-_ownedComment.0" annotatedElement="Type-conformsTo">
<body>The query conformsTo() gives true for a type that conforms to another. By default, two types do not conform to each other. This query is intended to be redefined for specific conformance situations.</body>
</ownedComment>
<ownedRule xmi:id="Type-conformsTo-spec" name="spec" constrainedElement="Type-conformsTo">
<specification xmi:type="uml:OpaqueExpression" xmi:id="Type-conformsTo-spec-_specification">
<language>OCL</language>
<body>result = false</body>
</specification>
</ownedRule>
<ownedParameter xmi:id="Type-conformsTo-_ownedParameter.0" direction="return">
<type xmi:type="uml:PrimitiveType" href=" ../org.eclipse.uml2.source/src/org.eclipse.uml2.uml_2.1.0.v2 00706141134/model/Infrastructure.uml#_3ADC7B74022D3CA010AC00 90 "/>
</ownedParameter>
<ownedParameter xmi:id="Type-conformsTo-other" name="other" type="Type"/>
</ownedOperation>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="TypedElement" name="TypedElement" isAbstract="true">
<ownedComment xmi:id="TypedElement-_ownedComment.0" annotatedElement="TypedElement">
<body>A typed element has a type.</body>
</ownedComment>
<generalization xmi:id="TypedElement-_generalization.0" general="NamedElement"/>
<ownedAttribute xmi:id="TypedElement-type" name="type" type="Type" association="A_type_typedElement">
<ownedComment xmi:id="TypedElement-type-_ownedComment.0" annotatedElement="TypedElement-type">
<body>The type of the TypedElement.</body>
</ownedComment>
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="TypedElement-type-_upperValue" value="1"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="TypedElement-type-_lowerValue"/>
</ownedAttribute>
</packagedElement>
<packagedElement xmi:type="uml:Association" xmi:id="A_type_typedElement" name="A_type_typedElement" visibility="private" memberEnd="TypedElement-type A_type_typedElement-_ownedEnd.0">
<ownedEnd xmi:id="A_type_typedElement-_ownedEnd.0" type="TypedElement" association="A_type_typedElement">
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="A_type_typedElement-_ownedEnd.0-_upperValue" value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="A_type_typedElement-_ownedEnd.0-_lowerValue"/>
</ownedEnd>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="NamedElement" name="NamedElement" isAbstract="true">
<ownedComment xmi:id="NamedElement-_ownedComment.0" annotatedElement="NamedElement">
<body>A named element is an element in a model that may have a name.</body>
</ownedComment>
<ownedRule xmi:id="NamedElement-has_no_qualified_name" name="has_no_qualified_name" constrainedElement="NamedElement">
<ownedComment xmi:id="NamedElement-has_no_qualified_name-_ownedComment.0" annotatedElement="NamedElement-has_no_qualified_name">
<body>If there is no name, or one of the containing namespaces has no name, there is no qualified name.</body>
</ownedComment>
<specification xmi:type="uml:OpaqueExpression" xmi:id="NamedElement-has_no_qualified_name-_specification">
<language>OCL</language>
<body>(self.name->isEmpty() or self.allNamespaces()->select(ns | ns.name->isEmpty())->notEmpty())&#xD;&#xA; implies self.qualifiedName->isEmpty()</body>
</specification>
</ownedRule>
<ownedRule xmi:id="NamedElement-has_qualified_name" name="has_qualified_name" constrainedElement="NamedElement">
<ownedComment xmi:id="NamedElement-has_qualified_name-_ownedComment.0" annotatedElement="NamedElement-has_qualified_name">
<body>When there is a name, and all of the containing namespaces have a name, the qualified name is constructed from the names of the containing namespaces.</body>
</ownedComment>
<specification xmi:type="uml:OpaqueExpression" xmi:id="NamedElement-has_qualified_name-_specification">
<language>OCL</language>
<body>(self.name->notEmpty() and self.allNamespaces()->select(ns | ns.name->isEmpty())->isEmpty()) implies&#xA; self.qualifiedName = self.allNamespaces()->iterate( ns : Namespace; result: String = self.name | ns.name->union(self.separator())->union(result))</body>
</specification>
</ownedRule>
<generalization xmi:id="NamedElement-_generalization.0" general="Element"/>
<ownedAttribute xmi:id="NamedElement-name" name="name">
<ownedComment xmi:id="NamedElement-name-_ownedComment.0" annotatedElement="NamedElement-name">
<body>The name of the NamedElement.</body>
</ownedComment>
<type xmi:type="uml:PrimitiveType" href=" ../org.eclipse.uml2.source/src/org.eclipse.uml2.uml_2.1.0.v2 00706141134/model/Infrastructure.uml#_3ADC7B74022D3CA010B103 C3 "/>
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="NamedElement-name-_upperValue" value="1"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="NamedElement-name-_lowerValue"/>
</ownedAttribute>
<ownedAttribute xmi:id="NamedElement-qualifiedName" name="qualifiedName" isReadOnly="true" isDerived="true">
<ownedComment xmi:id="NamedElement-qualifiedName-_ownedComment.0" annotatedElement="NamedElement-qualifiedName">
<body>A name which allows the NamedElement to be identified within a hierarchy of nested Namespaces. It is constructed from the names of the containing namespaces starting at the root of the hierarchy and ending with the name of the NamedElement itself.</body>
</ownedComment>
<type xmi:type="uml:PrimitiveType" href=" ../org.eclipse.uml2.source/src/org.eclipse.uml2.uml_2..1.0.v 200706141134/model/Infrastructure.uml#_3ADC7B74022D3CA010B10 3C3 "/>
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="NamedElement-qualifiedName-_upperValue" value="1"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="NamedElement-qualifiedName-_lowerValue"/>
</ownedAttribute>
<ownedAttribute xmi:id="NamedElement-namespace" name="namespace" type="Namespace" isReadOnly="true" isDerived="true" subsettedProperty="Element-owner" association="A_ownedMember_namespace">
<ownedComment xmi:id="NamedElement-namespace-_ownedComment.0" annotatedElement="NamedElement-namespace">
<body>Specifies the namespace that owns the NamedElement.</body>
</ownedComment>
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="NamedElement-namespace-_upperValue" value="1"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="NamedElement-namespace-_lowerValue"/>
</ownedAttribute>
<ownedOperation xmi:id="NamedElement-allNamespaces" name="allNamespaces" isQuery="true" bodyCondition="NamedElement-allNamespaces-spec">
<ownedComment xmi:id="NamedElement-allNamespaces-_ownedComment.0" annotatedElement="NamedElement-allNamespaces">
<body>The query allNamespaces() gives the sequence of namespaces in which the NamedElement is nested, working outwards.</body>
</ownedComment>
<ownedRule xmi:id="NamedElement-allNamespaces-spec" name="spec" constrainedElement="NamedElement-allNamespaces">
<specification xmi:type="uml:OpaqueExpression" xmi:id="NamedElement-allNamespaces-spec-_specification">
<language>OCL</language>
<body>result = if self.namespace->isEmpty()&#xA;then Sequence{}&#xA;else self.namespace.allNamespaces()->prepend(self.namespace)&#xA;endif </body>
</specification>
</ownedRule>
<ownedParameter xmi:id="NamedElement-allNamespaces-_ownedParameter.0" type="Namespace" isOrdered="true" direction="return">
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="NamedElement-allNamespaces-_ownedParameter.0-_upperValue " value="*"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="NamedElement-allNamespaces-_ownedParameter.0-_lowerValue "/>
</ownedParameter>
</ownedOperation>
<ownedOperation xmi:id="NamedElement-isDistinguishableFrom" name="isDistinguishableFrom" isQuery="true" bodyCondition="NamedElement-isDistinguishableFrom-spec">
<ownedComment xmi:id="NamedElement-isDistinguishableFrom-_ownedComment.0" annotatedElement="NamedElement-isDistinguishableFrom">
<body>The query isDistinguishableFrom() determines whether two NamedElements may logically co-exist within a Namespace. By default, two named elements are distinguishable if (a) they have unrelated types or (b) they have related types but different names.</body>
</ownedComment>
<ownedRule xmi:id="NamedElement-isDistinguishableFrom-spec" name="spec" constrainedElement="NamedElement-isDistinguishableFrom">
<specification xmi:type="uml:OpaqueExpression" xmi:id="NamedElement-isDistinguishableFrom-spec-_specification ">
<language>OCL</language>
<body>result = if self.oclIsKindOf(n.oclType) or n.oclIsKindOf(self.oclType)&#xA;then ns.getNamesOfMember(self)->intersection(ns.getNamesOfMember(n))- >isEmpty()&#xA;else true&#xA;endif</body>
</specification>
</ownedRule>
<ownedParameter xmi:id="NamedElement-isDistinguishableFrom-_ownedParameter.0 " direction="return">
<type xmi:type="uml:PrimitiveType" href=" ../org.eclipse.uml2.source/src/org.eclipse.uml2.uml_2.1.0.v2 00706141134/model/Infrastructure.uml#_3ADC7B74022D3CA010AC00 90 "/>
</ownedParameter>
<ownedParameter xmi:id="NamedElement-isDistinguishableFrom-n" name="n" type="NamedElement"/>
<ownedParameter xmi:id="NamedElement-isDistinguishableFrom-ns" name="ns" type="Namespace"/>
</ownedOperation>
<ownedOperation xmi:id="NamedElement-separator" name="separator" isQuery="true" bodyCondition="NamedElement-separator-spec">
<ownedComment xmi:id="NamedElement-separator-_ownedComment.0" annotatedElement="NamedElement-separator">
<body>The query separator() gives the string that is used to separate names when constructing a qualified name.</body>
</ownedComment>
<ownedRule xmi:id="NamedElement-separator-spec" name="spec" constrainedElement="NamedElement-separator">
<specification xmi:type="uml:OpaqueExpression" xmi:id="NamedElement-separator-spec-_specification">
<language>OCL</language>
<body>result = '::'</body>
</specification>
</ownedRule>
<ownedParameter xmi:id="NamedElement-separator-_ownedParameter.0" direction="return">
<type xmi:type="uml:PrimitiveType" href=" ../org.eclipse.uml2.source/src/org.eclipse.uml2.uml_2.1.0.v2 00706141134/model/Infrastructure.uml#_3ADC7B74022D3CA010B103 C3 "/>
</ownedParameter>
</ownedOperation>
<ownedOperation xmi:id="NamedElement-qualifiedName.1" name="qualifiedName" isQuery="true" bodyCondition="NamedElement-qualifiedName.1-spe
Re: errors while metamodeling [message #624605 is a reply to message #475571] Fri, 31 August 2007 14:31 Go to previous message
Manar El-Kady is currently offline Manar El-KadyFriend
Messages: 78
Registered: July 2009
Member
I discovered that I must obtain the OCL pugins that are used in the
generated code. So, After I installed it, the remaining errors are "The
string literal is not closed by a double-qoute " in all the OCL
expressions For example,

protected static final String ALL_NAMESPACES__EOCL_EXP = "result = if
self.namespace->isEmpty()
then Sequence{}
else self.namespace.allNamespaces()->prepend(self.namespace)
endif";

that I corrected to

protected static final String ALL_NAMESPACES__EOCL_EXP = "result = if
self.namespace->isEmpty(" +
"then Sequence{}" +
"else self.namespace.allNamespaces()->prepend(self.namespace)" +
"endif";


After correcting all the invalid OCL expression, there are unresolved
types errors for createUnlimitedNaturalFromString, and UnlimitedNatural,
which I can't solve.

I used eclipse, emf, and UML2 version RC3, and OCL mdt-ocl-runtime-1.1.zip


Manar



Manar El-Kady wrote:
> Kenn,
> Attached, you can find the model after applying the package merge and
> another one before applying the package merge.
>
>
> Manar,
>
>
> Kenn Hussey wrote:
>> Manar,
>>
>> I was wondering what kind of relationships there are between your
>> merged model (i.e. after selecting UML Editor > Package > Merge...)
>> and the other source models (Infrastructure, Superstructure). Ideally,
>> after the merge, your model should have no lingering dependencies on
>> any other model, otherwise you'll need to implement (pieces of it)
>> yourself... Again, if you want to attach your model we could try to
>> see what is going wrong...
>>
>> Kenn
>>
>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>> news:fb3fj7$v3e$1@build.eclipse.org...
>>> Kenn,
>>>
>>> I didn't understand what do you mean exactly. After applying the
>>> package merge I didn't find any import in the resulting package to
>>> merge it to my metamodel, is it what do you mean?
>>>
>>>
>>> Manar,
>>>
>>>
>>>
>>> Kenn Hussey wrote:
>>>> Manar,
>>>>
>>>> After you merge these packages, are there remaining references to
>>>> elements in them? For example, if you perform the package merge,
>>>> save the model, and inspect the serialization, to you see lingering
>>>> references to InfrastructureLibrary.uml?
>>>>
>>>> Kenn
>>>>
>>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>>>> news:famqhn$gnk$1@build.eclipse.org...
>>>>> Kenn,
>>>>>
>>>>> Firstly, I merge the PrimitiveTypes, BehavioralFeatures,
>>>>> StructuralFeatures, Relationships packages, which I use directly.
>>>>> After that I add a merge for the Classifiers, TypedElements,
>>>>> Namespaces, and Elements packages, which Imported by the packages
>>>>> that I use. In both cases the same errors happened.
>>>>>
>>>>>
>>>>>
>>>>> Manar
>>>>>
>>>>>
>>>>> Kenn Hussey wrote:
>>>>>> Manar,
>>>>>>
>>>>>> Are you sure you are merging all packages from Abstractions that
>>>>>> are directly or indirectly referenced from elements in your domain
>>>>>> (e.g. as types, superclasses, etc.)?
>>>>>>
>>>>>> Kenn
>>>>>>
>>>>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>>>>>> news:fama83$ahr$1@build.eclipse.org...
>>>>>>> Kenn,
>>>>>>>
>>>>>>> I did a package merge instead of a package import. Validation
>>>>>>> before applying the package merge was done successfully. But,
>>>>>>> after applying the package merge and validating the metamodel,
>>>>>>> the validation get the same error as before.
>>>>>>>
>>>>>>> While generating the code, still there is an obligation to
>>>>>>> generate code for the abstractionLibrary package. Moreover, the
>>>>>>> generated code has errors ?
>>>>>>>
>>>>>>> Is there a mistake while referring to the InfrastructureLibrary
>>>>>>> package? or what?
>>>>>>>
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Manar
>>>>>>>
>>>>>>>
>>>>>>> Kenn Hussey wrote:
>>>>>>>> Manar,
>>>>>>>>
>>>>>>>> Sorry for the delayed response. See answers below.
>>>>>>>>
>>>>>>>> Kenn
>>>>>>>>
>>>>>>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>>>>>>>> news:fabvhl$k6f$1@build.eclipse.org...
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> I build a metamodel as a heavyweight extension.I do the
>>>>>>>>> following steps:
>>>>>>>>> - create an empty UML model
>>>>>>>>> - convert the model to a metamodel
>>>>>>>>> - apply the ecore profile, and then apply the epackage
>>>>>>>>> stereotype to the
>>>>>>>>> root model element
>>>>>>>>> - add some elements for the metamodel
>>>>>>>>> - merge the primitive types package
>>>>>>>>> - add the infrastructure.uml as a resource to my metamodel
>>>>>>>>> (Note: I added it by using the editor. I added it from a
>>>>>>>>> project in my workspace that containing
>>>>>>>>> platform:/resource/org.eclipse.uml2.source\src\org.eclipse.u ml2.uml_2.1.0.v200706141134\model\Infrastructure.uml)
>>>>>>>>>
>>>>>>>>> - While creating the elements of the metamodels I extended
>>>>>>>>> classes from the subpackages of the Abstractions package. So, I
>>>>>>>>> imported the packages that containing the classes which I extend.
>>>>>>>>> - finally I apply the package merge, and convert it again to a
>>>>>>>>> metamodel.
>>>>>>>>>
>>>>>>>>> My questions are:
>>>>>>>>> - After these steps I did a validation, and an error occur "
>>>>>>>>> Not all the members of a namespace'<<metamodel, ePackage>>
>>>>>>>>> <Model> MAS-UML' are distinguishable within it." ??
>>>>>>>>>
>>>>>>>> These warnings can usually be ignored. I suspect it's
>>>>>>>> complaining about the primitive types, i.e. that names like
>>>>>>>> 'Integer' exist both as owned members in your merged package,
>>>>>>>> and as members directly or indirecty imported from another
>>>>>>>> namespace. However, the package imports will be troublesome -
>>>>>>>> see below.
>>>>>>>>
>>>>>>>>> - I tried to do these steps without doing package import and I
>>>>>>>>> didn't notice any difference or errors happened. so, what is
>>>>>>>>> the need for doing a package import in a metamodeling?
>>>>>>>>>
>>>>>>>> Strictly speaking, you don't _need_ package imports.
>>>>>>>> Semantically, all they do is allow you to refer to a named
>>>>>>>> element without using its qualified name. Is is, however, good
>>>>>>>> practice to declare your dependencies this way...
>>>>>>>>
>>>>>>>>> - After creating the metamodel I create an EMF project for code
>>>>>>>>> generation. Here, I obligated to generate code for the
>>>>>>>>> infrastructureLibrary package, which I didn't need. Why that?
>>>>>>>>>
>>>>>>>> Well, after a merge, you shouldn't have any lingering
>>>>>>>> dependencies on other packages such as ones in
>>>>>>>> InfrastructureLibrary. Since UML2 does not provide an
>>>>>>>> implementation of InfrastructureLibrary on its own, you'll need
>>>>>>>> to implement it yourself. However, I would recommend _merging_
>>>>>>>> the packages from Abstractions that contain the types you are
>>>>>>>> extending rather than importing them. That way, you will be
>>>>>>>> implementing the types within your own (heavyweight) namespace
>>>>>>>> and the imports won't linger (and hence the namespace warnings
>>>>>>>> would go away).
>>>>>>>>
>>>>>>>>> - After the code generation, there are some errors in the
>>>>>>>>> generated code for the infrastructureLibrary package and for my
>>>>>>>>> metamodel code. all the errors in the impl files and said that
>>>>>>>>> xxx cannot be resolved??
>>>>>>>>>
>>>>>>>> Without knowing more about the errors, it's hard to say how to
>>>>>>>> fix them, but I suspect that if you ensure that everything from
>>>>>>>> UML that you need gets merged into your domain, and that you
>>>>>>>> reference existing implementations of things that aren't in your
>>>>>>>> domain, you'll be better off...
>>>>>>>>
>>>>>>>>> Sorry for this long mail, and thanks in advance.
>>>>>>>>>
>>>>>>>>> Manar
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> I applied the epackage
>>>>>>>>> stereotype to the root element, merged the primitive types
>>>>>>>>> package, and
>>>>>>>>> import some sub-packaged from the the Abstractions package
>>>>>>>>>
>>
>
Re: errors while metamodeling [message #624727 is a reply to message #475578] Wed, 05 September 2007 19:06 Go to previous message
Manar El-Kady is currently offline Manar El-KadyFriend
Messages: 78
Registered: July 2009
Member
Hi,

I am waiting for reply to my post. Anyone can help me?

Manar,


Manar El-Kady wrote:
>
> I discovered that I must obtain the OCL pugins that are used in the
> generated code. So, After I installed it, the remaining errors are "The
> string literal is not closed by a double-qoute " in all the OCL
> expressions For example,
>
> protected static final String ALL_NAMESPACES__EOCL_EXP = "result = if
> self.namespace->isEmpty()
> then Sequence{}
> else self.namespace.allNamespaces()->prepend(self.namespace)
> endif";
>
> that I corrected to
>
> protected static final String ALL_NAMESPACES__EOCL_EXP = "result = if
> self.namespace->isEmpty(" +
> "then Sequence{}" +
> "else self.namespace.allNamespaces()->prepend(self.namespace)" +
> "endif";
>
>
> After correcting all the invalid OCL expression, there are unresolved
> types errors for createUnlimitedNaturalFromString, and UnlimitedNatural,
> which I can't solve.
>
> I used eclipse, emf, and UML2 version RC3, and OCL mdt-ocl-runtime-1.1.zip
>
>
> Manar
>
>
>
> Manar El-Kady wrote:
>> Kenn,
>> Attached, you can find the model after applying the package merge and
>> another one before applying the package merge.
>>
>>
>> Manar,
>>
>>
>> Kenn Hussey wrote:
>>> Manar,
>>>
>>> I was wondering what kind of relationships there are between your
>>> merged model (i.e. after selecting UML Editor > Package > Merge...)
>>> and the other source models (Infrastructure, Superstructure).
>>> Ideally, after the merge, your model should have no lingering
>>> dependencies on any other model, otherwise you'll need to implement
>>> (pieces of it) yourself... Again, if you want to attach your model we
>>> could try to see what is going wrong...
>>>
>>> Kenn
>>>
>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>>> news:fb3fj7$v3e$1@build.eclipse.org...
>>>> Kenn,
>>>>
>>>> I didn't understand what do you mean exactly. After applying the
>>>> package merge I didn't find any import in the resulting package to
>>>> merge it to my metamodel, is it what do you mean?
>>>>
>>>>
>>>> Manar,
>>>>
>>>>
>>>>
>>>> Kenn Hussey wrote:
>>>>> Manar,
>>>>>
>>>>> After you merge these packages, are there remaining references to
>>>>> elements in them? For example, if you perform the package merge,
>>>>> save the model, and inspect the serialization, to you see lingering
>>>>> references to InfrastructureLibrary.uml?
>>>>>
>>>>> Kenn
>>>>>
>>>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>>>>> news:famqhn$gnk$1@build.eclipse.org...
>>>>>> Kenn,
>>>>>>
>>>>>> Firstly, I merge the PrimitiveTypes, BehavioralFeatures,
>>>>>> StructuralFeatures, Relationships packages, which I use directly.
>>>>>> After that I add a merge for the Classifiers, TypedElements,
>>>>>> Namespaces, and Elements packages, which Imported by the packages
>>>>>> that I use. In both cases the same errors happened.
>>>>>>
>>>>>>
>>>>>>
>>>>>> Manar
>>>>>>
>>>>>>
>>>>>> Kenn Hussey wrote:
>>>>>>> Manar,
>>>>>>>
>>>>>>> Are you sure you are merging all packages from Abstractions that
>>>>>>> are directly or indirectly referenced from elements in your
>>>>>>> domain (e.g. as types, superclasses, etc.)?
>>>>>>>
>>>>>>> Kenn
>>>>>>>
>>>>>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>>>>>>> news:fama83$ahr$1@build.eclipse.org...
>>>>>>>> Kenn,
>>>>>>>>
>>>>>>>> I did a package merge instead of a package import. Validation
>>>>>>>> before applying the package merge was done successfully. But,
>>>>>>>> after applying the package merge and validating the metamodel,
>>>>>>>> the validation get the same error as before.
>>>>>>>>
>>>>>>>> While generating the code, still there is an obligation to
>>>>>>>> generate code for the abstractionLibrary package. Moreover, the
>>>>>>>> generated code has errors ?
>>>>>>>>
>>>>>>>> Is there a mistake while referring to the InfrastructureLibrary
>>>>>>>> package? or what?
>>>>>>>>
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Manar
>>>>>>>>
>>>>>>>>
>>>>>>>> Kenn Hussey wrote:
>>>>>>>>> Manar,
>>>>>>>>>
>>>>>>>>> Sorry for the delayed response. See answers below.
>>>>>>>>>
>>>>>>>>> Kenn
>>>>>>>>>
>>>>>>>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>>>>>>>>> news:fabvhl$k6f$1@build.eclipse.org...
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> I build a metamodel as a heavyweight extension.I do the
>>>>>>>>>> following steps:
>>>>>>>>>> - create an empty UML model
>>>>>>>>>> - convert the model to a metamodel
>>>>>>>>>> - apply the ecore profile, and then apply the epackage
>>>>>>>>>> stereotype to the
>>>>>>>>>> root model element
>>>>>>>>>> - add some elements for the metamodel
>>>>>>>>>> - merge the primitive types package
>>>>>>>>>> - add the infrastructure.uml as a resource to my metamodel
>>>>>>>>>> (Note: I added it by using the editor. I added it from a
>>>>>>>>>> project in my workspace that containing
>>>>>>>>>> platform:/resource/org.eclipse.uml2.source\src\org.eclipse.u ml2.uml_2.1.0.v200706141134\model\Infrastructure.uml)
>>>>>>>>>>
>>>>>>>>>> - While creating the elements of the metamodels I extended
>>>>>>>>>> classes from the subpackages of the Abstractions package. So,
>>>>>>>>>> I imported the packages that containing the classes which I
>>>>>>>>>> extend.
>>>>>>>>>> - finally I apply the package merge, and convert it again to a
>>>>>>>>>> metamodel.
>>>>>>>>>>
>>>>>>>>>> My questions are:
>>>>>>>>>> - After these steps I did a validation, and an error occur "
>>>>>>>>>> Not all the members of a namespace'<<metamodel, ePackage>>
>>>>>>>>>> <Model> MAS-UML' are distinguishable within it." ??
>>>>>>>>>>
>>>>>>>>> These warnings can usually be ignored. I suspect it's
>>>>>>>>> complaining about the primitive types, i.e. that names like
>>>>>>>>> 'Integer' exist both as owned members in your merged package,
>>>>>>>>> and as members directly or indirecty imported from another
>>>>>>>>> namespace. However, the package imports will be troublesome -
>>>>>>>>> see below.
>>>>>>>>>
>>>>>>>>>> - I tried to do these steps without doing package import and I
>>>>>>>>>> didn't notice any difference or errors happened. so, what is
>>>>>>>>>> the need for doing a package import in a metamodeling?
>>>>>>>>>>
>>>>>>>>> Strictly speaking, you don't _need_ package imports.
>>>>>>>>> Semantically, all they do is allow you to refer to a named
>>>>>>>>> element without using its qualified name. Is is, however, good
>>>>>>>>> practice to declare your dependencies this way...
>>>>>>>>>
>>>>>>>>>> - After creating the metamodel I create an EMF project for
>>>>>>>>>> code generation. Here, I obligated to generate code for the
>>>>>>>>>> infrastructureLibrary package, which I didn't need. Why that?
>>>>>>>>>>
>>>>>>>>> Well, after a merge, you shouldn't have any lingering
>>>>>>>>> dependencies on other packages such as ones in
>>>>>>>>> InfrastructureLibrary. Since UML2 does not provide an
>>>>>>>>> implementation of InfrastructureLibrary on its own, you'll need
>>>>>>>>> to implement it yourself. However, I would recommend _merging_
>>>>>>>>> the packages from Abstractions that contain the types you are
>>>>>>>>> extending rather than importing them. That way, you will be
>>>>>>>>> implementing the types within your own (heavyweight) namespace
>>>>>>>>> and the imports won't linger (and hence the namespace warnings
>>>>>>>>> would go away).
>>>>>>>>>
>>>>>>>>>> - After the code generation, there are some errors in the
>>>>>>>>>> generated code for the infrastructureLibrary package and for
>>>>>>>>>> my metamodel code. all the errors in the impl files and said
>>>>>>>>>> that xxx cannot be resolved??
>>>>>>>>>>
>>>>>>>>> Without knowing more about the errors, it's hard to say how to
>>>>>>>>> fix them, but I suspect that if you ensure that everything from
>>>>>>>>> UML that you need gets merged into your domain, and that you
>>>>>>>>> reference existing implementations of things that aren't in
>>>>>>>>> your domain, you'll be better off...
>>>>>>>>>
>>>>>>>>>> Sorry for this long mail, and thanks in advance.
>>>>>>>>>>
>>>>>>>>>> Manar
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> I applied the epackage
>>>>>>>>>> stereotype to the root element, merged the primitive types
>>>>>>>>>> package, and
>>>>>>>>>> import some sub-packaged from the the Abstractions package
>>>>>>>>>>
>>>
>>
Re: errors while metamodeling [message #624733 is a reply to message #475775] Thu, 06 September 2007 13:22 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Manar,

I'll have a look at your model and get back to you.

- James.


"Manar El-Kady" <manar.elkady@gmail.com> wrote in message
news:fbmuob$4d5$1@build.eclipse.org...
> Hi,
>
> I am waiting for reply to my post. Anyone can help me?
>
> Manar,
>
>
> Manar El-Kady wrote:
> >
> > I discovered that I must obtain the OCL pugins that are used in the
> > generated code. So, After I installed it, the remaining errors are "The
> > string literal is not closed by a double-qoute " in all the OCL
> > expressions For example,
> >
> > protected static final String ALL_NAMESPACES__EOCL_EXP = "result = if
> > self.namespace->isEmpty()
> > then Sequence{}
> > else self.namespace.allNamespaces()->prepend(self.namespace)
> > endif";
> >
> > that I corrected to
> >
> > protected static final String ALL_NAMESPACES__EOCL_EXP = "result = if
> > self.namespace->isEmpty(" +
> > "then Sequence{}" +
> > "else self.namespace.allNamespaces()->prepend(self.namespace)" +
> > "endif";
> >
> >
> > After correcting all the invalid OCL expression, there are unresolved
> > types errors for createUnlimitedNaturalFromString, and UnlimitedNatural,
> > which I can't solve.
> >
> > I used eclipse, emf, and UML2 version RC3, and OCL
mdt-ocl-runtime-1.1.zip
> >
> >
> > Manar
> >
> >
> >
> > Manar El-Kady wrote:
> >> Kenn,
> >> Attached, you can find the model after applying the package merge and
> >> another one before applying the package merge.
> >>
> >>
> >> Manar,
> >>
> >>
> >> Kenn Hussey wrote:
> >>> Manar,
> >>>
> >>> I was wondering what kind of relationships there are between your
> >>> merged model (i.e. after selecting UML Editor > Package > Merge...)
> >>> and the other source models (Infrastructure, Superstructure).
> >>> Ideally, after the merge, your model should have no lingering
> >>> dependencies on any other model, otherwise you'll need to implement
> >>> (pieces of it) yourself... Again, if you want to attach your model we
> >>> could try to see what is going wrong...
> >>>
> >>> Kenn
> >>>
> >>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
> >>> news:fb3fj7$v3e$1@build.eclipse.org...
> >>>> Kenn,
> >>>>
> >>>> I didn't understand what do you mean exactly. After applying the
> >>>> package merge I didn't find any import in the resulting package to
> >>>> merge it to my metamodel, is it what do you mean?
> >>>>
> >>>>
> >>>> Manar,
> >>>>
> >>>>
> >>>>
> >>>> Kenn Hussey wrote:
> >>>>> Manar,
> >>>>>
> >>>>> After you merge these packages, are there remaining references to
> >>>>> elements in them? For example, if you perform the package merge,
> >>>>> save the model, and inspect the serialization, to you see lingering
> >>>>> references to InfrastructureLibrary.uml?
> >>>>>
> >>>>> Kenn
> >>>>>
> >>>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
> >>>>> news:famqhn$gnk$1@build.eclipse.org...
> >>>>>> Kenn,
> >>>>>>
> >>>>>> Firstly, I merge the PrimitiveTypes, BehavioralFeatures,
> >>>>>> StructuralFeatures, Relationships packages, which I use directly.
> >>>>>> After that I add a merge for the Classifiers, TypedElements,
> >>>>>> Namespaces, and Elements packages, which Imported by the packages
> >>>>>> that I use. In both cases the same errors happened.
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> Manar
> >>>>>>
> >>>>>>
> >>>>>> Kenn Hussey wrote:
> >>>>>>> Manar,
> >>>>>>>
> >>>>>>> Are you sure you are merging all packages from Abstractions that
> >>>>>>> are directly or indirectly referenced from elements in your
> >>>>>>> domain (e.g. as types, superclasses, etc.)?
> >>>>>>>
> >>>>>>> Kenn
> >>>>>>>
> >>>>>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
> >>>>>>> news:fama83$ahr$1@build.eclipse.org...
> >>>>>>>> Kenn,
> >>>>>>>>
> >>>>>>>> I did a package merge instead of a package import. Validation
> >>>>>>>> before applying the package merge was done successfully. But,
> >>>>>>>> after applying the package merge and validating the metamodel,
> >>>>>>>> the validation get the same error as before.
> >>>>>>>>
> >>>>>>>> While generating the code, still there is an obligation to
> >>>>>>>> generate code for the abstractionLibrary package. Moreover, the
> >>>>>>>> generated code has errors ?
> >>>>>>>>
> >>>>>>>> Is there a mistake while referring to the InfrastructureLibrary
> >>>>>>>> package? or what?
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> Thanks,
> >>>>>>>> Manar
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> Kenn Hussey wrote:
> >>>>>>>>> Manar,
> >>>>>>>>>
> >>>>>>>>> Sorry for the delayed response. See answers below.
> >>>>>>>>>
> >>>>>>>>> Kenn
> >>>>>>>>>
> >>>>>>>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
> >>>>>>>>> news:fabvhl$k6f$1@build.eclipse.org...
> >>>>>>>>>> Hi,
> >>>>>>>>>>
> >>>>>>>>>> I build a metamodel as a heavyweight extension.I do the
> >>>>>>>>>> following steps:
> >>>>>>>>>> - create an empty UML model
> >>>>>>>>>> - convert the model to a metamodel
> >>>>>>>>>> - apply the ecore profile, and then apply the epackage
> >>>>>>>>>> stereotype to the
> >>>>>>>>>> root model element
> >>>>>>>>>> - add some elements for the metamodel
> >>>>>>>>>> - merge the primitive types package
> >>>>>>>>>> - add the infrastructure.uml as a resource to my metamodel
> >>>>>>>>>> (Note: I added it by using the editor. I added it from a
> >>>>>>>>>> project in my workspace that containing
> >>>>>>>>>>
platform:/resource/org.eclipse.uml2.source\src\org.eclipse.u ml2.uml_2.1.0.v2
00706141134\model\Infrastructure.uml)
> >>>>>>>>>>
> >>>>>>>>>> - While creating the elements of the metamodels I extended
> >>>>>>>>>> classes from the subpackages of the Abstractions package. So,
> >>>>>>>>>> I imported the packages that containing the classes which I
> >>>>>>>>>> extend.
> >>>>>>>>>> - finally I apply the package merge, and convert it again to a
> >>>>>>>>>> metamodel.
> >>>>>>>>>>
> >>>>>>>>>> My questions are:
> >>>>>>>>>> - After these steps I did a validation, and an error occur "
> >>>>>>>>>> Not all the members of a namespace'<<metamodel, ePackage>>
> >>>>>>>>>> <Model> MAS-UML' are distinguishable within it." ??
> >>>>>>>>>>
> >>>>>>>>> These warnings can usually be ignored. I suspect it's
> >>>>>>>>> complaining about the primitive types, i.e. that names like
> >>>>>>>>> 'Integer' exist both as owned members in your merged package,
> >>>>>>>>> and as members directly or indirecty imported from another
> >>>>>>>>> namespace. However, the package imports will be troublesome -
> >>>>>>>>> see below.
> >>>>>>>>>
> >>>>>>>>>> - I tried to do these steps without doing package import and I
> >>>>>>>>>> didn't notice any difference or errors happened. so, what is
> >>>>>>>>>> the need for doing a package import in a metamodeling?
> >>>>>>>>>>
> >>>>>>>>> Strictly speaking, you don't _need_ package imports.
> >>>>>>>>> Semantically, all they do is allow you to refer to a named
> >>>>>>>>> element without using its qualified name. Is is, however, good
> >>>>>>>>> practice to declare your dependencies this way...
> >>>>>>>>>
> >>>>>>>>>> - After creating the metamodel I create an EMF project for
> >>>>>>>>>> code generation. Here, I obligated to generate code for the
> >>>>>>>>>> infrastructureLibrary package, which I didn't need. Why that?
> >>>>>>>>>>
> >>>>>>>>> Well, after a merge, you shouldn't have any lingering
> >>>>>>>>> dependencies on other packages such as ones in
> >>>>>>>>> InfrastructureLibrary. Since UML2 does not provide an
> >>>>>>>>> implementation of InfrastructureLibrary on its own, you'll need
> >>>>>>>>> to implement it yourself. However, I would recommend _merging_
> >>>>>>>>> the packages from Abstractions that contain the types you are
> >>>>>>>>> extending rather than importing them. That way, you will be
> >>>>>>>>> implementing the types within your own (heavyweight) namespace
> >>>>>>>>> and the imports won't linger (and hence the namespace warnings
> >>>>>>>>> would go away).
> >>>>>>>>>
> >>>>>>>>>> - After the code generation, there are some errors in the
> >>>>>>>>>> generated code for the infrastructureLibrary package and for
> >>>>>>>>>> my metamodel code. all the errors in the impl files and said
> >>>>>>>>>> that xxx cannot be resolved??
> >>>>>>>>>>
> >>>>>>>>> Without knowing more about the errors, it's hard to say how to
> >>>>>>>>> fix them, but I suspect that if you ensure that everything from
> >>>>>>>>> UML that you need gets merged into your domain, and that you
> >>>>>>>>> reference existing implementations of things that aren't in
> >>>>>>>>> your domain, you'll be better off...
> >>>>>>>>>
> >>>>>>>>>> Sorry for this long mail, and thanks in advance.
> >>>>>>>>>>
> >>>>>>>>>> Manar
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>> I applied the epackage
> >>>>>>>>>> stereotype to the root element, merged the primitive types
> >>>>>>>>>> package, and
> >>>>>>>>>> import some sub-packaged from the the Abstractions package
> >>>>>>>>>>
> >>>
> >>
Re: errors while metamodeling [message #624741 is a reply to message #475570] Mon, 10 September 2007 17:40 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
It looks like the merged model still has "lingering" references to
Infrastructure etc.
For example, MAS_UML3.uml still has hrefs such as ...
<generalization xmi:id="AgentType-_generalization.0">

<general xmi:type="uml:Class"
href=" ../org.eclipse.uml2.source/src/org.eclipse.uml2.uml_2.1.0.v2 00706141134/model/Infrastructure.uml#_3ADC7B74022D3CA00A2A01 8F "/>

</generalization>


- James.

"Kenn Hussey" <Kenn.Hussey@embarcadero.com> wrote in message
news:fb70ub$oha$1@build.eclipse.org...
> Manar,
>
> I was wondering what kind of relationships there are between your merged
> model (i.e. after selecting UML Editor > Package > Merge...) and the other
> source models (Infrastructure, Superstructure). Ideally, after the merge,
> your model should have no lingering dependencies on any other model,
> otherwise you'll need to implement (pieces of it) yourself... Again, if
> you want to attach your model we could try to see what is going wrong...
>
> Kenn
>
> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
> news:fb3fj7$v3e$1@build.eclipse.org...
>> Kenn,
>>
>> I didn't understand what do you mean exactly. After applying the package
>> merge I didn't find any import in the resulting package to merge it to my
>> metamodel, is it what do you mean?
>>
>>
>> Manar,
>>
>>
>>
>> Kenn Hussey wrote:
>>> Manar,
>>>
>>> After you merge these packages, are there remaining references to
>>> elements in them? For example, if you perform the package merge, save
>>> the model, and inspect the serialization, to you see lingering
>>> references to InfrastructureLibrary.uml?
>>>
>>> Kenn
>>>
>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>>> news:famqhn$gnk$1@build.eclipse.org...
>>>> Kenn,
>>>>
>>>> Firstly, I merge the PrimitiveTypes, BehavioralFeatures,
>>>> StructuralFeatures, Relationships packages, which I use directly. After
>>>> that I add a merge for the Classifiers, TypedElements, Namespaces, and
>>>> Elements packages, which Imported by the packages that I use. In both
>>>> cases the same errors happened.
>>>>
>>>>
>>>>
>>>> Manar
>>>>
>>>>
>>>> Kenn Hussey wrote:
>>>>> Manar,
>>>>>
>>>>> Are you sure you are merging all packages from Abstractions that are
>>>>> directly or indirectly referenced from elements in your domain (e.g.
>>>>> as types, superclasses, etc.)?
>>>>>
>>>>> Kenn
>>>>>
>>>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>>>>> news:fama83$ahr$1@build.eclipse.org...
>>>>>> Kenn,
>>>>>>
>>>>>> I did a package merge instead of a package import. Validation before
>>>>>> applying the package merge was done successfully. But, after applying
>>>>>> the package merge and validating the metamodel, the validation get
>>>>>> the same error as before.
>>>>>>
>>>>>> While generating the code, still there is an obligation to generate
>>>>>> code for the abstractionLibrary package. Moreover, the generated code
>>>>>> has errors ?
>>>>>>
>>>>>> Is there a mistake while referring to the InfrastructureLibrary
>>>>>> package? or what?
>>>>>>
>>>>>>
>>>>>> Thanks,
>>>>>> Manar
>>>>>>
>>>>>>
>>>>>> Kenn Hussey wrote:
>>>>>>> Manar,
>>>>>>>
>>>>>>> Sorry for the delayed response. See answers below.
>>>>>>>
>>>>>>> Kenn
>>>>>>>
>>>>>>> "Manar El-Kady" <manar.elkady@gmail.com> wrote in message
>>>>>>> news:fabvhl$k6f$1@build.eclipse.org...
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I build a metamodel as a heavyweight extension.I do the following
>>>>>>>> steps:
>>>>>>>> - create an empty UML model
>>>>>>>> - convert the model to a metamodel
>>>>>>>> - apply the ecore profile, and then apply the epackage stereotype
>>>>>>>> to the
>>>>>>>> root model element
>>>>>>>> - add some elements for the metamodel
>>>>>>>> - merge the primitive types package
>>>>>>>> - add the infrastructure.uml as a resource to my metamodel (Note: I
>>>>>>>> added it by using the editor. I added it from a project in my
>>>>>>>> workspace that containing
>>>>>>>> platform:/resource/org.eclipse.uml2.source\src\org.eclipse.u ml2.uml_2.1.0.v200706141134\model\Infrastructure.uml)
>>>>>>>> - While creating the elements of the metamodels I extended classes
>>>>>>>> from the subpackages of the Abstractions package. So, I imported
>>>>>>>> the packages that containing the classes which I extend.
>>>>>>>> - finally I apply the package merge, and convert it again to a
>>>>>>>> metamodel.
>>>>>>>>
>>>>>>>> My questions are:
>>>>>>>> - After these steps I did a validation, and an error occur " Not
>>>>>>>> all the members of a namespace'<<metamodel, ePackage>> <Model>
>>>>>>>> MAS-UML' are distinguishable within it." ??
>>>>>>>>
>>>>>>> These warnings can usually be ignored. I suspect it's complaining
>>>>>>> about the primitive types, i.e. that names like 'Integer' exist both
>>>>>>> as owned members in your merged package, and as members directly or
>>>>>>> indirecty imported from another namespace. However, the package
>>>>>>> imports will be troublesome - see below.
>>>>>>>
>>>>>>>> - I tried to do these steps without doing package import and I
>>>>>>>> didn't notice any difference or errors happened. so, what is the
>>>>>>>> need for doing a package import in a metamodeling?
>>>>>>>>
>>>>>>> Strictly speaking, you don't _need_ package imports. Semantically,
>>>>>>> all they do is allow you to refer to a named element without using
>>>>>>> its qualified name. Is is, however, good practice to declare your
>>>>>>> dependencies this way...
>>>>>>>
>>>>>>>> - After creating the metamodel I create an EMF project for code
>>>>>>>> generation. Here, I obligated to generate code for the
>>>>>>>> infrastructureLibrary package, which I didn't need. Why that?
>>>>>>>>
>>>>>>> Well, after a merge, you shouldn't have any lingering dependencies
>>>>>>> on other packages such as ones in InfrastructureLibrary. Since UML2
>>>>>>> does not provide an implementation of InfrastructureLibrary on its
>>>>>>> own, you'll need to implement it yourself. However, I would
>>>>>>> recommend _merging_ the packages from Abstractions that contain the
>>>>>>> types you are extending rather than importing them. That way, you
>>>>>>> will be implementing the types within your own (heavyweight)
>>>>>>> namespace and the imports won't linger (and hence the namespace
>>>>>>> warnings would go away).
>>>>>>>
>>>>>>>> - After the code generation, there are some errors in the generated
>>>>>>>> code for the infrastructureLibrary package and for my metamodel
>>>>>>>> code. all the errors in the impl files and said that xxx cannot be
>>>>>>>> resolved??
>>>>>>>>
>>>>>>> Without knowing more about the errors, it's hard to say how to fix
>>>>>>> them, but I suspect that if you ensure that everything from UML that
>>>>>>> you need gets merged into your domain, and that you reference
>>>>>>> existing implementations of things that aren't in your domain,
>>>>>>> you'll be better off...
>>>>>>>
>>>>>>>> Sorry for this long mail, and thanks in advance.
>>>>>>>>
>>>>>>>> Manar
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> I applied the epackage
>>>>>>>> stereotype to the root element, merged the primitive types package,
>>>>>>>> and
>>>>>>>> import some sub-packaged from the the Abstractions package
>>>>>>>>
>>>
>
Previous Topic:XMI serialization of UML2 model
Next Topic:ocl standard lib primitive types
Goto Forum:
  


Current Time: Fri Apr 26 01:24:51 GMT 2024

Powered by FUDForum. Page generated in 0.10204 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top