[MOBY-guts] biomoby commit

Martin Senger senger at pub.open-bio.org
Sun Aug 7 06:29:58 UTC 2005


senger
Sun Aug  7 02:29:58 EDT 2005
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared
In directory pub.open-bio.org:/tmp/cvs-serv17199

Modified Files:
	Central.java 
Added Files:
	MobyResourceRef.java 
Log Message:


moby-live/Java/src/main/org/biomoby/shared MobyResourceRef.java,NONE,1.1 Central.java,1.10,1.11
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Central.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Central.java	2005/07/19 12:39:59	1.10
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/Central.java	2005/08/07 06:29:58	1.11
@@ -8,6 +8,7 @@
 package org.biomoby.shared;
 
 import java.util.Map;
+import java.io.InputStream;
 
 /**
  * An interface to the Moby Registry. <p>
@@ -66,6 +67,37 @@
      * Object_A in one or more copies. */
     static final int iHAS = 3;
 
+    /** A name of an ontology describing registered service types.
+	The name is used in a hash table returned by the {@link
+	#getResourceURLs}.
+     */
+    static final String SERVICE_TYPES_RESOURCE_NAME = "Service";
+
+    /** A name of an ontology describing registered service types.
+	The name is used in a hash table returned by the {@link
+	#getResourceURLs}.
+     */
+    static final String SERVICE_INSTANCES_RESOURCE_NAME = "ServiceInstance";
+
+    /** A name of an ontology describing registered data types. The
+	name is used in a hash table returned by the {@link
+	#getResourceURLs}.
+     */
+    static final String DATA_TYPES_RESOURCE_NAME = "Object";
+
+    /** A name of an ontology describing registered service types.
+	The name is used in a hash table returned by the {@link
+	#getResourceURLs}.
+     */
+    static final String NAMESPACES_RESOURCE_NAME = "Namespace";
+
+    /** A name of an ontology describing all registered entities.  The
+	name is used in a hash table returned by the {@link
+	#getResourceURLs}. The contents returned by this method for
+	this ontology name is a concatanation of all other ontologies.
+     */
+    static final String FULL_RESOURCE_NAME = "Full";
+
     /**************************************************************************
      * Get a (redundant) list of all registered service names. <p>
      *
@@ -393,4 +425,50 @@
      *************************************************************************/
     String getRegistryNamespace();
 
+    /**************************************************************************
+     * Get URLs (and content types) of RDF documents describing
+     * various BioMoby ontologies. These RDF documents are yet another
+     * form how to get information about registered entities in the
+     * BioMoby registry. <p>
+     * 
+     * There are five possible ontology names:
+     * {@link #SERVICE_TYPES_RESOURCE_NAME},
+     * {@link #DATA_TYPES_RESOURCE_NAME},
+     * {@link #NAMESPACES_RESOURCE_NAME},
+     * {@link #SERVICE_INSTANCES_RESOURCE_NAME},
+     * {@link #FULL_RESOURCE_NAME}. <p>
+     *
+     * @return an array of references to RDF documents; some elements
+     * of this array may refer to the same resources but
+     * stored/available in a different content type (this mostly means
+     * that some of them may be compressed to get them faster)
+     *
+     * @throws MobyException if communication with the Moby Registry fails
+      *************************************************************************/
+    MobyResourceRef[] getResourceRefs()
+	throws MobyException;
+
+    /**************************************************************************
+     * First get (from a BioMoby registry) a URL for the given
+     * 'resourceName' and then retrieve a document from this URL. If
+     * the resource is available in a compressed format, return it
+     * uncompressed. <p>
+     *
+     * The document is in RDF and represents some (or all) entities
+     * registered in the BioMoby registry. <p>
+     *
+     * @param resourceName is an ontology name (must be one of these:
+     * {@link #SERVICE_TYPES_RESOURCE_NAME}, {@link
+     * #DATA_TYPES_RESOURCE_NAME}, {@link #NAMESPACES_RESOURCE_NAME},
+     * {@link #SERVICE_INSTANCES_RESOURCE_NAME}, {@link
+     * #FULL_RESOURCE_NAME})
+     *
+     * @return an input stream that contains an RDF document
+     * @throws MobyException if communication with the Moby Registry
+     * fails, or if communication with the resource URL fails
+     *************************************************************************/
+    InputStream getResource (String resourceName)
+	throws MobyException;
+
+
 }




More information about the MOBY-guts mailing list