[MOBY-guts] biomoby commit

senger@ebi.ac.uk senger at pub.open-bio.org
Thu Apr 1 16:41:03 UTC 2004


senger
Thu Apr  1 11:41:03 EST 2004
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client
In directory pub.open-bio.org:/tmp/cvs-serv6373/src/main/org/biomoby/client

Modified Files:
	CentralImpl.java ServiceConnections.java 
Log Message:


moby-live/Java/src/main/org/biomoby/client CentralImpl.java,1.7,1.8 ServiceConnections.java,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java	2004/03/09 00:20:13	1.7
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java	2004/04/01 16:41:03	1.8
@@ -587,8 +587,12 @@
 	    NodeList children = elem.getChildNodes();
 	    for (int j = 0; j < children.getLength(); j++) {
 		if (children.item (j).getNodeName().equals ("Description")) {
-		    results.put (elem.getAttribute ("name"),
-				 children.item (j).getFirstChild().getNodeValue());
+		    String desc;
+		    if (children.item (j).getFirstChild() == null)
+			desc = "";
+		    else
+			desc = children.item (j).getFirstChild().getNodeValue();
+		    results.put (elem.getAttribute ("name"), desc);
 		    break;
 		}
 	    }

===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ServiceConnections.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ServiceConnections.java	2003/10/17 13:13:34	1.1
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ServiceConnections.java	2004/04/01 16:41:03	1.2
@@ -69,7 +69,7 @@
 	Hashtable dataTypesTable = new Hashtable();
 	for (int i = 0; i < dataTypes.length; i++) {
 	    MobyDataType dataType = dataTypes[i];
-	    dataTypesTable.put (dataType.getName().toLowerCase(), dataType);
+	    dataTypesTable.put (Utils.pureName (dataType.getName()).toLowerCase(), dataType);
 	}
 
 	// here we are going to build the resulting edges
@@ -117,12 +117,13 @@
 		// ...find the data type of this output		
 		String dataTypeName = output.getDataType().getName();
 		MobyDataType dataType =
-		    (MobyDataType)dataTypesTable.get (dataTypeName.toLowerCase());
+		    (MobyDataType)dataTypesTable.get (Utils.pureName (dataTypeName).toLowerCase());
 		if (dataType == null) {
 		    // this means that there is something wrong with the Moby central registration
 		    System.err.println ("Service " + name +
 					" has an unknown output data type '" +
 					Utils.pureName (dataTypeName) + "'");
+		    System.err.println ("\tLSID: " + dataTypeName);
 		    continue;
 		}
 
@@ -239,10 +240,11 @@
 
 	String connector = null;
 	MobyDataType outputType =
-	    (MobyDataType)dataTypes.get (output.getDataType().getName().toLowerCase());
-
-	String outputName = outputType.getName();
-	String inputName = input.getDataType().getName();
+	    (MobyDataType)dataTypes.get (Utils.pureName (output.getDataType().getName()).toLowerCase());
+	if (outputType == null) // strange...
+	    return null;
+	String outputName = Utils.pureName (outputType.getName());
+	String inputName = Utils.pureName (input.getDataType().getName());
 
 	if (outputName.equals (inputName))
 	    connector = outputName;
@@ -275,7 +277,9 @@
 	    if (inputName.equals (parents[i]))
 		return true;
 	    MobyDataType outputType =
-		(MobyDataType)dataTypes.get (parents[i].toLowerCase());
+		(MobyDataType)dataTypes.get (Utils.pureName (parents[i]).toLowerCase());
+	    if (outputType == null)   // strange?
+		return false;
 	    if (findMatchInParents (outputType.getParentNames(), inputName, dataTypes))
 		return true;
 	}




More information about the MOBY-guts mailing list