[MOBY-l] MobyDataSetInstance vs MobyDataSimpleinstance

Paul Gordon gordonp at ucalgary.ca
Fri Apr 15 21:22:38 UTC 2005


Hi Ben,

    You should now be able to query with a Collection.  I've bumped 
setXmlMode(), getXmlMode() and the static variables SERVICE_XML_MODE and 
CENTRAL_XML_MODE to the MobyDataInstance interface.  Any references to 
these static variables will need to be updated in your code.

You can run your code as before, but the simplified code for your 
example is now:

... // setup templateService and worker

MobyDataSimpleInstance input1 = new MobyDataSimpleInstance ("NCBI_gi",  
"111076");
MobyDataSimpleInstance input2 = new MobyDataSimpleInstance ("NCBI_gi", 
"111077");
MobyDataSetInstance input = new MobyDataSetInstance("");
input.add(input1);
input.add(input2);
templateService.addInput(input);
MobyService[] validServices = worker.findService(templateService);

Also note that I've made MobyDataSetInstance implement 
java.util.Collection, so you can conveniently call all of your favorite 
Collection methods on it now such as removeAll(), size(), iterator(), 
equals(), etc.

The CENTRAL_XML_MODE output for this call would be:

<Collection>
 <Simple xmlns="http://www.biomoby.org/moby">
   <objectType>Object</objectType>
   <Namespace>NCBI_gi</Namespace>
 </Simple>
</Collection>


I hope this is correct! :-)



More information about the moby-l mailing list