Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » InMemoryEmfModel without resource
InMemoryEmfModel without resource [message #561462] Tue, 11 November 2008 15:34
Steffen Zschaler is currently offline Steffen ZschalerFriend
Messages: 266
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------010703080902030501040003
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi again,

I want to programmatically set up an ETL transformation. To provide
input models, I have previously used

InMemoryEmfModel limModel = new InMemoryEmfModel("LIM", lim.eResource(), VmlLangInstPackage.eINSTANCE);
module.getContext().getModelRepository().addModel(limModel);


Where lim is a reference to the top EObject of the model. However, this
time, lim is actually the result of parsing a text file. Hence, there is
no resource to go with it and lim.eResource() returns null, leading to a
NullPointerException somewhere further down the road. Is there an
alternative mechanism that I can use?

Cheers,

Steffen

--
Dr. rer. nat. Steffen Zschaler
Senior Research Associate

Lancaster University
Lancaster, United Kingdom

Email szschaler@acm.org
WWW http://www.steffen-zschaler.de/

--

Consider submitting to QoSA 2009, the 5th International Conference on
the Quality of Software-Architectures.
http://qosa.ipd.uka.de/

Consider submitting to MiSE 2009, the 3rd International Workshop on
Models in Software Engineering
http://wikiserver.sse.cs.tu-bs.de/mise09


--------------010703080902030501040003
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi again,<br>
<br>
I want to programmatically set up an ETL transformation. To provide
input models, I have previously used<br>
<blockquote>
<pre>InMemoryEmfModel limModel = new InMemoryEmfModel("LIM", lim.eResource(), VmlLangInstPackage.eINSTANCE);
module.getContext().getModelRepository().addModel(limModel);
</pre>
</blockquote>
Where lim is a reference to the top EObject of the model. However, this
time, lim is actually the result of parsing a text file. Hence, there
is no resource to go with it and lim.eResource() returns null, leading
to a NullPointerException somewhere further down the road. Is there an
alternative mechanism that I can use?<br>
<br>
Cheers,<br>
<br>
Steffen<br>
<pre class="moz-signature" cols="72">--
Dr. rer. nat. Steffen Zschaler
Senior Research Associate

Lancaster University
Lancaster, United Kingdom

Email <a class="moz-txt-link-abbreviated" href="mailto:szschaler@acm.org">szschaler@acm.org</a>
WWW <a class="moz-txt-link-freetext" href="http://www.steffen-zschaler.de/">http://www.steffen-zschaler.de/</a>

--

Consider submitting to QoSA 2009, the 5th International Conference on
the Quality of Software-Architectures.
<a class="moz-txt-link-freetext" href="http://qosa.ipd.uka.de/">http://qosa.ipd.uka.de/</a>

Consider submitting to MiSE 2009, the 3rd International Workshop on
Models in Software Engineering
<a class="moz-txt-link-freetext" href="http://wikiserver.sse.cs.tu-bs.de/mise09">http://wikiserver.sse.cs.tu-bs.de/mise09</a></pre>
</body>
</html>

--------------010703080902030501040003--
Previous Topic:Re: Copying models in ETL
Next Topic:Loading EMF models from a resource within some plugin
Goto Forum:
  


Current Time: Fri Mar 29 13:00:30 GMT 2024

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

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

Back to the top