[MOBY-guts] biomoby commit

Paul Gordon gordonp at dev.open-bio.org
Sat Jul 28 03:40:19 UTC 2007


gordonp
Fri Jul 27 23:40:18 EDT 2007
Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui
In directory dev.open-bio.org:/tmp/cvs-serv26784/src/main/ca/ucalgary/seahawk/gui

Modified Files:
	MobyContentPane.java 
Log Message:
Added article name to popup data display, other minor edits
moby-live/Java/src/main/ca/ucalgary/seahawk/gui MobyContentPane.java,1.12,1.13
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/MobyContentPane.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/gui/MobyContentPane.java	2007/06/18 20:01:12	1.12
+++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/MobyContentPane.java	2007/07/28 03:40:18	1.13
@@ -218,7 +218,7 @@
 
 	    boolean unformatted = false;
 	    // It's XML that needs to be transformed to HTML
-	    if(urlString.lastIndexOf(".xml") == urlString.length()-4 ||
+	    if(urlString.endsWith(".xml") ||
 	       "text/xml".equals(urlCon.getContentType())){
 		editorPane.setContentType("text/html");
 		isContentsXML = true;
@@ -792,7 +792,8 @@
 	String query = targetURL.getQuery();
 	String mobyID = null;
 	String mobyString = null;
-	
+	String mobyName = "";
+
 	MobyDataObject mobyData = null;
 
 	// extract the ID or string value
@@ -809,7 +810,7 @@
 			    mobyID = "";
 			}
 		    }
-		    else if(mobyString == null && token.startsWith("string=") && token.length() > 7){
+		    else if(mobyString == null && token.startsWith("string=") && token.length() >= 7){
 			if(token.length() > 7){
 			    mobyString = token.substring(7);
 			}
@@ -817,6 +818,14 @@
 			    mobyString = "";
 			}
 		    }
+		    else if(mobyName.length() == 0 && token.startsWith("name=") && token.length() >= 5){
+			if(token.length() > 5){
+			    mobyName = token.substring(5);
+			}
+			else{
+			    mobyName = "";
+			}
+		    }
 		    else{
 			logger.warn("Warning: unrecognized or duplicate query part '" + 
 				    token + "' in moby link " + targetURL);
@@ -826,10 +835,10 @@
 	}
 	
 	if(mobyString != null){
-	    mobyData = new MobyDataString("", mobyString, SeahawkOptions.getRegistry());
+	    mobyData = new MobyDataString(mobyName, mobyString, SeahawkOptions.getRegistry());
 	}
 	else{
-	    mobyData = new MobyDataObject("", SeahawkOptions.getRegistry());
+	    mobyData = new MobyDataObject(mobyName, SeahawkOptions.getRegistry());
 	}
 	mobyData.addNamespace(MobyNamespace.getNamespace(namespace, SeahawkOptions.getRegistry()));
 	
@@ -1094,6 +1103,6 @@
     public void keyTyped(KeyEvent e){}
 
     public void paste(){
-	getTransferHandler().importData(editorPane, java.awt.Toolkit.getDefaultToolkit().getSystemClipboard().getContents(this));
+	getTransferHandler().importData(this, java.awt.Toolkit.getDefaultToolkit().getSystemClipboard().getContents(this));
     }
 }




More information about the MOBY-guts mailing list