|
Re: Resource factory not found by normalized URI? [message #628926 is a reply to message #628776] |
Fri, 24 September 2010 18:04 |
Ed Merks Messages: 33142 Registered: July 2009 |
Senior Member |
|
|
Bryan,
The idea is that the original URI is the logical URI. It should be the
URI of the resource that's created and will be the URI that is used for
references to objects in that resource.
You could specialize ResourceSetImpl.createResource if you want
different behavior.
Bryan Hunt wrote:
> Hi Ed,
>
> I have a model stored in a file as XMI. I have registered a URI
> mapping with a URIConverter that changes the scheme from http: to
> file: and I also have a (non XMI) resource factory registered with the
> http scheme.
> In my test code, when I try to load a resource that has a URI with the
> http scheme, EMF uses my resource factory instead of the
> XMIResourceFactoryImpl. It's obvious from the EMF source that when
> the resource is demand created, it uses the original URI to look up
> the resource factory instead of the normalized URI. I was expecting
> it to use the normalized URI.
> Here's the use case: A client has a URI for an object in the form
> http://host:port/path The client has a custom resource to send
> the URI to the server which normalizes it into file://path, reads the
> XMI, and returns the object to the client.
>
> What is the reasoning for using the original URI to locate a resource
> factory instead of the normalized URI? Any suggestions on working
> around this problem? I thought about moving the registration of the
> resource factory to a different bundle, but that wouldn't work in all
> cases.
>
> Bryan
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03305 seconds