[MOBY-guts] biomoby commit

Eddie Kawas kawas at pub.open-bio.org
Mon Aug 29 22:56:36 UTC 2005


kawas
Mon Aug 29 18:56:36 EDT 2005
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool
In directory pub.open-bio.org:/tmp/cvs-serv16138/org/biomoby/client/ui/graphical/applets/objectCreationTool

Modified Files:
	MobyUtilities.java 
Log Message:
made some changes in the way that information is retrieved.
Ed

moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool MobyUtilities.java,1.2,1.3
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/MobyUtilities.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/MobyUtilities.java	2005/06/02 15:48:01	1.2
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/objectCreationTool/MobyUtilities.java	2005/08/29 22:56:36	1.3
@@ -1,18 +1,15 @@
 package org.biomoby.client.ui.graphical.applets.objectCreationTool;
 
 import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.io.InputStreamReader;
+import java.net.URL;
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.StringTokenizer;
 
 import javax.swing.tree.TreePath;
 
-import org.biomoby.registry.definitions.types.JObjects;
-import org.biomoby.shared.MobyException;
-
 /**
  * Utilities that are useful for retrieving information about certain objects, parsing objects, etc.
  * @author Eddie Kawas
@@ -21,7 +18,9 @@
  */
 public class MobyUtilities {
 
-	/**
+	private static final String TYPES_LOCATION = "http://mobycentral.icapture.ubc.ca:8090/types/Objects?lsid=";
+
+    /**
 	 * PRE: None.<p>
 	 * POST: a linked list of all the relations is returned, such that:<p>
 	 * => The first item in the list is a string representation of the parent<p>
@@ -32,12 +31,7 @@
 	 */
 	public static LinkedList GetRelations(String name) throws IOException {
         BufferedReader in = null;
-        try {
-            in = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(new JObjects().getObjects(name).getBytes())));
-        } catch (MobyException e) {
-            e.printStackTrace();
-            throw new IOException("Couldnt create a stream for JObjects");
-        }
+        in = new BufferedReader(new InputStreamReader(new URL(TYPES_LOCATION+name).openStream()));
         String input;
         String parent = "";
         LinkedList llHas = new LinkedList();




More information about the MOBY-guts mailing list