[MOBY-guts] biomoby commit
Paul Gordon
gordonp at dev.open-bio.org
Thu Dec 6 23:46:34 UTC 2007
gordonp
Thu Dec 6 18:46:34 EST 2007
Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/services
In directory dev.open-bio.org:/tmp/cvs-serv31420/src/main/ca/ucalgary/seahawk/services
Modified Files:
MobyComplexBuilder.java
Log Message:
Better non-default registry support, regex sub pattern fix
moby-live/Java/src/main/ca/ucalgary/seahawk/services MobyComplexBuilder.java,1.12,1.13
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/services/MobyComplexBuilder.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/services/MobyComplexBuilder.java 2007/08/01 18:15:46 1.12
+++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/services/MobyComplexBuilder.java 2007/12/06 23:46:34 1.13
@@ -172,7 +172,7 @@
if(mobyDataType.getName().equals("Object")){
mobyObj = new MobyDataObject("", SeahawkOptions.getRegistry());
}
- else if(mobyDataType.inheritsFrom(MobyDataBytes.BASE64_DATATYPE)){
+ else if(mobyDataType.inheritsFrom(MobyDataType.getDataType(MobyDataBytes.BASE64_DATATYPE, SeahawkOptions.getRegistry()))){
mobyObj = new MobyDataBytes("", (String) null);
mobyObj.setDataType(mobyDataType);
}
@@ -286,9 +286,9 @@
for(String result: results){
if(PrimitiveTypes.isPrimitive(dataTypeName) ||
- MobyDataType.getDataType(dataTypeName, SeahawkOptions.getRegistry()).inheritsFrom(MobyDataBytes.BASE64_DATATYPE)){
+ MobyDataType.getDataType(dataTypeName, SeahawkOptions.getRegistry()).inheritsFrom(MobyDataType.getDataType(MobyDataBytes.BASE64_DATATYPE, SeahawkOptions.getRegistry()))){
((MobyDataComposite) mobyObj).put(memberName,
- MobyDataObject.createInstanceFromString(dataTypeName, result));
+ MobyDataObject.createInstanceFromString(dataTypeName, result, SeahawkOptions.getRegistry()));
}
else{
// Recursively call the object creator for complex members
@@ -448,7 +448,7 @@
}
}
// $# substitution in a string, considerably simpler!
- else if(result.matches("\\A.*?\\$"+j+"(?:\\D.*)?\\z")){
+ else if(result.indexOf("$"+j) != -1){
String varValue = match.group(j);
if(whitespaceMode == null){
// do nothing
@@ -541,7 +541,7 @@
String value = xpath.evaluate(expr, result);
((MobyDataComposite) mobyObj).put(memberName,
- MobyDataObject.createInstanceFromString(children[i].getDataTypeName(), value));
+ MobyDataObject.createInstanceFromString(children[i].getDataTypeName(), value, SeahawkOptions.getRegistry()));
}
}
}
More information about the MOBY-guts
mailing list