Definition of OCL-Queries [message #22422] |
Wed, 15 February 2006 08:39  |
Eclipse User |
|
|
|
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 #22813 is a reply to message #22508] |
Thu, 16 February 2006 03:38  |
Eclipse User |
|
|
|
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 17:31  |
Eclipse User |
|
|
|
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 03:38  |
Eclipse User |
|
|
|
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
>
|
|
|
Powered by
FUDForum. Page generated in 0.03663 seconds