Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » CompleteOCL - Import URI
CompleteOCL - Import URI [message #1826160] Mon, 20 April 2020 13:59 Go to next message
Test Test is currently offline Test TestFriend
Messages: 3
Registered: April 2020
Junior Member
Hello,


Running eclipse Modeling Tools
Version: 2020-03 (4.15.0)
Build id: 20200313-1211

with eclipse OCL 6.11.0

The current project is currently set as an OCL project and I created an .ocl - File with some basic invariants in it. When I want to import the meta model from my local files it can resolve, because the meta model is also in the project.

 import basic : 'platform:/plugin/org.gravity.typegraph.basic/model/Basic.ecore'


But I want to import the meta model from an URI, as it doesn't resolve when I use the exact path name which is:

import ecore : 'http://www.eclipse.org/emf/2002/Ecore#/'
import basic : 'http://www.gravity-tool.org/typegraph/basic#/'

package basic

context TClass
inv Test : false

endpackage




where is the issue? Did I forget to configure anything or is the syntax of the imported URI incorrect?

Regards

[Updated on: Thu, 23 April 2020 08:06]

Report message to a moderator

Re: CompleteOCL - Import URI [message #1826191 is a reply to message #1826160] Mon, 20 April 2020 18:21 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

The spelling of the nsURI is in principle whatever you set as the EPackage.nsURI / Package.uri. Conventionally this is http: although it shouldn't matter, but "www.gravity-tool.org/typegraph/basic" has no protocol so you might have tricked some code into treating it as a relative URI rather than a nsURI. Unfortunately both alternatives are not syntactically or semantically distinct so tools try one before the other and can be confused.

Regards

Ed Willink
Re: CompleteOCL - Import URI [message #1826301 is a reply to message #1826191] Thu, 23 April 2020 08:06 Go to previous messageGo to next message
Test Test is currently offline Test TestFriend
Messages: 3
Registered: April 2020
Junior Member
Hi,

I forgot to mention that eclipse forum didn't allow me to post full URIs with http:, so that example i mentioned has a protocol link. I could now edit the post and as I already mentioned it still doesn't resolve.

Regards

[Updated on: Thu, 23 April 2020 08:07]

Report message to a moderator

Re: CompleteOCL - Import URI [message #1826311 is a reply to message #1826301] Thu, 23 April 2020 10:49 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

It generally saves a huge amount of time for you and me if you attach a zipped project ideally with a JUnit launch that demostrates hwta doesn't do wht you expect. Save the launch in the project by setting its location in the Common tab.

Regards

Ed Willink
Previous Topic:Generating code from ecore model
Next Topic:Ignoring OCL during Ecore validation possible ?
Goto Forum:
  


Current Time: Sun May 05 11:42:47 GMT 2024

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

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

Back to the top