Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Best examples for creating EMF Resource implementations
Best examples for creating EMF Resource implementations [message #424795] Wed, 05 November 2008 15:47 Go to next message
Derek Palma is currently offline Derek PalmaFriend
Messages: 141
Registered: July 2009
Senior Member
Hi,

I need to implement a number of Resources to load models from various types
of text files with object references across files. What would be the best
existing implementations to model my implementation on? I am currently aware
of implementation for XMI, XML, and UML which all consume text files. I
presume there are some for database persistence like Teneo but this would be
less applicable.

Thanks for your help.
Derek
Re: Best examples for creating EMF Resource implementations [message #424796 is a reply to message #424795] Wed, 05 November 2008 16:21 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33218
Registered: July 2009
Senior Member
Derek,

There aren't lots of examples. BinaryResourceImpl shows a non-text
approach. Basically you "just" have to implement doLoad and doSave.
You can also specialize getURIFragment and getEObject; the former
creates a string that the latter must be able to interpret to retrieve
the same object passed to getURIFragment. Generally it's a good idea to
make sure the default fragment-based approach keeps working too...

The XText component in the TMF project has support for specifying a
grammar to parse text based on that grammar. Maybe that would be useful
if hand writing a parser would be a complex task.


Derek Palma wrote:
> Hi,
>
> I need to implement a number of Resources to load models from various
> types of text files with object references across files. What would be
> the best existing implementations to model my implementation on? I am
> currently aware of implementation for XMI, XML, and UML which all
> consume text files. I presume there are some for database persistence
> like Teneo but this would be less applicable.
>
> Thanks for your help.
> Derek


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Listener Notification - Creation and deletion of elements
Next Topic:Binding Multiple EObjects to Text Control
Goto Forum:
  


Current Time: Wed Sep 25 05:36:14 GMT 2024

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

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

Back to the top