[MOBY-dev] Another Java API question

Andreas Groscurth groscurt at mpiz-koeln.mpg.de
Fri Jul 6 12:58:35 UTC 2007


Hi all,

based on eddies answer below...  I just wanted to know if I understood it 
correctly

MobyDataObjectSet set = new MobyDataObjectSet("");
set.add(data);
s.addOutput(set);

with this I get all services which returns a collection... right ?

if i write

s.addOutput(data)

I get only services which exactly return one object... right ?

and if I want all services which return both - object and collection - can I 
write

s.addOutput(set);
s.addOutput(data)

?

thanks for helping me through the jungel

Andreas



On Friday 29 June 2007 15:09, Edward Kawas wrote:
> 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
>
> _______________________________________________
> MOBY-dev mailing list
> MOBY-dev at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/moby-dev

-- 
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




More information about the MOBY-dev mailing list