[ome-devel] ome access with c++
Harry Hochheiser
hsh at nih.gov
Wed Oct 12 14:14:18 BST 2005
Gerhard:
The third parameter to your method call (after the session key and
the method) is the specification of the fields that are wanted ( for
proof of this,, look at the definition of getUserState in
SessionFacade.pm).
The FieldsSpecification is a flexible way to specify exactly which
components of a complex tree of objects that you want to retrieve in
a given situation. The OME UserState (implemented in the database in
the ome_sessions table) contains some basic information (an Id, a
session-key, started and last accessed timestamps, etc.) along with
references to items from other tables (group, experimenter, dataset,
image, project, etc.) The fields specification criteria tells us
which of the fields that we should retrieve, and which tables we
should join in to retrieve requested values. In effect, the fields
specification acts as both a project and a select off of the basic
table that is requested.
The "." notation specifies the top-level fields that should be
retrieved: the columns from the table in question. In your example,
we have a member with name "." and values "id" and "experimenter".
This indicates that we should get the Id of the user state, and the
experimenter along with that. If we had wanted (for example) the
started timestamp as well, we would have specified "started" as an
additional item in the array.
The other element in the array - "experimenter" specifies the fields
that we want to retrieve for the experimenter: in this case, just the
id. We could have asked for the first name or last name of the
experimenter by adding other fields. underneath experimenter.
This can proceed in an arbitrarily complex fashion by adding dotted
pair notation for further nesting. Thus, if i had asked for "dataset"
under the ".", i would have had a top-level member named "dataset",
which might have had fields like "id" and "owner". i might then have
had another top-level entry called "dataset.owner", which would ask
for "id" "first name", "last name', etc.
This may be a somewhat cryptic set of conventions, but it's very
flexible and powerful. if you have any further questions, please ask.
You might also consider looking at some useful notes on the remote
framework, at http://www.openmicroscopy.org/api/remote/transfer.html
best,
harry
On Oct 12, 2005, at 6:39 AM, gerhard wrote:
> One more question to XML-RPC:
>
> I have the following code:
>
> <value>getUserState</value></param>
> <param>
> <value>
> <struct>
> <member><name>experimenter</
> name><value><array><data><value>id</value><value>Group</
> value><value>FirstName</value><value>LastName</value></data></
> array></value></member>
>
> <member><name>.</
> name><value><array><data><value>experimenter</value></data></
> array></value></member>
> </struct></value></param>
> </params>
> </methodCall>
>
>
> So if anyone can explain the meaning of the two members in the
> struct. I
> know that these lines are what I want to get. But especially the
> second
> member with the point is confusing for me. So if anyone can
> explain it
> in detail.
>
> Thanks very much
> gerhard
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20051012/1aacc306/attachment.html
More information about the ome-devel
mailing list