[MOBY-guts] biomoby commit

Eddie Kawas kawas at pub.open-bio.org
Sat Dec 18 18:52:31 UTC 2004


kawas
Sat Dec 18 13:52:30 EST 2004
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/gui/serviceInstanceCreationTool
In directory pub.open-bio.org:/tmp/cvs-serv30302/org/biomoby/client/gui/serviceInstanceCreationTool

Modified Files:
	MobyInputOutputData.java 
Log Message:
added the code to display an objects details when requested.

moby-live/Java/src/main/org/biomoby/client/gui/serviceInstanceCreationTool MobyInputOutputData.java,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/gui/serviceInstanceCreationTool/MobyInputOutputData.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/gui/serviceInstanceCreationTool/MobyInputOutputData.java	2004/09/27 21:29:15	1.1
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/gui/serviceInstanceCreationTool/MobyInputOutputData.java	2004/12/18 18:52:30	1.2
@@ -7,6 +7,7 @@
 import java.util.Enumeration;
 
 import org.biomoby.client.CentralImpl;
+import org.biomoby.client.gui.util.ObjectXMLWriter;
 import org.biomoby.shared.Central;
 import org.biomoby.shared.MobyDataType;
 import org.biomoby.shared.MobyException;
@@ -36,6 +37,7 @@
 		"http://mobycentral.cbr.nrc.ca:8080/cgi-bin/MOBY05/mobycentral.pl";
 	static final String NAMESPACE =
 		"http://mobycentral.cbr.nrc.ca:8080/MOBY/Central";
+    private static String _URL = "http://mobycentral.cbr.nrc.ca/cgi-bin/applets/retrieveObjectXML.cgi?name=";
 
 	/**
 	 * 
@@ -187,14 +189,15 @@
 	}
 
 	/**
-	 * <B>NOT YET IMPLEMENTED </B><p>
-	 * @param datatype
-	 * @return should return the MobyData type in xml format. 
-	 * <p>TODO implement this!
-	 */
-	public static String ObjectInXML(String datatype) { // TODO - create an xml view of the data type
-		String str =
-			"looking for a way to get the xml from a cgi script?\n is there one already?";
-		return str;
+	 * @param datatype - the name of the datatype to retrieve informationon.
+	 * @return if we are able to retrieve information on the datatype, then we return the MobyData type in xml format. 
+	 */
+	public static String ObjectInXML(String datatype) {
+	    String content = null;
+        content = ObjectXMLWriter.generatePrettyXML(_URL+datatype);
+	    if (content.equals("")) {
+	        content = "Couldn't retrieve object details in xml format.";
+	    }
+	    return content;
 	}
 }




More information about the MOBY-guts mailing list