|BIRT - ODA - EMF instance [message #726710]
||Mon, 19 September 2011 06:27
| Stein Erik
Registered: September 2011
Is it possible to setup a BIRT Data Source (using ODA) to access an Ecore model which is already instanciated in memory?|
The tutorials I have discovered so far are only able to create a Data Source from an Ecore xmi file. I am apparently not smart enough to, by myself, figure out howto create a connection to an Ecore model/resource already floating in memory.
Code snippet that illustrate how to setup the Data Source in such a manner would be very appreciated! (and possibly how to create/access a Data Set afterwards...maybe to much to ask for in one go...)
(Ps. The background is that I am trying to develop an EMF centric application where several Views are accessing/manipulating the EMF model. BIRT would be helpful to visualize some of that data. Ds.)
[Updated on: Mon, 19 September 2011 06:28]
Report message to a moderator
|Re: BIRT - ODA - EMF instance [message #726833 is a reply to message #726821]
||Mon, 19 September 2011 12:13
| Jason Weathersby
Registered: July 2009
First thing look at how a scripted data source works:|
To call your classes from a beforeOpen event just import the package like:
to get the model you can then call:
//assuming a static method
var mymodel = ModelResource.getInstance().eModel();
You will also need to use the importPackage call on emf packages that
are required to navigate your model.
On 9/19/2011 11:59 AM, Stein Erik wrote:
> Excellent, thanks so much.
> The rigup is to be a BIRT Engine API. Attached is some code extract. At least I hope it is relevant! The InformationFormView is accessing the ModelResource. ModelResource acts as the central point for the common EMF model and is accessed by several other Views Hope this makes sense.
> (I believe the supplied EditingDomain will be irrelvant for the BRIT access though since it will just need to strip out data? Well, maybe not. It needs to be notified if EMF data changes. Just a sidestep discussion by myself...)
Powered by FUDForum
. Page generated in 0.06308 seconds