[MOBY-guts] biomoby commit

Paul Gordon gordonp at dev.open-bio.org
Mon Jan 7 22:06:47 UTC 2008


gordonp
Mon Jan  7 17:06:47 EST 2008
Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services
In directory dev.open-bio.org:/tmp/cvs-serv15134/src/main/ca/ucalgary/services

Modified Files:
	ACDService.java 
Log Message:
Better min/max param support, exchanged thisService references for getService() due to potential initialization problems
moby-live/Java/src/main/ca/ucalgary/services ACDService.java,1.8,1.9
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/ACDService.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/ACDService.java	2007/12/18 23:08:29	1.8
+++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/ACDService.java	2008/01/07 22:06:47	1.9
@@ -72,7 +72,7 @@
 	// Run the program.  The result is for each output param, a list (vector) of the raw data (byte array)
 	// Maps are used because, for example, an output may be composed of several png files.
 	Map<String, Map<String, byte[]>> resultData = configAndRunProgram(request);
-	MobyPrimaryData[] mobyOutputTemplates = thisService.getPrimaryOutputs();
+	MobyPrimaryData[] mobyOutputTemplates = getService().getPrimaryOutputs();
 
 	if((resultData == null || resultData.size() == 0) && 
 	   mobyOutputTemplates != null && mobyOutputTemplates.length > 0){
@@ -133,7 +133,7 @@
 	Vector<String> command = new Vector<String>();
 	command.add(programBinaryFile.getAbsolutePath());
 
-	MobyPrimaryData[] inputs = thisService.getPrimaryInputs();
+	MobyPrimaryData[] inputs = getService().getPrimaryInputs();
 
 	// Param:tempFile Map
 	Map<String, File> tempFiles = new HashMap<String, File>(); 
@@ -205,7 +205,7 @@
 	    command.add(mobySecondary.getObject().toString());	    
 	}
 
-	MobyPrimaryData[] outputs = thisService.getPrimaryOutputs();
+	MobyPrimaryData[] outputs = getService().getPrimaryOutputs();
 	Map<File,Boolean> outputFile = new HashMap<File,Boolean>();
 
 	// Primary output
@@ -938,10 +938,10 @@
 		    integer.setDataType(MobySecondaryData.INTEGER_TYPE);
 		    integer.setDescription(block.get("information"));
 		    String m = block.get("maximum");
-		    try{m = (new BigInteger(m)).toString();}catch(NumberFormatException nfe){m = ""+Integer.MAX_VALUE;}
+		    try{m = (new BigInteger(m)).toString();}catch(Exception e){m = ""+Integer.MAX_VALUE;}
 		    integer.setMaxValue(m);
 		    m = block.get("minimum");
-		    try{m = (new BigInteger(m)).toString();}catch(NumberFormatException nfe){m = ""+Integer.MIN_VALUE;}
+		    try{m = (new BigInteger(m)).toString();}catch(Exception e){m = ""+Integer.MIN_VALUE;}
 		    integer.setMinValue(m);
 		    // Set default to 0, or minimum value if it's not Integer.MIN_VALUE
 		    try{
@@ -961,10 +961,10 @@
 		    floating.setDefaultValue(deFault);
 		    floating.setDescription(block.get("information"));
 		    String m = block.get("maximum");
-		    try{m = (new BigDecimal(m)).toString();}catch(NumberFormatException nfe){m = ""+Double.MAX_VALUE;}
+		    try{m = (new BigDecimal(m)).toString();}catch(Exception e){m = ""+Double.MAX_VALUE;}
 		    floating.setMaxValue(m);
 		    m = block.get("minimum");
-		    try{m = (new BigDecimal(m)).toString();}catch(NumberFormatException nfe){m = ""+Double.MIN_VALUE;}
+		    try{m = (new BigDecimal(m)).toString();}catch(Exception e){m = ""+Double.MIN_VALUE;}
 		    floating.setMinValue(m);
 		    // Set default to 0, or minimum value if it's not Double.MIN_VALUE
 		    try{




More information about the MOBY-guts mailing list