The current way to do this is based on trying to parse apart the uid
and to query for the labels of the terms taking part in the
composition and then putting together the results somehow.
I suspect there is a better way to do this that involved the OBD API
(maybe for CompositionalDescription?), but the level of documentation
is a bit overwhelming :)
An example for the kind of uid we find in the database and for what we
want to turn it into is below. Any hints for how one might best go
about this that is not based on running regular expressions against
the uid?
-hilmar
Begin forwarded message:
From: Cartik Kothari <cartik....@duke.edu>
Date: May 1, 2009 10:12:40 AM EDT
To: Hilmar Lapp <hl...@duke.edu>
Subject: Post composition example
Hi Hilmar,
Here is an example of a post composed term. The UID is
"PATO:0000407^OBO_REL:inheres_in(TAO:0000356^OBO_REL:part_of(TAO:
0001237))"
The quality UID for this term is "PATO:0000407" . Label is "flat"
Entity is "TAO:0000356^OBO_REL:part_of(TAO:0001237)". The label field
is NULL
This entity UID is to be translated to
gill raker (part of (ceratobranchial bone))
This is what the resolve label method in the OBDSQLShard class returns
Cartik
--
===========================================================
: Hilmar Lapp -:- Durham, NC -:- hlapp at duke dot edu :
===========================================================
> Or, at the API level you should be able to do
>
> cd = shard.getCompositionalDescription("PATO:
> 0000407^OBO_REL:inheres_in(TAO:0000356^OBO_REL:part_of(TAO:0001237))")
>
> This gives you back one of these:
> http://www.berkeleybop.org/obd/docs/org/obd/model/CompositionalDescription.html
Great - that's what I hoped. However, this API is undocumented and
frankly doesn't give off much hint for which methods one would call to
get the pieces. Do you have a recipe-like sequence of API calls, or
which calls can be expected to return which piece of the above string?
> This is all assuming the skolem IDs are in the database via the OBD
> API and not via your own inserts.
They are in the database via the obd data loader (which probably makes
it go through the OBD API but I haven't looked into the innards of
that).
-hilmar