[MOBY-guts] biomoby commit

Paul Gordon gordonp at dev.open-bio.org
Fri Nov 24 20:57:25 UTC 2006


gordonp
Fri Nov 24 15:57:25 EST 2006
Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui
In directory dev.open-bio.org:/tmp/cvs-serv29008/src/main/ca/ucalgary/seahawk/gui

Modified Files:
	MobyContentPane.java 
Log Message:
Made namespace object retrieval simpler, and changed auth:service format for temp files to avoid invalid file names on Windows (':' isn't allowed in Windows file name apparently)
moby-live/Java/src/main/ca/ucalgary/seahawk/gui MobyContentPane.java,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/MobyContentPane.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/gui/MobyContentPane.java	2006/10/25 02:33:22	1.1
+++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/MobyContentPane.java	2006/11/24 20:57:25	1.2
@@ -452,13 +452,17 @@
     }
 
     private String serviceToFilePrefix(MobyService service){
-	return service.getAuthority()+":"+service.getName()+":";
+	return service.getAuthority()+"_SEAHAWk_"+service.getName()+"_SEAHAWk_";
     }
 
     private MobyService filePrefixToService(String filename) throws Exception{
-	StringTokenizer st = new StringTokenizer(filename, ":");
-	String auth = st.nextToken();
-	String name = st.nextToken();
+	String tokens[] = filename.split("_SEAHAWk_");
+	if(tokens == null || tokens.length < 2){
+	    return null;
+	}
+
+	String auth = tokens[0];
+	String name = tokens[1];
 
 	if(name == null){
 	    return null;
@@ -734,14 +738,7 @@
 	else{
 	    mobyData = new MobyDataObject("");
 	}
-	MobyNamespace ns = new MobyNamespace(namespace);
-	try{
-	    ns.setDescription((String) servicesGUI.getMobyCentralImpl().getNamespaces().get(namespace));
-	}
-	catch(MobyException mobye){
-	    logger.debug("Warning: can't retrieve namespace descriptions: " + mobye);
-	}
-	mobyData.addNamespace(ns);
+	mobyData.addNamespace(MobyNamespace.getNamespace(namespace));
 	
 	if(mobyID != null){
 	    mobyData.setId(mobyID);




More information about the MOBY-guts mailing list