[MOBY-guts] biomoby commit

Paul Gordon gordonp at dev.open-bio.org
Thu Apr 12 00:59:42 UTC 2007


gordonp
Wed Apr 11 20:59:42 EDT 2007
Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/services
In directory dev.open-bio.org:/tmp/cvs-serv30676/src/main/ca/ucalgary/seahawk/services

Modified Files:
	TextClient.java 
Log Message:
Translated spaces to hyphens in target types because XSLT doesn't allow spaces in mode names
moby-live/Java/src/main/ca/ucalgary/seahawk/services TextClient.java,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/services/TextClient.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/services/TextClient.java	2007/03/12 14:30:56	1.1
+++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/services/TextClient.java	2007/04/12 00:59:42	1.2
@@ -116,6 +116,8 @@
 	if(textType == null){
 	    return false;
 	}
+	// Spaces are not allowed in mode names
+	textType = textType.replace(' ', '-');
 
 	// Search for templates matching the given type or one of its parent types,
 	// and see if they create the given text type (indicated by the template's mode attribute)
@@ -156,6 +158,8 @@
 	if(targetTextType == null || mobyData == null || !(mobyData instanceof MobyPrimaryData)){
 	    return null;
 	}
+	// Spaces are not allowed in mode names
+	targetTextType = targetTextType.replace(' ', '-');
 
 	Vector<MobyDataType> candidateTypes = new Vector<MobyDataType>();
 	for(MobyDataType type = ((MobyPrimaryData) mobyData).getDataType();




More information about the MOBY-guts mailing list