[MOBY-l] Service Instances

Michael DiBernardo mikedebo at gmail.com
Fri Aug 17 14:21:37 UTC 2007


On 17-Aug-07, at 2:08 AM, maliha aziz wrote:

> Hi Andreas
> I actually need the service name its inputs as well as outputs ...  
> I looked at the org.biomoby.shared.Central the maximum i could see  
> was this  function that could  be of some use
>
> getServiceNamesByAuthority()
>            Get a list of all authorities - and for each of them a  
> list of  their registered service names.

This is a gotcha in the API that tripped me up at first. If you just  
use the Central interface, you can only fetch the _names_ of the  
services. You then have to make a call to findServiceByName for each  
service to populate the other fields of each service interface.

Alternately, you can use CentralDigestImpl directly and call  
getServices(). That will fetch you the inputs and outputs as well,  
but it still leaves some fields in each MobyService unpopulated.

See: http://biomoby.open-bio.org/CVS_CONTENT/moby-live/Java/docs/API/ 
org/biomoby/client/CentralDigestImpl.html#getServices()

Finally, if you don't want to go over the wire every time you execute  
your program, you can use a version of the central digest that  
supports caching (i.e. writes the results of your fetch to a  
directory on the local store):

See:

http://biomoby.open-bio.org/CVS_CONTENT/moby-live/Java/docs/API/org/ 
biomoby/client/CentralDigestCachedImpl.html
http://biomoby.open-bio.org/CVS_CONTENT/moby-live/Java/docs/API/org/ 
biomoby/client/CentralDigestCachedImpl.html#getServices()

Hope this helps,
-Mike



More information about the moby-l mailing list