Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Checking out a model fragment
[CDO] Checking out a model fragment [message #428787] Mon, 30 March 2009 16:09 Go to next message
Maurice O'Connor is currently offline Maurice O'ConnorFriend
Messages: 86
Registered: July 2009
Member
Is it possible to check out a model fragment from the CDO Server, rather
than continually loading the entire model. Eg with a model such as:

rootNode -containing- node, node node

I could check out just one node and edit this. Is this pie-in-the-sky?
Completely crazy? Do tell!

Thanks!

Maurice
Re: [CDO] Checking out a model fragment [message #428789 is a reply to message #428787] Mon, 30 March 2009 16:40 Go to previous messageGo to next message
Victor Roldan Betancort is currently offline Victor Roldan BetancortFriend
Messages: 524
Registered: July 2009
Senior Member
Maurice,

you don't need to load the whole resource content to fetch an object. Is
one of the (multiple) cool features CDO has :)

I think org.eclipse.emf.cdo.view.CDOView.getObject(CDOID) should do the
trick.

You could also use
org.eclipse.emf.ecore.resource.ResourceSet.getEObject(URI, boolean),
which delegates to
org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl.getEObjec t(String),
but I'm not sure if that method would load the whole containment path.
Eike, Simon, could you confirm this?

HTH,
ViK.


Maurice O'Connor escribió:
> Is it possible to check out a model fragment from the CDO Server, rather
> than continually loading the entire model. Eg with a model such as:
>
> rootNode -containing- node, node node
>
> I could check out just one node and edit this. Is this pie-in-the-sky?
> Completely crazy? Do tell!
>
> Thanks!
>
> Maurice
>
>
Re: [CDO] Checking out a model fragment [message #428801 is a reply to message #428789] Mon, 30 March 2009 22:43 Go to previous messageGo to next message
Simon Mc Duff is currently offline Simon Mc DuffFriend
Messages: 596
Registered: July 2009
Senior Member
Víctor Roldán Betancort wrote:

> Maurice,

> you don't need to load the whole resource content to fetch an object. Is
> one of the (multiple) cool features CDO has :)

> I think org.eclipse.emf.cdo.view.CDOView.getObject(CDOID) should do the
> trick.

> You could also use
> org.eclipse.emf.ecore.resource.ResourceSet.getEObject(URI, boolean),
> which delegates to
> org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl.getEObjec t(String),
> but I'm not sure if that method would load the whole containment path.
> Eike, Simon, could you confirm this?

URI for persistent object has the following structure: (ONLY IN CDO)
cdo://<REPO ID>/<Resource name>#<INTERNAL TYPE>/<OBJECT ID>

Basically we do not have any path structure like the XMI has. We go
directly get the object from the objectID.
In brief, we do fetch only the object.



> HTH,
> ViK.


> Maurice O'Connor escribió:
>> Is it possible to check out a model fragment from the CDO Server, rather
>> than continually loading the entire model. Eg with a model such as:
>>
>> rootNode -containing- node, node node
>>
>> I could check out just one node and edit this. Is this pie-in-the-sky?
>> Completely crazy? Do tell!
>>
>> Thanks!
>>
>> Maurice
>>
>>
Re: [CDO] Checking out a model fragment [message #428818 is a reply to message #428801] Tue, 31 March 2009 10:27 Go to previous message
Maurice O'Connor is currently offline Maurice O'ConnorFriend
Messages: 86
Registered: July 2009
Member
Excellent, this is just what I was looking for, thanks!

Maurice

Simon Mc Duff wrote:

> Víctor Roldán Betancort wrote:

>> Maurice,

>> you don't need to load the whole resource content to fetch an object. Is
>> one of the (multiple) cool features CDO has :)

>> I think org.eclipse.emf.cdo.view.CDOView.getObject(CDOID) should do the
>> trick.

>> You could also use
>> org.eclipse.emf.ecore.resource.ResourceSet.getEObject(URI, boolean),
>> which delegates to
>> org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl.getEObjec t(String),
>> but I'm not sure if that method would load the whole containment path.
>> Eike, Simon, could you confirm this?

> URI for persistent object has the following structure: (ONLY IN CDO)
> cdo://<REPO ID>/<Resource name>#<INTERNAL TYPE>/<OBJECT ID>

> Basically we do not have any path structure like the XMI has. We go
> directly get the object from the objectID.
> In brief, we do fetch only the object.



>> HTH,
>> ViK.


>> Maurice O'Connor escribió:
>>> Is it possible to check out a model fragment from the CDO Server, rather
>>> than continually loading the entire model. Eg with a model such as:
>>>
>>> rootNode -containing- node, node node
>>>
>>> I could check out just one node and edit this. Is this pie-in-the-sky?
>>> Completely crazy? Do tell!
>>>
>>> Thanks!
>>>
>>> Maurice
>>>
>>>
Previous Topic:savig additional resources
Next Topic:[CDO] CDOEditor has two command stacks registered ?
Goto Forum:
  


Current Time: Thu Mar 28 14:14:32 GMT 2024

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

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

Back to the top