Loading oclxmi files [message #1749445] |
Tue, 06 December 2016 14:41  |
Eclipse User |
|
|
|
I'm currently working on a generic piece of software dealing with OCL abstract trees (ASTs). Generic means that models, metamodels, OCL files etc. are provided as input, they cannot be loaded, registered or what so ever by any clic. I don't use GUI nor any Eclipse plugin dependancy (standalone fever).
Context : I load a metamodel (which is registered properly) and models on the fly without problems. To do so, I use the EMF and EMF-OCL librari(es). I manipulate OCL constraints (their AST) programmatically.
My problem is this one : how to load a set of constraints from a XMI for OCL file (usual extension is .oclxmi) ? I do load ocl (.ocl) files, no problem, but XMI ocl, I can't. (And, of course, the constraints I intend to use are encoded in XMI...)
When I try to do the lines from the tutos,
Resource res = Metamodel.resourceSet.getResource(
URI.createPlatformResourceURI(f1.getAbsolutePath(), true), true );
A Runtime exception is thrown : The resource cannot be created because "a registered resource factory is needed". Needless to say the this resourceSet (provided by the Metamodel class) is used to instanciate the conforming models. Am I wrong when I try to use the same resource set ?
Any hint of hope will be appreciated.
Thank you very much for your attention.
Edouard
PS : it is all made programmatically, with basic Java.
(PPS : note that links in the manual (From the OCL Examples page) are not working :
http://help.eclipse.org/luna/topic/org.eclipse.ocl.doc/help/CompleteOCLTutorial
http://help.eclipse.org/luna/topic/org.eclipse.ocl.doc/help/OCLinEcoreTutorial
(they are easily found via search engines) )
[Updated on: Tue, 06 December 2016 14:56] by Moderator
|
|
|
|
|
|
|
|
Re: Loading oclxmi files [message #1749636 is a reply to message #1749635] |
Thu, 08 December 2016 14:46  |
Eclipse User |
|
|
|
Non non non, I'm just confused I found today a comment from you about the source of the artefacts I'm supposed to use - which is a fair and clear warning.
I'm confused I found it after questionning you about the OCL/XMI relation.
The precisions you added here (emf / Pivot / OCL2.x) were very usefull though. Thanks.
The not-never-not-ending comment (french people uses negation way too much, sorry 'bout that) is just that I wanted to mention I didn't want to waste your and others' time.
Have a good day,
Edouard
|
|
|
Powered by
FUDForum. Page generated in 0.09160 seconds