|
Re: [CDO] Checking out a model fragment [message #428789 is a reply to message #428787] |
Mon, 30 March 2009 16:40 |
Victor Roldan Betancort 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 |
Simon Mc Duff 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 |
Maurice O'Connor 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
>>>
>>>
|
|
|
Powered by
FUDForum. Page generated in 0.03895 seconds