Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Referencing image files
Referencing image files [message #638451] Thu, 11 November 2010 10:56 Go to next message
Peter Severin is currently offline Peter SeverinFriend
Messages: 19
Registered: July 2009
Junior Member
Hi,

I am looking for the right approach to the following problem:

In my model I store a reference to an image file. The path to the file
is stored in an attribute and I'd like for it to behave in exactly the
same way as 'href' does for EReferences. In other words the path should
be an URI that is properly resolved/deresolved when the model is
loaded/saved.

Could someone point me to the right direction?


Thanks,

Peter
Re: Referencing image files [message #638477 is a reply to message #638451] Thu, 11 November 2010 12:42 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30551
Registered: July 2009
Senior Member
Peter,

Comments below.


Peter Severin wrote:
> Hi,
>
> I am looking for the right approach to the following problem:
>
> In my model I store a reference to an image file. The path to the file
> is stored in an attribute and I'd like for it to behave in exactly the
> same way as 'href' does for EReferences. In other words the path
> should be an URI that is properly resolved/deresolved when the model
> is loaded/saved.
Such processing will normally only kick in for cross resource EReferences.
>
> Could someone point me to the right direction?
XMLHelperImpl has methods convertToString and createFromString.
XMLHelper also has the methods resolve/deresolve that are normally used
to process the proxy URIs. So you could have a custom EDataType and
then specialize these XMLHelperImpl methods to resolve and deresolve the
values for that EDataType...
>
>
> Thanks,
>
> Peter
Re: Referencing image files [message #638499 is a reply to message #638477] Thu, 11 November 2010 14:01 Go to previous message
Peter Severin is currently offline Peter SeverinFriend
Messages: 19
Registered: July 2009
Junior Member
Ed, this makes sense. Thanks for your help. I am amazed how quickly you
respond on this list!

On 11/11/2010 14:42, Ed Merks wrote:
> Peter,
>
> Comments below.
>
>
> Peter Severin wrote:
>> Hi,
>>
>> I am looking for the right approach to the following problem:
>>
>> In my model I store a reference to an image file. The path to the file
>> is stored in an attribute and I'd like for it to behave in exactly the
>> same way as 'href' does for EReferences. In other words the path
>> should be an URI that is properly resolved/deresolved when the model
>> is loaded/saved.
> Such processing will normally only kick in for cross resource EReferences.
>>
>> Could someone point me to the right direction?
> XMLHelperImpl has methods convertToString and createFromString.
> XMLHelper also has the methods resolve/deresolve that are normally used
> to process the proxy URIs. So you could have a custom EDataType and then
> specialize these XMLHelperImpl methods to resolve and deresolve the
> values for that EDataType...
>>
>>
>> Thanks,
>>
>> Peter
Previous Topic:Root Class of Ecore model package instance
Next Topic:[CDO]Revision view
Goto Forum:
  


Current Time: Sun Oct 20 01:55:41 GMT 2019

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

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

Back to the top