[MOBY-guts] biomoby commit

Eddie Kawas kawas at pub.open-bio.org
Wed Feb 23 15:39:07 UTC 2005


kawas
Wed Feb 23 10:39:06 EST 2005
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/gui/serviceInstanceCreationTool
In directory pub.open-bio.org:/tmp/cvs-serv27890/org/biomoby/client/gui/serviceInstanceCreationTool

Modified Files:
	MobyUtilities.java 
Log Message:
Fixed imports and removed getRelations() - see getPrimitives(...)
in MobyObjectPrimitiveExtractor instead.
Eddie

moby-live/Java/src/main/org/biomoby/client/gui/serviceInstanceCreationTool MobyUtilities.java,1.3,1.4
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/gui/serviceInstanceCreationTool/MobyUtilities.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/gui/serviceInstanceCreationTool/MobyUtilities.java	2005/02/09 18:26:41	1.3
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/gui/serviceInstanceCreationTool/MobyUtilities.java	2005/02/23 15:39:06	1.4
@@ -1,21 +1,11 @@
 package org.biomoby.client.gui.serviceInstanceCreationTool;
 
-import java.io.BufferedReader;
 import java.io.IOException;
-import java.io.InputStreamReader;
-import java.net.URL;
-import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.LinkedList;
-import java.util.StringTokenizer;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
 
 import javax.swing.tree.TreePath;
 
-import org.biomoby.client.gui.util.MobyObjectPrimitiveExtractor;
-import org.biomoby.client.gui.util.Triples;
-
 /**
  * Utilities that are useful for retrieving information about certain objects, parsing objects, etc.
  * @author Eddie Kawas
@@ -27,45 +17,11 @@
 public class MobyUtilities {
 
     /**
-     * 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>
-     * => The second item is a linked list of all the 'HAS' container relationships<p>
-     * => The third item is a linked list of all the 'HASA' container relationships
-     * @param name, the name of the object to query for - can be an Moby Object LSID.
-     * @return returns a linked list {String, LinkedList, LinkedList} of relationships
+     * @deprecated please see MobyObjectPrimitiveExtractor.java
      */
     public static LinkedList GetRelations(String name) throws IOException {
-        URL url = null;
-        boolean isLSID = false;
-        Pattern p = Pattern.compile("(^urn:lsid:biomoby.org:objectclass:\\S+$)",
-                Pattern.CASE_INSENSITIVE);
-        Matcher m = p.matcher(name);
-        isLSID = m.matches();
-        if (isLSID) {
-            int x = name.lastIndexOf(":")+1;
-            name = name.substring(x);
-        }
-
-        LinkedList llHas = new LinkedList();
-        LinkedList llHasa = new LinkedList();
-        MobyObjectPrimitiveExtractor mope = new MobyObjectPrimitiveExtractor();
-        ArrayList al = mope.getPrimitives(name);
-        for (Iterator x = al.iterator(); x.hasNext();) {
-            Triples t = (Triples)x.next();
-            if (t.getType() == Triples.HAS) {
-                llHas.add(t.getPrimitive());
-            }
-            if (t.getType() == Triples.HASA) {
-                llHasa.add(t.getPrimitive());
-            }
-        }
-        // set up the return list
-        LinkedList listToReturn = new LinkedList();
-        listToReturn.addFirst("Object");
-        listToReturn.add(llHas);
-        listToReturn.add(llHasa);
-        return listToReturn;
+        
+        return new LinkedList();
     }
 
     /**




More information about the MOBY-guts mailing list