Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Referencing/Loading XMI file from an other jar file
Referencing/Loading XMI file from an other jar file [message #1730675] Wed, 27 April 2016 15:03 Go to next message
Johannes Schaefer is currently offline Johannes SchaeferFriend
Messages: 7
Registered: October 2014
Junior Member
Hi,

I have two models, A.screen and B.data. Both are xmi files with different ecore meta models. I can easily reference from A.screen to B.data by just creating a reference relation in the meta model "screen" to something from the meta model "data". Everything is fine when I have both model files in the same project. But how can I refer from A.screen to a element from B.data when B.data is in a seperate jar file/somewhere in the class path.
When both are side by side something like
href="B.data#//@types.1"
is referencing a type from B. But it seems that is mechanisim doesn't work when B is in a seperate jar file.

I want to reach that A.screen is part of a WAR file and B.data is in a jar file which I just included in the class path.
I'm using Maven as build system.

Thanks,
Johannes.

[Updated on: Wed, 27 April 2016 15:03]

Report message to a moderator

Re: Referencing XMI file from an other jar file [message #1730739 is a reply to message #1730675] Thu, 28 April 2016 07:31 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Johannes,

Is the goal to do this in a standalone application or from an
Eclipse/OSGi application?

In the former case, you can use
platform:/plugin/<plugin-id>/<path-in-plugin> to load the initial
resource and the workspace-relative references between them should
resolve properly at runtime as plugin-relative references; that's how
*.ecore and *.genmodels reference each other at development time and at
runtime.

If it's a stand alone application, you will need to consider more
details. Ideally you'd use URI folder mappings to match each workspace
relative path to the location of the jar. E.g., each XyzPlugin class
has getBaseURL() which returns the location of the jar/folder containing
the class.

On 27.04.2016 17:03, Johannes Schaefer wrote:
> Hi,
>
> I have two models, A.screen and B.data. Both are xmi files with
> different ecore meta models. I can easily reference from A.screen to
> B.data by just creating a reference relation in the meta model
> "screen" to something from the meta model "data". Everything is fine
> when I have both model files in the same project. But how can I refer
> from A.screen to a element from B.data when B.data is in a seperate
> jar file/somewhere in the class path.
> When both are side by side something like href="B.data#//@types.1"
> is referencing a type from B. But it seems that is mechanisim doesn't
> work when B is in a seperate jar file.
>
> I want to reach that A.screen is part of a WAR file and B.data is in a
> jar file which I just included in the class path.
> I'm using Maven as build system.
>
> Thanks,
> Johannes.


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Diagnostician.INSTANCE.validate
Next Topic:De-serialization of Feature Map content != serialization
Goto Forum:
  


Current Time: Wed Apr 24 23:15:26 GMT 2024

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

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

Back to the top