Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Is there an example/whitepaper of custom proxy resolution.
Is there an example/whitepaper of custom proxy resolution. [message #426731] Mon, 19 January 2009 17:55 Go to next message
drew frantz is currently offline drew frantzFriend
Messages: 340
Registered: July 2009
Senior Member
Is there an example (or whitepaper) of how to perform custom proxy
resolution an XMLResourceImpl?
Re: Is there an example/whitepaper of custom proxy resolution. [message #426737 is a reply to message #426731] Mon, 19 January 2009 19:26 Go to previous messageGo to next message
drew frantz is currently offline drew frantzFriend
Messages: 340
Registered: July 2009
Senior Member
Here is what I did in my XMLResourceImpl class I hook into getEObject and
try a custom lokkup method first before proceeding with the default
implemntation. localSimpleLookup grabs the DocumentRoot object and tries to
find things that may have match the uriFragment. One thing I noticed is that
the EObject's contained in DocumentRoot seem to get demand created, so is
there a way to defer all the proxy resolution until after all the
DocumentRoot child objects have been created so that I can cache my lookup
table?


public EObject getEObject(String uriFragment) {

EObject eo = localSimpleLookup(uriFragment);;

if(eo!=null) return eo;


return super.getEObject(uriFragment);

}

"drew" <drew@acm.org> wrote in message
news:gl2eq5$52i$1@build.eclipse.org...
> Is there an example (or whitepaper) of how to perform custom proxy
> resolution an XMLResourceImpl?
>
Re: Is there an example/whitepaper of custom proxy resolution. [message #426758 is a reply to message #426737] Tue, 20 January 2009 04:23 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------050608070809050507060906
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Drew,

Comments below.

drew wrote:
> Here is what I did in my XMLResourceImpl class I hook into getEObject and
> try a custom lokkup method first before proceeding with the default
> implemntation. localSimpleLookup grabs the DocumentRoot object and tries to
> find things that may have match the uriFragment. One thing I noticed is that
> the EObject's contained in DocumentRoot seem to get demand created,
I don't think so.
> so is
> there a way to defer all the proxy resolution until after all the
> DocumentRoot child objects have been created so that I can cache my lookup
> table?
>
No new objects should be getting created.
>
> public EObject getEObject(String uriFragment) {
>
> EObject eo = localSimpleLookup(uriFragment);;
>
> if(eo!=null) return eo;
>
>
> return super.getEObject(uriFragment);
>
> }
>
> "drew" <drew@acm.org> wrote in message
> news:gl2eq5$52i$1@build.eclipse.org...
>
>> Is there an example (or whitepaper) of how to perform custom proxy
>> resolution an XMLResourceImpl?
>>
No, just the basic implementations.
>>
>
>
>

--------------050608070809050507060906
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Drew,<br>
<br>
Comments below.<br>
<br>
drew wrote:
<blockquote cite="mid:gl2k4n$i2q$1@build.eclipse.org" type="cite">
<pre wrap="">Here is what I did in my XMLResourceImpl class I hook into getEObject and
try a custom lokkup method first before proceeding with the default
implemntation. localSimpleLookup grabs the DocumentRoot object and tries to
find things that may have match the uriFragment. One thing I noticed is that
the EObject's contained in DocumentRoot seem to get demand created,</pre>
</blockquote>
I don't think so.<br>
<blockquote cite="mid:gl2k4n$i2q$1@build.eclipse.org" type="cite">
<pre wrap=""> so is
there a way to defer all the proxy resolution until after all the
DocumentRoot child objects have been created so that I can cache my lookup
table?
</pre>
</blockquote>
No new objects should be getting created.<br>
<blockquote cite="mid:gl2k4n$i2q$1@build.eclipse.org" type="cite">
<pre wrap="">

public EObject getEObject(String uriFragment) {

EObject eo = localSimpleLookup(uriFragment);;

if(eo!=null) return eo;


return super.getEObject(uriFragment);

}

"drew" <a class="moz-txt-link-rfc2396E" href="mailto:drew@acm.org">&lt;drew@acm.org&gt;</a> wrote in message
<a class="moz-txt-link-freetext" href="news:gl2eq5$52i$1@build.eclipse.org">news:gl2eq5$52i$1@build.eclipse.org</a>...
</pre>
<blockquote type="cite">
<pre wrap="">Is there an example (or whitepaper) of how to perform custom proxy
resolution an XMLResourceImpl?
</pre>
</blockquote>
</blockquote>
No, just the basic implementations.<br>
<blockquote cite="mid:gl2k4n$i2q$1@build.eclipse.org" type="cite">
<blockquote type="cite">
<pre wrap="">
</pre>
</blockquote>
<pre wrap=""><!---->

</pre>
</blockquote>
</body>
</html>

--------------050608070809050507060906--


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:xs:IDREFS to ???
Next Topic:[CDO] Setting timeout
Goto Forum:
  


Current Time: Thu Apr 25 16:00:38 GMT 2024

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

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

Back to the top