[MOBY-dev] findService java api question

Paul Gordon gordonp at ucalgary.ca
Tue Aug 7 14:32:27 UTC 2007


Hi Andreas,
> Hi,
>
> I still dont get the findService api .... hope again, someone can help me out
>
>  Central central = new CentralImpl();
>  MobyService service = new MobyService();
>  service.setCategory( "" );
>
> // create an input object... the service shall consume an AGI_LocusCode        
> MobyDataObject inputObject = new MobyDataObject( "" );    
> inputObject.setPrimaryNamespace( MobyNamespace.getNamespace( "AGI_LocusCode" ) );
> service.addInput( inputObject );
>
> // I want services which have a NucleotideSequence as output
> MobyDataObject dataObject = new MobyDataObject( "NucleotideSequence" );
>   
What you actually want is a new 
MobyDataComposite("NucleotideSequence").  From the MobyDataObject javadocs:

A class representing a *base* MOBY object (i.e. just a namespace and id) 
that has been instantiated. If you are looking to represent an object 
with members (e.g. DNASequence), look at MobyDataComposite.

Hope this helps!




More information about the MOBY-dev mailing list