Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Definition of OCL-Queries
Definition of OCL-Queries [message #22422] Wed, 15 February 2006 13:39 Go to next message
Eclipse UserFriend
Originally posted by: daniel.rohe.stud.tu-ilmenau.de

When I write an OCL-query and try to check for a specific UML type I
write "oclIsTypeOf(uml2::kernel::Component)" or at least
"oclIsTypeOf(...::something)". Can someone describe the pathes of the
UML2 meta model used in the OCL plug-in. I've tried it with
"org::eclipse::uml2::Component" and "uml2::kernel::Component", both
giving a SemanticException: ERROR in (operationArgs): (Unrecognizable type).

Kind regards,
Daniel
Re: Definition of OCL-Queries [message #22508 is a reply to message #22422] Wed, 15 February 2006 22:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Daniel,

The path that you need is simply "uml::Component" as an example. The path
reflects the Ecore naming structure, not the Java names. The UML2's
EPackage nsPrefix is "uml". I think that the namespace prefix of packages
is used instead of the names because it is what generally appears in XMI as
a dot-separated path (e.g., ocl.expr.OperationCallExp in the OCL metamodel,
where packages are nested).

Cheers,

Christian



Daniel Rohe wrote:

> When I write an OCL-query and try to check for a specific UML type I
> write "oclIsTypeOf(uml2::kernel::Component)" or at least
> "oclIsTypeOf(...::something)". Can someone describe the pathes of the
> UML2 meta model used in the OCL plug-in. I've tried it with
> "org::eclipse::uml2::Component" and "uml2::kernel::Component", both
> giving a SemanticException: ERROR in (operationArgs): (Unrecognizable
> type).
>
> Kind regards,
> Daniel
Re: Definition of OCL-Queries [message #22813 is a reply to message #22508] Thu, 16 February 2006 08:38 Go to previous message
Eclipse UserFriend
Originally posted by: daniel.rohe.stud.tu-ilmenau.de

Hello Christian,

it's even simpler and after debugging I've found the point where the
type in the OCL expression is resolved. It seems that
oclIsTypeOf(Component) works.

If I prepend a package prefix, e.g. uml::Component, it tries to find the
uml package in the sub packages of the default package which is already
the UML2Package.

Kind regards,
Daniel

Christian W. Damus schrieb:
> Hi, Daniel,
>
> The path that you need is simply "uml::Component" as an example. The path
> reflects the Ecore naming structure, not the Java names. The UML2's
> EPackage nsPrefix is "uml". I think that the namespace prefix of packages
> is used instead of the names because it is what generally appears in XMI as
> a dot-separated path (e.g., ocl.expr.OperationCallExp in the OCL metamodel,
> where packages are nested).
>
> Cheers,
>
> Christian
>
>
>
> Daniel Rohe wrote:
>
>> When I write an OCL-query and try to check for a specific UML type I
>> write "oclIsTypeOf(uml2::kernel::Component)" or at least
>> "oclIsTypeOf(...::something)". Can someone describe the pathes of the
>> UML2 meta model used in the OCL plug-in. I've tried it with
>> "org::eclipse::uml2::Component" and "uml2::kernel::Component", both
>> giving a SemanticException: ERROR in (operationArgs): (Unrecognizable
>> type).
>>
>> Kind regards,
>> Daniel
>
Re: Definition of OCL-Queries [message #567068 is a reply to message #22422] Wed, 15 February 2006 22:31 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Daniel,

The path that you need is simply "uml::Component" as an example. The path
reflects the Ecore naming structure, not the Java names. The UML2's
EPackage nsPrefix is "uml". I think that the namespace prefix of packages
is used instead of the names because it is what generally appears in XMI as
a dot-separated path (e.g., ocl.expr.OperationCallExp in the OCL metamodel,
where packages are nested).

Cheers,

Christian



Daniel Rohe wrote:

> When I write an OCL-query and try to check for a specific UML type I
> write "oclIsTypeOf(uml2::kernel::Component)" or at least
> "oclIsTypeOf(...::something)". Can someone describe the pathes of the
> UML2 meta model used in the OCL plug-in. I've tried it with
> "org::eclipse::uml2::Component" and "uml2::kernel::Component", both
> giving a SemanticException: ERROR in (operationArgs): (Unrecognizable
> type).
>
> Kind regards,
> Daniel
Re: Definition of OCL-Queries [message #567289 is a reply to message #22508] Thu, 16 February 2006 08:38 Go to previous message
Daniel Rohe is currently offline Daniel RoheFriend
Messages: 63
Registered: July 2009
Member
Hello Christian,

it's even simpler and after debugging I've found the point where the
type in the OCL expression is resolved. It seems that
oclIsTypeOf(Component) works.

If I prepend a package prefix, e.g. uml::Component, it tries to find the
uml package in the sub packages of the default package which is already
the UML2Package.

Kind regards,
Daniel

Christian W. Damus schrieb:
> Hi, Daniel,
>
> The path that you need is simply "uml::Component" as an example. The path
> reflects the Ecore naming structure, not the Java names. The UML2's
> EPackage nsPrefix is "uml". I think that the namespace prefix of packages
> is used instead of the names because it is what generally appears in XMI as
> a dot-separated path (e.g., ocl.expr.OperationCallExp in the OCL metamodel,
> where packages are nested).
>
> Cheers,
>
> Christian
>
>
>
> Daniel Rohe wrote:
>
>> When I write an OCL-query and try to check for a specific UML type I
>> write "oclIsTypeOf(uml2::kernel::Component)" or at least
>> "oclIsTypeOf(...::something)". Can someone describe the pathes of the
>> UML2 meta model used in the OCL plug-in. I've tried it with
>> "org::eclipse::uml2::Component" and "uml2::kernel::Component", both
>> giving a SemanticException: ERROR in (operationArgs): (Unrecognizable
>> type).
>>
>> Kind regards,
>> Daniel
>
Previous Topic:Using the OCL parser
Next Topic:Using JET to create java Code
Goto Forum:
  


Current Time: Thu Sep 29 21:40:48 GMT 2022

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

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

Back to the top