[MOBY-guts] biomoby commit

senger at ebi.ac.uk senger at pub.open-bio.org
Fri Oct 17 10:13:35 EDT 2003


senger
Fri Oct 17 09:13:34 EDT 2003
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client
In directory pub.open-bio.org:/tmp/cvs-serv29602/src/main/org/biomoby/client

Modified Files:
	CentralImpl.java 
Added Files:
	Graphviz.java ServiceConnections.java ServicesEdge.java 
Log Message:
first draft of graphs

moby-live/Java/src/main/org/biomoby/client Graphviz.java,NONE,1.1 ServiceConnections.java,NONE,1.1 ServicesEdge.java,NONE,1.1 CentralImpl.java,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.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/CentralImpl.java	2003/09/24 14:33:37	1.1
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java	2003/10/17 13:13:34	1.2
@@ -799,7 +799,7 @@
 	    buf.append ("\n");
 	}
 
-	// build the HASA tag (expressing hierarchy of data types)
+	// build the HASA tag (expressing containment of data types)
 	Hashtable children = dataType.getChildren();
 	StringBuffer buf2 = new StringBuffer();
 	for (Enumeration en = children.keys(); en.hasMoreElements(); ) {
@@ -818,8 +818,10 @@
 				  "<objectType>" + dataType.getName() + "</objectType>" +
 				  "<Description><![CDATA[" + dataType.getDescription() + "]]>" +
 				  "</Description>" +
-				  "<ISA>" + new String (buf) + "</ISA>" +
-				  "<HASA>" + new String (buf2) + "</HASA>" +
+				  "<Relationship relationshipType=\"ISA\">" + new String (buf) +
+                                  "</Relationship>" +
+				  "<Relationship relationshipType=\"HASA\">" + new String (buf2) +
+                                  "</Relationship>" +
 				  "<authURI>" + dataType.getAuthority() + "</authURI>" +
 				  "<contactEmail>" + dataType.getEmailContact() + "</contactEmail>" +
 				"</registerObjectClass>"
@@ -884,7 +886,8 @@
 				  "<authURI>" + serviceType.getAuthority() + "</authURI>" +
 				  "<Description><![CDATA[" + serviceType.getDescription() + "]]>" +
 				  "</Description>" +
-				  "<ISA>" + new String (buf) + "</ISA>" +
+				  "<Relationship relationshipType=\"ISA\">" + new String (buf) +
+                                  "</Relationship>" +
 				"</registerServiceType>"
 			    });
 	serviceType.setId (checkRegistration (result, serviceType));
@@ -1050,10 +1053,21 @@
      *************************************************************************/
     public String call (String methodName, String inputXML)
 	throws MobyException {
+	Object result;
 	if (inputXML == null || inputXML.equals (""))
-	    return (String)doCall (methodName, new Object[] { });
+	    result = doCall (methodName, new Object[] { });
 	else 
-	    return (String)doCall (methodName, new Object[] { inputXML });
+	    result = doCall (methodName, new Object[] { inputXML });
+	if (result instanceof String)
+	    return (String)result;
+	if (result instanceof String[]) {
+	    String[] tmp = (String[])result;
+	    StringBuffer buf = new StringBuffer();
+	    for (int i = 0; i < tmp.length; i++)
+		buf.append (tmp[i]);
+	    return new String (buf);
+	}
+	throw new MobyException ("Unknown type of result: " + result.getClass().getName());
     }
 
     /**************************************************************************



More information about the MOBY-guts mailing list