|
Re: Resolving proxy URIs with a customized URI schema [message #1052821 is a reply to message #1052657] |
Tue, 30 April 2013 15:28 |
Ed Merks Messages: 33141 Registered: July 2009 |
Senior Member |
|
|
Magnus,
Comments below.
On 30/04/2013 2:47 PM, Magnus Stuhr wrote:
> Hi everyone,
>
> Sorry if a similar question has been asked elsewhere. We tried to look
> around in the news group for a proper solution to our problem, but did
> not find anything.
>
> We have an EMF application based on interlinked XMI resources. These
> XMI resources are referenced to each other by proxy URIs with a
> customized URI schema provided by an external XMI repository. The
> protocol of this schema is "localref://". We have all the XMI
> resources stored locally in a file repository (not in the Eclipse
> project).
What do you mean by a file repository. Are they just files in the file
system?
>
> What we are trying to do is the load the correct referenced files
> specified by the proxy URI. We tried doing this by implementing our
> own URIHandler and connecting it to our ResourceSet like this:
>
> editingDomain.getResourceSet().getURIConverter().getURIHandlers().add(0,new
> OurURIHandler(editingDomain.getResourceSet()));
>
> When we click on a proxy URI in the editor, the proxy URI is being
> sent to the "createInputStream" method in the "OurURIHandler" class.
> We have no clue where to go from here, and we would highly appreciate
> any pointers or advices on how to proceed!
Look at some of the other handlers like FileURIHandler and the base
class URIHandlerImpl. Before I try to give a detailed answer that
might not be relevant, I need to understand what you mean by a "file
repository".
> Thanks in advance!
>
> Best regards,
> Magnus Stuhr
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Re: Resolving proxy URIs with a customized URI schema [message #1053087 is a reply to message #1053046] |
Thu, 02 May 2013 11:21 |
Ed Merks Messages: 33141 Registered: July 2009 |
Senior Member |
|
|
Magnus,
In that case it should suffice to use URI mappings in the URI
converter. Properly you can use a folder mapping for this type of
thing, i.e., foo:/bar/ -> file:/d:/folder/ would map all URIs starting
with the given prefix to the given location in the file system.
On 02/05/2013 10:04 AM, Magnus Stuhr wrote:
> Hi again,
>
> Sorry if I was a bit unclear. By "file repository" I mean we have all
> the relevant files stored locally on our file system. In other words,
> we have all the models stored locally as XMI.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02451 seconds