[MOBY-l] moby namespace
Carol Lushbough
clushbou at usd.edu
Tue Sep 11 17:52:15 UTC 2007
I was wondering if anyone can tell how to set the <moby:MOBY
xmlns:moby="http://www.biomoby.org/moby">
name space through a Java method. For example, when I execute
client.getInput().toXML(), Im getting
<Parameter articleName='dnamatrix'><Value>IUB</Value></Parameter>
and I think I should get:
<moby:Parameter
moby:articleName="ktuple"><moby:Value>1</moby:Value></moby:Parameter>
Thanks for your help!
Carol
--------------------------------------------------------------------------------------------------
If you need more information:
I create a client:
Central worker = new
CentralImpl(BioMobyDataTypeParser.MOBY_CENTRAL_ENDPOINT,
BioMobyDataTypeParser.MOBY_CENTRAL_NAMESPACE);
MobyService templateService = new MobyService(serviceName);
MobyService[] validServices =
worker.findService(templateService);
MobyRequest client = new MobyRequest(worker);
MobyService s = validServices[0];
client.setService(s);
Then I set the primary and secondary parameters: (Note; I'm just showing
the secondary parameter calls and partial output)
MobyDataSecondaryInstance[] tempSecondaryData = new
MobyDataSecondaryInstance[allParameters.size()];
for each parameter {
...
MobySecondaryData p1 = new MobySecondaryData(paramName);
tempSecondaryData[count] = new
MobyDataSecondaryInstance(p1, paramValue);
count++;
}
client.setSecondaryInput(tempSecondaryData);
// print the XML representation of the input
System.out.println("Client input:"+client.getInput().toXML());
The output is:
<moby:mobyContent>
<moby:mobyData queryID="1"> <Parameter
articleName='gapdist'><Value>4</Value></Parameter>
<Parameter articleName='dnamatrix'><Value>IUB</Value></Parameter>
<Parameter articleName='matrix'><Value>GONNET</Value></Parameter>
<Parameter articleName='outorder'><Value>aligned</Value></Parameter>
<Parameter articleName='type'><Value>protein</Value></Parameter>
<Parameter articleName='ktuple'><Value>1</Value></Parameter>
<Parameter articleName='score'><Value>percent</Value></Parameter>
<Parameter articleName='endgaps'><Value>FALSE</Value></Parameter>
<Parameter articleName='gapext'><Value>0.2</Value></Parameter>
<Parameter articleName='window'><Value>5</Value></Parameter>
<Parameter articleName='gapopen'><Value>10.0</Value></Parameter>
Instead of:
<moby:Parameter moby:articleName="ktuple">
<moby:Value>1</moby:Value>
</moby:Parameter>
<moby:Parameter moby:articleName="score">
<moby:Value>percent</moby:Value>
</moby:Parameter>
<moby:Parameter moby:articleName="gapdist">
<moby:Value>4</moby:Value>
</moby:Parameter>
<moby:Parameter moby:articleName="gapopen">
<moby:Value>10.0</moby:Value>
</moby:Parameter>
<moby:Parameter moby:articleName="type">
<moby:Value>protein</moby:Value>
</moby:Parameter>
<moby:Parameter moby:articleName="matrix">
<moby:Value>GONNET</moby:Value>
</moby:Parameter>
<moby:Parameter moby:articleName="endgaps">
<moby:Value>FALSE</moby:Value>
</moby:Parameter>
<moby:Parameter moby:articleName="gapext">
<moby:Value>0.2</moby:Value>
</moby:Parameter>
<moby:Parameter moby:articleName="outorder">
<moby:Value>aligned</moby:Value>
</moby:Parameter>
<moby:Parameter moby:articleName="dnamatrix">
<moby:Value>IUB</moby:Value>
</moby:Parameter>
<moby:Parameter moby:articleName="window">
--
Carol Lushbough
Assistant Professor of Computer Science
University of South Dakota
Vermillion, SD 57069
(605) 677-6138
More information about the moby-l
mailing list