[MOBY-guts] biomoby commit

senger@ebi.ac.uk senger at pub.open-bio.org
Mon Nov 24 18:45:25 UTC 2003


senger
Mon Nov 24 13:45:25 EST 2003
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared
In directory pub.open-bio.org:/tmp/cvs-serv16028/src/main/org/biomoby/shared

Modified Files:
	Central.java 
Log Message:
added relationships methods to Central.java

moby-live/Java/src/main/org/biomoby/shared Central.java,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Central.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/shared/Central.java	2003/09/24 14:33:37	1.1
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Central.java	2003/11/24 18:45:25	1.2
@@ -14,7 +14,6 @@
 /**
  * An interface to the Moby Registry.
  *<p>
- *
  * The Moby Registry service (or Moby Central service) is used to do
  * various transactions, including registering new Data and Service
  * types, querying for these types, registering new Services, or
@@ -34,12 +33,29 @@
  * http://biomoby.org</a>.
  *<p>
  *
+ *  <H5>Last changes (in backwards order)</H5>
+ *  <UL>
+ *    <LI> New methods retrieving various types of relationships has been added:
+ *         {@link #getDataTypeRelationships},
+ *         {@link #getServiceTypeRelationships}
+ *    <LI> Added constants defining recognizable relationship types
+ *         ({@link #ISA}, {@link #HASA}, {@link #HAS})
+ *  </UL>
+ * <p>
  * @author <A HREF="mailto:senger at ebi.ac.uk">Martin Senger</A>
  * @version $Id$
  */
 
 public interface Central {
 
+    /** A name for the relationship type "is a". */
+    static final String ISA = "ISA";
+
+    /** A name for the relationship type "has a". */
+    static final String HASA = "HASA";
+
+    /** A name for the relationship type "has". */
+    static final String HAS = "HAS";
 
     /**************************************************************************
      * Get a (redundant) list of all registered service names.
@@ -71,6 +87,18 @@
 	throws MobyException;
 
     /**************************************************************************
+     * Get all ISA relationships of the given 'serviceTypeName'.
+     *<p>
+     * @param serviceTypeName is an ontology term specifying whose
+     * relationships should be looked at
+     * @return an array of ontology terms defining all parents (direct
+     * or indirect) of the given 'serviceTypeName'
+     * @throws MobyException if communication with the Moby Registry fails
+     *************************************************************************/
+    String[] getServiceTypeRelationships (String serviceTypeName)
+	throws MobyException;
+
+    /**************************************************************************
      * Get the list of all registered namespaces.
      *<p>
      * @return a hash table where keys are names of namespaces while
@@ -99,6 +127,34 @@
     MobyDataType getDataType (String dataTypeName)
  	throws MobyException, NoSuccessException;
 
+    /**************************************************************************
+     * Get all relationships of the given 'dataTypeName'.
+     *<p>
+     * @param dataTypeName is an ontology term specifying whose
+     * relationships should be looked at
+     * @return a Map of ontology terms defining all relationships of
+     * the given 'dataTypeName'. The keys (of type String) are from
+     * the set {@link #ISA}, {@link #HASA}, and {@link #HAS}. The
+     * values (of type String) are data type names.
+     * @throws MobyException if communication with the Moby Registry fails
+     *************************************************************************/
+    Map getDataTypeRelationships (String dataTypeName)
+	throws MobyException;
+
+    /**************************************************************************
+     * Get all relationships of type 'relationshipType' for the given
+     *'dataTypeName'.  <p>
+     * @param dataTypeName is an ontology term specifying whose
+     * relationships should be looked at
+     * @param relationshipType is one from the set {@link #ISA},
+     * {@link #HASA}, and {@link #HAS}.
+     * @return an array of names specifying all related types (of the
+     * given type and for the given data type)
+     * @throws MobyException if communication with the Moby Registry fails
+     *************************************************************************/
+    String[] getDataTypeRelationships (String dataTypeName, String relationshipType)
+	throws MobyException;
+
     /*************************************************************************
      * Get XML Schema definition of the given data type.
      *<p>




More information about the MOBY-guts mailing list