[MOBY-guts] biomoby commit

Paul Gordon gordonp at dev.open-bio.org
Mon Jul 23 21:35:26 UTC 2007


gordonp
Mon Jul 23 17:35:25 EDT 2007
Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/services
In directory dev.open-bio.org:/tmp/cvs-serv17852/src/main/ca/ucalgary/seahawk/services

Modified Files:
	MobyComplexBuilder.java 
Log Message:
Fixed support for base64 rules
moby-live/Java/src/main/ca/ucalgary/seahawk/services MobyComplexBuilder.java,1.10,1.11
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/services/MobyComplexBuilder.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/services/MobyComplexBuilder.java	2007/06/28 16:45:44	1.10
+++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/services/MobyComplexBuilder.java	2007/07/23 21:35:25	1.11
@@ -3,8 +3,9 @@
 import ca.ucalgary.seahawk.util.SeahawkOptions;
 
 import org.biomoby.shared.*;
-import org.biomoby.shared.data.MobyDataObject;
+import org.biomoby.shared.data.MobyDataBytes;
 import org.biomoby.shared.data.MobyDataComposite;
+import org.biomoby.shared.data.MobyDataObject;
 
 import org.w3c.dom.Document;
 
@@ -171,6 +172,10 @@
 	if(mobyDataType.getName().equals("Object")){
 	    mobyObj = new MobyDataObject("", SeahawkOptions.getRegistry());
 	}
+	else if(mobyDataType.inheritsFrom(MobyDataBytes.BASE64_DATATYPE)){
+	    mobyObj = new MobyDataBytes("", (String) null);
+	    mobyObj.setDataType(mobyDataType);
+	}
 	// else ifs for other primitives in the future maybe?
 	else{
 	    mobyObj = new MobyDataComposite(mobyDataType);
@@ -280,7 +285,8 @@
 	    
 	    for(String result: results){
 		
-		if(PrimitiveTypes.isPrimitive(dataTypeName)){
+		if(PrimitiveTypes.isPrimitive(dataTypeName) ||
+		   MobyDataType.getDataType(dataTypeName, SeahawkOptions.getRegistry()).inheritsFrom(MobyDataBytes.BASE64_DATATYPE)){
 		    ((MobyDataComposite) mobyObj).put(memberName, 
 						      MobyDataObject.createInstanceFromString(dataTypeName, result));
 		}




More information about the MOBY-guts mailing list