Skip to main content



      Home
Home » Modeling » EMF » Best examples for creating EMF Resource implementations
Best examples for creating EMF Resource implementations [message #424795] Wed, 05 November 2008 10:47 Go to next message
Eclipse UserFriend
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 11:21 Go to previous message
Eclipse UserFriend
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
Previous Topic:Listener Notification - Creation and deletion of elements
Next Topic:Binding Multiple EObjects to Text Control
Goto Forum:
  


Current Time: Sat Jul 05 16:34:33 EDT 2025

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

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

Back to the top