[ome-devel] Remote API update question

Zachary Pincus zpincus at stanford.edu
Wed Sep 22 22:53:34 BST 2004


Hello,

I've got a few minor questions about how updating objects with the 
remote framework works.

Specifically, when you pack up a DTO for update over the wire, there 
appear to be two ways to specify objects to which that DTO refers.

Say we've got pulled a DTO from over the network for a Feature that 
looks like so:

{
   'image': {'id': 2},
   'tag': 'CELL',
   'id': 78
}

Now say we want to change the image to which feature 78 refers to image 
1.

We could do this two ways:
(a) Change the DTO to look like so:
{
   'image': 'REF:Image:1',
   'tag': 'CELL',
   'id': 78
}
and call updateObject on that DTO, or

(b) Change the DTO to look like so:
{
   'image_id': 2,
   'tag': 'CELL',
   'id': 78
}
and call updateObject.

Several questions:
(1) Why are there two possible methods?
(2) If we want to have the DTO refer to a new image, we can make it 
look like so:
{
   'image': 'NEW:1',
   'tag': 'CELL',
   'id': 78
}
and call updateObjects with a list which contains the new image first, 
and then this DTO.
The question is whether this method would work if we set 'image_id' to 
'NEW:1' rather than setting 'image'.
(3) In option (a) above, we need to set the 'image' field to 
'REF:Image:1' -- why not 'REF:1'? The fields are strongly-typed, after 
all. OME knows that it must be a reference to an Image. In fact, if we 
set 'image' to 'REF:Feature:1' or even 'REF:foobar:1' it works just the 
same way, with no errors. Is there any reason for this?

Thanks,

Zach Pincus

Department of Biochemistry and Program in Biomedical Informatics
Stanford University School of Medicine



More information about the ome-devel mailing list