Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » N00b OCL expression question to compare URI(How do I get the URI of an OCL object to compare with a URI String)
icon9.gif  N00b OCL expression question to compare URI [message #490491] Thu, 08 October 2009 19:58 Go to next message
Roshan S. is currently offline Roshan S.Friend
Messages: 125
Registered: July 2009
Senior Member
I'm trying to create an OCL query so that it will return the comparision of the URIs from an input string. So I'm trying the following:

oclQuery(//Property, "self.type.getURI()=$inputURI")

I know that getURI() does not work, how can I compare the two? Or how can I get the URI?

Any help would be great!
Re: N00b OCL expression question to compare URI [message #490534 is a reply to message #490491] Fri, 09 October 2009 04:51 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi Roshan

I cannot understand your question at all; you seem to be using terms for
which I know no meaning "OCL query" and elements that could come from a
variety of languages, but not all the same one: "oclQuery", "//", "$".

Google points out that EMF Query can be used in association with OCL,
but the OCL Query examples of
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.emf.query.doc/references/examples/oclQueryExample.html
bear little resemblance to your example.

Regards

Ed Willink

Roshan Soni wrote:
> I'm trying to create an OCL query so that it will return the comparision
> of the URIs from an input string. So I'm trying the following:
>
> oclQuery(//Property, "self.type.getURI()=$inputURI")
>
> I know that getURI() does not work, how can I compare the two? Or how
> can I get the URI?
>
> Any help would be great!
Re: N00b OCL expression question to compare URI [message #490624 is a reply to message #490534] Fri, 09 October 2009 13:00 Go to previous message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

--=-/r/tuTS2Rdq1zlAtxgBN
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi, Ed, Roshan,

The //Property looks like an XPath expression to get all properties in a
document, perhaps using the M2T JET project's XPath interpreter for EMF.
And $inputURI looks like an input parameter in a database query.

Together, this all looks like the IBM RSA integration of OCL queries
(the "oclQuery" XPath function) into BIRT-based model reporting.

Roshan, if this is a question of working with OCL queries in a BIRT
context, then perhaps the BIRT newsgroup, DTP newsgroup (for an EMF ODA
layer), or whatever support fora are available for IBM RSA, would be a
more appropriate place to ask. Clearly, this is an issue of integration
in some other system and not about the MDT OCL component.

Cheers,

Christian


On Fri, 2009-10-09 at 05:51 +0100, Ed Willink wrote:

> Hi Roshan
>
> I cannot understand your question at all; you seem to be using terms for
> which I know no meaning "OCL query" and elements that could come from a
> variety of languages, but not all the same one: "oclQuery", "//", "$".
>
> Google points out that EMF Query can be used in association with OCL,
> but the OCL Query examples of
> http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.emf.query.doc/references/examples/oclQueryExample.html
> bear little resemblance to your example.
>
> Regards
>
> Ed Willink
>
> Roshan Soni wrote:
> > I'm trying to create an OCL query so that it will return the comparision
> > of the URIs from an input string. So I'm trying the following:
> >
> > oclQuery(//Property, "self.type.getURI()=$inputURI")
> >
> > I know that getURI() does not work, how can I compare the two? Or how
> > can I get the URI?
> >
> > Any help would be great!

--=-/r/tuTS2Rdq1zlAtxgBN
Content-Type: text/html; charset="utf-8"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.24.1.1">
</HEAD>
<BODY>
Hi, Ed, Roshan,<BR>
<BR>
The //Property looks like an XPath expression to get all properties in a document, perhaps using the M2T JET project's XPath interpreter for EMF.&nbsp; And $inputURI looks like an input parameter in a database query.<BR>
<BR>
Together, this all looks like the IBM RSA integration of OCL queries (the &quot;oclQuery&quot; XPath function) into BIRT-based model reporting.<BR>
<BR>
Roshan, if this is a question of working with OCL queries in a BIRT context, then perhaps the BIRT newsgroup, DTP newsgroup (for an EMF ODA layer), or whatever support fora are available for IBM RSA, would be a more appropriate place to ask.&nbsp; Clearly, this is an issue of integration in some other system and not about the MDT OCL component.<BR>
<BR>
Cheers,<BR>
<BR>
Christian<BR>
<BR>
<BR>
On Fri, 2009-10-09 at 05:51 +0100, Ed Willink wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Hi Roshan

I cannot understand your question at all; you seem to be using terms for
which I know no meaning &quot;OCL query&quot; and elements that could come from a
variety of languages, but not all the same one: &quot;oclQuery&quot;, &quot;//&quot;, &quot;$&quot;.

Google points out that EMF Query can be used in association with OCL,
but the OCL Query examples of
<A HREF=" http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.emf.query.doc/references/examples/oclQueryExample.html"> http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.emf.query.doc/references/examples/oclQueryExample.html</A>
bear little resemblance to your example.

Regards

Ed Willink

Roshan Soni wrote:
&gt; I'm trying to create an OCL query so that it will return the comparision
&gt; of the URIs from an input string. So I'm trying the following:
&gt;
&gt; oclQuery(//Property, &quot;self.type.getURI()=$inputURI&quot;)
&gt;
&gt; I know that getURI() does not work, how can I compare the two? Or how
&gt; can I get the URI?
&gt;
&gt; Any help would be great!
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>

--=-/r/tuTS2Rdq1zlAtxgBN--
Previous Topic:oclIsTypeOf and Interfaces
Next Topic:LET and IN
Goto Forum:
  


Current Time: Fri Mar 29 08:59:16 GMT 2024

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

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

Back to the top