[MOBY-dev] Another Java API question

Edward Kawas edward.kawas at gmail.com
Fri Jun 29 13:09:21 UTC 2007


Hi Andreas,

Hopefully this helps you out!
	CentralImpl central = new CentralImpl();
	MobyService s = new MobyService();
	s.setCategory("");
	MobyDataObject data = new MobyDataObject("");
	data.setDataType(new MobyDataType("Object"));
	data.addNamespace(new MobyNamespace("NCBI_gi"));
	MobyDataObjectSet set = new MobyDataObjectSet("");
	set.add(data);
	s.addOutput((set));
	MobyService[] services = central.findService(s,null,true,false);

Eddie

> -----Original Message-----
> From: moby-dev-bounces at lists.open-bio.org [mailto:moby-dev-
> bounces at lists.open-bio.org] On Behalf Of Andreas Groscurth
> Sent: Friday, June 29, 2007 6:05 AM
> To: Core developer announcements
> Subject: [MOBY-dev] Another Java API question
> 
> Hi all again,
> 
> I couldnt find anything about this, so I hope you can help me with this
> simple
> one:
> 
> Actually I only want to find services with specific informations, e.g. I
> want
> to find all services with a specific input or output namespace and so on.
> 
> I fail by creating a service with my needs.
> 
> The way I thought of doing it is to create a Central instance and call the
> findService method with a MobyService as parameter.
> My current problem is how to tell the Mobyservice which inputs it has to
> consume ?
> 
> E.g. how to tell that I want an GenBank identifier as input ?
> 
> The MobyService has the method setInput, which requires MobyData... and i
> couldnt get any connection from MobyData to MobyObject (to set the
> namespace
> then to GenBank or whatsoever).
> 
> So how can I tell the service which MobyObjects I want to use or how can I
> find services with a given input and / or ouput ?
> 
> Thanks
> obedient Andreas
> 
> --
> Andreas Groscurth
> Diplom Bioinformatik - PhD Student
> Max Planck Institute for Plant Breeding Research
> Carl-von-Linné-Weg 10
> 50829 Cologne
> Germany
> E-mail:    groscurt at mpiz-koeln.mpg.de
> Phone:    +49(0)221-5062-447
> 
> _______________________________________________
> MOBY-dev mailing list
> MOBY-dev at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/moby-dev





More information about the MOBY-dev mailing list