[MOBY-guts] biomoby commit
Paul Gordon
gordonp at dev.open-bio.org
Mon Jan 7 22:45:32 UTC 2008
gordonp
Mon Jan 7 17:45:32 EST 2008
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client
In directory dev.open-bio.org:/tmp/cvs-serv16291/src/main/org/biomoby/client
Modified Files:
MobyRequest.java
Log Message:
Added default secondaries only if not already specified in the given input data
moby-live/Java/src/main/org/biomoby/client MobyRequest.java,1.32,1.33
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/MobyRequest.java,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/MobyRequest.java 2008/01/07 22:04:17 1.32
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/MobyRequest.java 2008/01/07 22:45:32 1.33
@@ -923,16 +923,19 @@
}
if(secondaries != null){
// If no secondaries provided, fill them in by default
- if(secondaries.length != 0 && secondaryParams.isEmpty()){
+ if(secondaries.length != 0){
for(MobySecondaryData secondary: secondaries){
- secondaryParams.put(secondary.getName(), new MobyDataSecondaryInstance(secondary));
+ if(!secondaryParams.containsKey(secondary.getName())){
+ secondaryParams.put(secondary.getName(), new MobyDataSecondaryInstance(secondary));
+ }
}
}
- else if(secondaries.length != secondaryParams.size()){
+ if(secondaries.length != secondaryParams.size()){
throw new MobyException("Service " + mobyService.getName() + " was provided " +
secondaryParams.size() +
" secondary input parameter(s), but takes " + secondaries.length +
- " (query " + queryName + ")");
+ " (query " + queryName + "). Extra secondary" +
+ " parameters must have been specified");
}
}
More information about the MOBY-guts
mailing list