[MOBY-l] MobyDataSetInstance vs MobyDataSimpleinstance
Benjamin Good
bmg at sfu.ca
Fri Apr 15 04:36:50 UTC 2005
There is no .setXmlMode in MobyDataSetInstance . I think this will
cause problems requesting services from Central ..??
Has anyone built a collection in a java and used it to query for
services successfully?
I built a collection of Objects as below and didn't find any matching
services? This should match anything that accepts a collection as
input because of the inheritance from object right??
//specify a dataype for use in the input to the template
service
MobyDataType type = new MobyDataType("Object");
//make a jMoby object to act as the input to the template (and later
the actual call)
MobyDataSimpleInstance input1 = new MobyDataSimpleInstance
("");
input1.setDataType (type);
input1.addNamespace (new MobyNamespace ("NCBI_gi"));
input1.setId("111076");
MobyDataSimpleInstance input2 = new MobyDataSimpleInstance
("");
input2.setDataType (type);
input2.addNamespace (new MobyNamespace ("NCBI_gi"));
input2.setId("111077");
MobyDataSimpleInstance[] inputset = new
MobyDataSimpleInstance[2];
inputset[0] = input1;
inputset[1] = input2;
MobyDataSetInstance input = new
MobyDataSetInstance("",inputset);
//specify that the xml generated for this object by the getXML method
//is suitable for communicating with moby central --- doesn't exist!
// input.setXmlMode(MobyDataSimpleInstance.CENTRAL_XML_MODE);
//add the moby object as input to the template service
templateService.addInput(input);
//Find services that match this template service
MobyService[] validServices =
worker.findService(templateService);
-> finds none
-> why?
thanks!
-Ben
http://bioinfo.icapture.ubc.ca/bgood
More information about the moby-l
mailing list