Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc) » Teneo resource URI implementation
Teneo resource URI implementation [message #103211] |
Tue, 20 November 2007 14:08 |
Eclipse User |
|
|
|
Originally posted by: akarypid.yahoo.gr
In continuation of my post to org.eclipse.emf:
My understanding is that EMF has a pluggable URI-based model loading
scheme. I'm not a guru, but I've just been reading the API javadoc for
ResourceSet, Resource and URIConverter. From what Ed Merks wrote, EMF
2.4 provides better support for capability inspection of URIs, but how
hard would it be to get that into Teneo 0.8.x with EMF 2.3?
I'm looking at the source of Teneo 0.8 and there's a HibernateResource
extending (via StoreResource) the basic EMF ResourceImpl. I see it
registered with the so called "Resource.Factory" for the
"hibernate://..." URI syntax in class HbDataStore. What would I have to
do to convince the generated EMF editor that one should be able to edit
models loaded from Teneo URIs?
Ed Merks wrote:
> Alexandros,
>
> Comments below.
>
> Alexandros Karypidis wrote:
>> Hi,
>>
>> I've got an EMF model which is persisted using Teneo & Hibernate to a
>> Derby database in an RCP application. I have three problems with the
>> generated RCP editor:
>>
>> 1) It is read-only (I can't edit anything).
> It should be possible to improve this kind of behavior in EMF 2.4 since
> URIHandler will support isReadOnly directly. Right now that's supported
> in AdapterFactoryEditingDomain like this which basically assumes that
> anything that's not platform:/resource, or file:/whatever will be read only.
>
> protected boolean isReadOnlyURI(URI uri)
> {
> if (uri.isArchive())
> {
> return isReadOnlyURI(URI.createURI(uri.authority()));
> }
>
> return !uri.isPlatformResource() && (uri.isRelative() ||
> !uri.isFile());
> }
>
> You'll need to specialize this method.
> I should talk to Martin about providing a HibernateURIHandlerImpl for
> the Teneo version that goes with EMF 2.4 for handling things like
> isReadOnly, delete and things like timestamps...
|
|
|
Re: Teneo resource URI implementation [message #103280 is a reply to message #103211] |
Tue, 20 November 2007 18:09 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Alexandros,
I hope Ed can comment on this (related to the generated editor, urihandler 2.4), my experience
regarding this is limited so I would need some more information to get me on the way.
If something needs to be changed to Teneo to help out here then ofcourse I am willing/interested to
make the required changes. Or incorporate any contributions...
gr. Martin
Alexandros Karypidis wrote:
> In continuation of my post to org.eclipse.emf:
>
> My understanding is that EMF has a pluggable URI-based model loading
> scheme. I'm not a guru, but I've just been reading the API javadoc for
> ResourceSet, Resource and URIConverter. From what Ed Merks wrote, EMF
> 2.4 provides better support for capability inspection of URIs, but how
> hard would it be to get that into Teneo 0.8.x with EMF 2.3?
>
> I'm looking at the source of Teneo 0.8 and there's a HibernateResource
> extending (via StoreResource) the basic EMF ResourceImpl. I see it
> registered with the so called "Resource.Factory" for the
> "hibernate://..." URI syntax in class HbDataStore. What would I have to
> do to convince the generated EMF editor that one should be able to edit
> models loaded from Teneo URIs?
>
> Ed Merks wrote:
>
>> Alexandros,
>>
>> Comments below.
>>
>> Alexandros Karypidis wrote:
>>> Hi,
>>>
>>> I've got an EMF model which is persisted using Teneo & Hibernate to a
>>> Derby database in an RCP application. I have three problems with the
>>> generated RCP editor:
>>>
>>> 1) It is read-only (I can't edit anything).
>> It should be possible to improve this kind of behavior in EMF 2.4
>> since URIHandler will support isReadOnly directly. Right now that's
>> supported in AdapterFactoryEditingDomain like this which basically
>> assumes that anything that's not platform:/resource, or file:/whatever
>> will be read only.
>>
>> protected boolean isReadOnlyURI(URI uri)
>> {
>> if (uri.isArchive())
>> {
>> return isReadOnlyURI(URI.createURI(uri.authority()));
>> }
>>
>> return !uri.isPlatformResource() && (uri.isRelative() ||
>> !uri.isFile());
>> }
>>
>> You'll need to specialize this method.
>> I should talk to Martin about providing a HibernateURIHandlerImpl for
>> the Teneo version that goes with EMF 2.4 for handling things like
>> isReadOnly, delete and things like timestamps...
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Re: Teneo resource URI implementation [message #103330 is a reply to message #103280] |
Tue, 20 November 2007 23:02 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
This is a multi-part message in MIME format.
--------------090608040801070007020200
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Martin,
Unfortunately document is sadly lagging behind. The general idea is
that in 2.4, the URIConverterImpl is more easily tailored by adding
handlers rather than by creating derived implementations which makes it
easier to compose different specialized URI handling mechanism. In
particular, you'll noticed that in 2.4, URIConverter has a list of
URIHandlers which are initialized in the next ExtensibleURIConverterImpl
which replaces the deprecated URIConverterImpl.
public ExtensibleURIConverterImpl()
{
this(URIHandler.DEFAULT_HANDLERS,
ContentHandler.Registry.INSTANCE.contentHandlers());
}
These are available by default:
/**
* The global default read only list of URI handlers.
*/
List<URIHandler> DEFAULT_HANDLERS =
Collections.unmodifiableList
(Arrays.asList
(new URIHandler []
{
new PlatformResourceURIHandlerImpl(),
new FileURIHandlerImpl(),
new EFSURIHandlerImpl(),
new ArchiveURIHandlerImpl(),
new URIHandlerImpl()
}));
So I imagine there ought to be a HibernateURIHandlerImpl that derives
from URIHandlerImpl and specializes methods like delete, exists, and
get/setAttribute. You could look at the other derived URIHandlerImpls
to see how they implement these mthods. Of course I'll be more than
happy to help answer any questions that come up...
Martin Taal wrote:
> Alexandros,
> I hope Ed can comment on this (related to the generated editor,
> urihandler 2.4), my experience regarding this is limited so I would
> need some more information to get me on the way.
>
> If something needs to be changed to Teneo to help out here then
> ofcourse I am willing/interested to make the required changes. Or
> incorporate any contributions...
>
> gr. Martin
>
> Alexandros Karypidis wrote:
>> In continuation of my post to org.eclipse.emf:
>>
>> My understanding is that EMF has a pluggable URI-based model loading
>> scheme. I'm not a guru, but I've just been reading the API javadoc
>> for ResourceSet, Resource and URIConverter. From what Ed Merks wrote,
>> EMF 2.4 provides better support for capability inspection of URIs,
>> but how hard would it be to get that into Teneo 0.8.x with EMF 2.3?
>>
>> I'm looking at the source of Teneo 0.8 and there's a
>> HibernateResource extending (via StoreResource) the basic EMF
>> ResourceImpl. I see it registered with the so called
>> "Resource.Factory" for the "hibernate://..." URI syntax in class
>> HbDataStore. What would I have to do to convince the generated EMF
>> editor that one should be able to edit models loaded from Teneo URIs?
>>
>> Ed Merks wrote:
>>
>>> Alexandros,
>>>
>>> Comments below.
>>>
>>> Alexandros Karypidis wrote:
>>>> Hi,
>>>>
>>>> I've got an EMF model which is persisted using Teneo & Hibernate to
>>>> a Derby database in an RCP application. I have three problems with
>>>> the generated RCP editor:
>>>>
>>>> 1) It is read-only (I can't edit anything).
>>> It should be possible to improve this kind of behavior in EMF 2.4
>>> since URIHandler will support isReadOnly directly. Right now that's
>>> supported in AdapterFactoryEditingDomain like this which basically
>>> assumes that anything that's not platform:/resource, or
>>> file:/whatever will be read only.
>>>
>>> protected boolean isReadOnlyURI(URI uri)
>>> {
>>> if (uri.isArchive())
>>> {
>>> return isReadOnlyURI(URI.createURI(uri.authority()));
>>> }
>>>
>>> return !uri.isPlatformResource() && (uri.isRelative() ||
>>> !uri.isFile());
>>> }
>>>
>>> You'll need to specialize this method.
>>> I should talk to Martin about providing a HibernateURIHandlerImpl
>>> for the Teneo version that goes with EMF 2.4 for handling things
>>> like isReadOnly, delete and things like timestamps...
>
>
--------------090608040801070007020200
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">
Martin,<br>
<br>
Unfortunately document is sadly lagging behind. The general idea is
that in 2.4, the URIConverterImpl is more easily tailored by adding
handlers rather than by creating derived implementations which makes it
easier to compose different specialized URI handling mechanism. In
particular, you'll noticed that in 2.4, URIConverter has a list of
URIHandlers which are initialized in the next
ExtensibleURIConverterImpl which replaces the deprecated
URIConverterImpl.<br>
<blockquote><small> public ExtensibleURIConverterImpl()<br>
{<br>
this(URIHandler.DEFAULT_HANDLERS,
ContentHandler.Registry.INSTANCE.contentHandlers());<br>
}</small><br>
</blockquote>
These are available by default:<small><br>
</small>
<blockquote><small> /**</small><br>
<small> * The global default read only list of URI handlers.</small><br>
<small> */</small><br>
<small> List<URIHandler> DEFAULT_HANDLERS = </small><br>
<small> Collections.unmodifiableList</small><br>
<small> (Arrays.asList</small><br>
<small> (new URIHandler [] </small><br>
<small> { </small><br>
<small> new PlatformResourceURIHandlerImpl(), </small><br>
<small> new FileURIHandlerImpl(), </small><br>
<small> new EFSURIHandlerImpl(), </small><br>
<small> new ArchiveURIHandlerImpl(), </small><br>
<small> new URIHandlerImpl()</small><br>
<small> }));</small><br>
</blockquote>
So I imagine there ought to be a HibernateURIHandlerImpl that derives
from URIHandlerImpl and specializes methods like delete, exists, and
get/setAttribute. You could look at the other derived URIHandlerImpls
to see how they implement these mthods. Of course I'll be more than
happy to help answer any questions that come up...<br>
<br>
<br>
Martin Taal wrote:
<blockquote cite="mid:fhv7sb$trb$1@build.eclipse.org" type="cite">Alexandros,
<br>
I hope Ed can comment on this (related to the generated editor,
urihandler 2.4), my experience regarding this is limited so I would
need some more information to get me on the way.
<br>
<br>
If something needs to be changed to Teneo to help out here then
ofcourse I am willing/interested to make the required changes. Or
incorporate any contributions...
<br>
<br>
gr. Martin
<br>
<br>
Alexandros Karypidis wrote:
<br>
<blockquote type="cite">In continuation of my post to
org.eclipse.emf:
<br>
<br>
My understanding is that EMF has a pluggable URI-based model loading
scheme. I'm not a guru, but I've just been reading the API javadoc for
ResourceSet, Resource and URIConverter. From what Ed Merks wrote, EMF
2.4 provides better support for capability inspection of URIs, but how
hard would it be to get that into Teneo 0.8.x with EMF 2.3?
<br>
<br>
I'm looking at the source of Teneo 0.8 and there's a HibernateResource
extending (via StoreResource) the basic EMF ResourceImpl. I see it
registered with the so called "Resource.Factory" for the
"hibernate://..." URI syntax in class HbDataStore. What would I have to
do to convince the generated EMF editor that one should be able to edit
models loaded from Teneo URIs?
<br>
<br>
Ed Merks wrote:
<br>
<br>
<blockquote type="cite">Alexandros,
<br>
<br>
Comments below.
<br>
<br>
Alexandros Karypidis wrote:
<br>
<blockquote type="cite">Hi,
<br>
<br>
I've got an EMF model which is persisted using Teneo & Hibernate to
a Derby database in an RCP application. I have three problems with the
generated RCP editor:
<br>
<br>
1) It is read-only (I can't edit anything).
<br>
</blockquote>
It should be possible to improve this kind of behavior in EMF 2.4 since
URIHandler will support isReadOnly directly. Right now that's
supported in AdapterFactoryEditingDomain like this which basically
assumes that anything that's not platform:/resource, or <a class="moz-txt-link-freetext" href="file:/whatever">file:/whatever</a>
will be read only.
<br>
<br>
protected boolean isReadOnlyURI(URI uri)
<br>
{
<br>
if (uri.isArchive())
<br>
{
<br>
return isReadOnlyURI(URI.createURI(uri.authority()));
<br>
}
<br>
<br>
return !uri.isPlatformResource() && (uri.isRelative()
||
<br>
!uri.isFile());
<br>
}
<br>
<br>
You'll need to specialize this method.
<br>
I should talk to Martin about providing a HibernateURIHandlerImpl for
the Teneo version that goes with EMF 2.4 for handling things like
isReadOnly, delete and things like timestamps...
<br>
</blockquote>
</blockquote>
<br>
<br>
</blockquote>
<br>
</body>
</html>
--------------090608040801070007020200--
|
|
|
Re: Teneo resource URI implementation [message #612612 is a reply to message #103211] |
Tue, 20 November 2007 18:09 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Alexandros,
I hope Ed can comment on this (related to the generated editor, urihandler 2.4), my experience
regarding this is limited so I would need some more information to get me on the way.
If something needs to be changed to Teneo to help out here then ofcourse I am willing/interested to
make the required changes. Or incorporate any contributions...
gr. Martin
Alexandros Karypidis wrote:
> In continuation of my post to org.eclipse.emf:
>
> My understanding is that EMF has a pluggable URI-based model loading
> scheme. I'm not a guru, but I've just been reading the API javadoc for
> ResourceSet, Resource and URIConverter. From what Ed Merks wrote, EMF
> 2.4 provides better support for capability inspection of URIs, but how
> hard would it be to get that into Teneo 0.8.x with EMF 2.3?
>
> I'm looking at the source of Teneo 0.8 and there's a HibernateResource
> extending (via StoreResource) the basic EMF ResourceImpl. I see it
> registered with the so called "Resource.Factory" for the
> "hibernate://.." URI syntax in class HbDataStore. What would I have to
> do to convince the generated EMF editor that one should be able to edit
> models loaded from Teneo URIs?
>
> Ed Merks wrote:
>
>> Alexandros,
>>
>> Comments below.
>>
>> Alexandros Karypidis wrote:
>>> Hi,
>>>
>>> I've got an EMF model which is persisted using Teneo & Hibernate to a
>>> Derby database in an RCP application. I have three problems with the
>>> generated RCP editor:
>>>
>>> 1) It is read-only (I can't edit anything).
>> It should be possible to improve this kind of behavior in EMF 2.4
>> since URIHandler will support isReadOnly directly. Right now that's
>> supported in AdapterFactoryEditingDomain like this which basically
>> assumes that anything that's not platform:/resource, or file:/whatever
>> will be read only.
>>
>> protected boolean isReadOnlyURI(URI uri)
>> {
>> if (uri.isArchive())
>> {
>> return isReadOnlyURI(URI.createURI(uri.authority()));
>> }
>>
>> return !uri.isPlatformResource() && (uri.isRelative() ||
>> !uri.isFile());
>> }
>>
>> You'll need to specialize this method.
>> I should talk to Martin about providing a HibernateURIHandlerImpl for
>> the Teneo version that goes with EMF 2.4 for handling things like
>> isReadOnly, delete and things like timestamps...
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Re: Teneo resource URI implementation [message #612619 is a reply to message #103280] |
Tue, 20 November 2007 23:02 |
Ed Merks Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
--------------090608040801070007020200
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Martin,
Unfortunately document is sadly lagging behind. The general idea is
that in 2.4, the URIConverterImpl is more easily tailored by adding
handlers rather than by creating derived implementations which makes it
easier to compose different specialized URI handling mechanism. In
particular, you'll noticed that in 2.4, URIConverter has a list of
URIHandlers which are initialized in the next ExtensibleURIConverterImpl
which replaces the deprecated URIConverterImpl.
public ExtensibleURIConverterImpl()
{
this(URIHandler.DEFAULT_HANDLERS,
ContentHandler.Registry.INSTANCE.contentHandlers());
}
These are available by default:
/**
* The global default read only list of URI handlers.
*/
List<URIHandler> DEFAULT_HANDLERS =
Collections.unmodifiableList
(Arrays.asList
(new URIHandler []
{
new PlatformResourceURIHandlerImpl(),
new FileURIHandlerImpl(),
new EFSURIHandlerImpl(),
new ArchiveURIHandlerImpl(),
new URIHandlerImpl()
}));
So I imagine there ought to be a HibernateURIHandlerImpl that derives
from URIHandlerImpl and specializes methods like delete, exists, and
get/setAttribute. You could look at the other derived URIHandlerImpls
to see how they implement these mthods. Of course I'll be more than
happy to help answer any questions that come up...
Martin Taal wrote:
> Alexandros,
> I hope Ed can comment on this (related to the generated editor,
> urihandler 2.4), my experience regarding this is limited so I would
> need some more information to get me on the way.
>
> If something needs to be changed to Teneo to help out here then
> ofcourse I am willing/interested to make the required changes. Or
> incorporate any contributions...
>
> gr. Martin
>
> Alexandros Karypidis wrote:
>> In continuation of my post to org.eclipse.emf:
>>
>> My understanding is that EMF has a pluggable URI-based model loading
>> scheme. I'm not a guru, but I've just been reading the API javadoc
>> for ResourceSet, Resource and URIConverter. From what Ed Merks wrote,
>> EMF 2.4 provides better support for capability inspection of URIs,
>> but how hard would it be to get that into Teneo 0.8.x with EMF 2.3?
>>
>> I'm looking at the source of Teneo 0.8 and there's a
>> HibernateResource extending (via StoreResource) the basic EMF
>> ResourceImpl. I see it registered with the so called
>> "Resource.Factory" for the "hibernate://.." URI syntax in class
>> HbDataStore. What would I have to do to convince the generated EMF
>> editor that one should be able to edit models loaded from Teneo URIs?
>>
>> Ed Merks wrote:
>>
>>> Alexandros,
>>>
>>> Comments below.
>>>
>>> Alexandros Karypidis wrote:
>>>> Hi,
>>>>
>>>> I've got an EMF model which is persisted using Teneo & Hibernate to
>>>> a Derby database in an RCP application. I have three problems with
>>>> the generated RCP editor:
>>>>
>>>> 1) It is read-only (I can't edit anything).
>>> It should be possible to improve this kind of behavior in EMF 2.4
>>> since URIHandler will support isReadOnly directly. Right now that's
>>> supported in AdapterFactoryEditingDomain like this which basically
>>> assumes that anything that's not platform:/resource, or
>>> file:/whatever will be read only.
>>>
>>> protected boolean isReadOnlyURI(URI uri)
>>> {
>>> if (uri.isArchive())
>>> {
>>> return isReadOnlyURI(URI.createURI(uri.authority()));
>>> }
>>>
>>> return !uri.isPlatformResource() && (uri.isRelative() ||
>>> !uri.isFile());
>>> }
>>>
>>> You'll need to specialize this method.
>>> I should talk to Martin about providing a HibernateURIHandlerImpl
>>> for the Teneo version that goes with EMF 2.4 for handling things
>>> like isReadOnly, delete and things like timestamps...
>
>
--------------090608040801070007020200
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">
Martin,<br>
<br>
Unfortunately document is sadly lagging behind. The general idea is
that in 2.4, the URIConverterImpl is more easily tailored by adding
handlers rather than by creating derived implementations which makes it
easier to compose different specialized URI handling mechanism. In
particular, you'll noticed that in 2.4, URIConverter has a list of
URIHandlers which are initialized in the next
ExtensibleURIConverterImpl which replaces the deprecated
URIConverterImpl.<br>
<blockquote><small> public ExtensibleURIConverterImpl()<br>
{<br>
this(URIHandler.DEFAULT_HANDLERS,
ContentHandler.Registry.INSTANCE.contentHandlers());<br>
}</small><br>
</blockquote>
These are available by default:<small><br>
</small>
<blockquote><small> /**</small><br>
<small> * The global default read only list of URI handlers.</small><br>
<small> */</small><br>
<small> List<URIHandler> DEFAULT_HANDLERS = </small><br>
<small> Collections.unmodifiableList</small><br>
<small> (Arrays.asList</small><br>
<small> (new URIHandler [] </small><br>
<small> { </small><br>
<small> new PlatformResourceURIHandlerImpl(), </small><br>
<small> new FileURIHandlerImpl(), </small><br>
<small> new EFSURIHandlerImpl(), </small><br>
<small> new ArchiveURIHandlerImpl(), </small><br>
<small> new URIHandlerImpl()</small><br>
<small> }));</small><br>
</blockquote>
So I imagine there ought to be a HibernateURIHandlerImpl that derives
from URIHandlerImpl and specializes methods like delete, exists, and
get/setAttribute. You could look at the other derived URIHandlerImpls
to see how they implement these mthods. Of course I'll be more than
happy to help answer any questions that come up...<br>
<br>
<br>
Martin Taal wrote:
<blockquote cite="mid:fhv7sb$trb$1@build.eclipse.org" type="cite">Alexandros,
<br>
I hope Ed can comment on this (related to the generated editor,
urihandler 2.4), my experience regarding this is limited so I would
need some more information to get me on the way.
<br>
<br>
If something needs to be changed to Teneo to help out here then
ofcourse I am willing/interested to make the required changes. Or
incorporate any contributions...
<br>
<br>
gr. Martin
<br>
<br>
Alexandros Karypidis wrote:
<br>
<blockquote type="cite">In continuation of my post to
org.eclipse.emf:
<br>
<br>
My understanding is that EMF has a pluggable URI-based model loading
scheme. I'm not a guru, but I've just been reading the API javadoc for
ResourceSet, Resource and URIConverter. From what Ed Merks wrote, EMF
2.4 provides better support for capability inspection of URIs, but how
hard would it be to get that into Teneo 0.8.x with EMF 2.3?
<br>
<br>
I'm looking at the source of Teneo 0.8 and there's a HibernateResource
extending (via StoreResource) the basic EMF ResourceImpl. I see it
registered with the so called "Resource.Factory" for the
"hibernate://.." URI syntax in class HbDataStore. What would I have to
do to convince the generated EMF editor that one should be able to edit
models loaded from Teneo URIs?
<br>
<br>
Ed Merks wrote:
<br>
<br>
<blockquote type="cite">Alexandros,
<br>
<br>
Comments below.
<br>
<br>
Alexandros Karypidis wrote:
<br>
<blockquote type="cite">Hi,
<br>
<br>
I've got an EMF model which is persisted using Teneo & Hibernate to
a Derby database in an RCP application. I have three problems with the
generated RCP editor:
<br>
<br>
1) It is read-only (I can't edit anything).
<br>
</blockquote>
It should be possible to improve this kind of behavior in EMF 2.4 since
URIHandler will support isReadOnly directly. Right now that's
supported in AdapterFactoryEditingDomain like this which basically
assumes that anything that's not platform:/resource, or <a class="moz-txt-link-freetext" href="file:/whatever">file:/whatever</a>
will be read only.
<br>
<br>
protected boolean isReadOnlyURI(URI uri)
<br>
{
<br>
if (uri.isArchive())
<br>
{
<br>
return isReadOnlyURI(URI.createURI(uri.authority()));
<br>
}
<br>
<br>
return !uri.isPlatformResource() && (uri.isRelative()
||
<br>
!uri.isFile());
<br>
}
<br>
<br>
You'll need to specialize this method.
<br>
I should talk to Martin about providing a HibernateURIHandlerImpl for
the Teneo version that goes with EMF 2.4 for handling things like
isReadOnly, delete and things like timestamps...
<br>
</blockquote>
</blockquote>
<br>
<br>
</blockquote>
<br>
</body>
</html>
--------------090608040801070007020200--
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Goto Forum:
Current Time: Thu Dec 26 12:44:12 GMT 2024
Powered by FUDForum. Page generated in 0.05281 seconds
|