|
Re: [EMF] URI and Content Handler [message #753598 is a reply to message #753568] |
Thu, 27 October 2011 23:27 |
Ed Merks Messages: 33137 Registered: July 2009 |
Senior Member |
|
|
Comments below.
On 27/10/2011 8:37 PM, maureyeslopez wrote:
> Hi,
>
> I'm trying to extend EMF by writing my own ResourceSet and Resources
> that communicate with a server through an own business delegate.
Like CDO?
> The generated classes from genmodel will be both in client and server
> as I want to define my instances and associations in client side and
> just transfer them to server to validation and persistence. I think
> I've solved the methods I need to extend in Resource (doLoad and
> doSave invoke the business delegate)
That's mostly to specialize the format for saving. What you've
described could be accomplished with XML or binary...
> but I don't completely understand where or what should I change to
> modify the logic asociated with loading of resources, because I want
> to load objects in different resources depending on how deep they are
> in the tree,
You decide how to partition your objects into resources....
> working with proxys to manage references to objects in lower levels,
> and I think I should make that division using an appropriate uri scheme.
Any URI scheme can support this.
> I was trying to understand using the example of MongoDB EMF
> (https://github.com/BryanHunt/mongo-emf) and I think having my own
> URIHandler and/or InputStream is the correct way to solve my problem,
> but I'm not understanding how should I manage URIs to create resources.
Using URIConverter.Saveable/Loadable, you can separate out the logic for
saving your resource into a specialized "stream".
>
> I'm sorry for being so vague with the description, if anyone need more
> details about something just ask.
It's up to you to provide suitable questions.
>
> In conclusion, I need some clue about how can I adapt things in EMF to
> obtain the objects from a server and load them in different resources
> that are defined by the URI and not predefined like the default XML
> files method.
When the client asks the server for the contents of a URI, the server
decides what bytes to send. It can send those as XML or binary.
There's nothing predefined. You decide what objects belong in each
resource and you can decide how to represent them. XML or binary will
be fine for communicating between the client and the server. The
server can store and fetch using a data base, Mongo DB, or whatever you
want.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.01974 seconds