[MOBY-guts] biomoby commit

Dennis Wang dwang at pub.open-bio.org
Tue Aug 30 23:01:27 UTC 2005


dwang
Tue Aug 30 19:01:27 EDT 2005
Update of /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby
In directory pub.open-bio.org:/tmp/cvs-serv28848/Perl/MOBY/Adaptor/moby

Modified Files:
	queryapi.pm 
Log Message:
adjusted formating in queryapi documentation

moby-live/Perl/MOBY/Adaptor/moby queryapi.pm,1.28,1.29
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm	2005/08/26 21:33:24	1.28
+++ /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm	2005/08/30 23:01:27	1.29
@@ -442,7 +442,7 @@
  Usage     :	my $un = $API->delete_simple_input(%args)
  Function  :	Deletes Simple inputs according to the service instance, or collection input
  Args      :    service_instance_lsid => String,
- 				collection_input_id => Integer
+ 	        collection_input_id   => Integer
  Returns   :    ($err, $errstr)
  		$err = 1 if there was an delete error, 0 if successful
  		$errstr = String error message if there was an error	
@@ -461,7 +461,7 @@
  Usage     :	my $un = $API->query_simple_output(%args)
  Function  :	Executes a query for Simple outputs according to the service instance or collection output
  Args      :    service_instance_lsid => String,
- 				collection_output_id  => Integer
+ 		collection_output_id  => Integer
  Returns   :    listref of hashrefs:
  		[{simple_output_id 	 => Integer,
       		object_type_uri		 => String,
@@ -499,7 +499,7 @@
  Usage     :	my $un = $API->delete_simple_output(%args)
  Function  :	Deletes Simple outputs according to the service instance, or collection output
  Args      :    service_instance_lsid => String,
- 				collection_output_id => Integer
+ 		collection_output_id  => Integer
  Returns   :    ($err, $errstr)
  		$err = 1 if there was an delete error, 0 if successful
  		$errstr = String error message if there was an error	
@@ -558,8 +558,8 @@
  Function  :	Deletes a Secondary input from the database
  Args      :    service_instance_lsid => String 
  Returns   :    ($err, $errstr)
- 				$err = 1 if there was an delete error, 0 if successful
- 				$errstr = String error message if there was an error	
+ 		$err = 1 if there was an delete error, 0 if successful
+ 		$errstr = String error message if there was an error	
  
 =cut
 sub delete_secondary_input{
@@ -576,12 +576,12 @@
  Function  :	Executes a query for objects in the database
  Args      :    type => String - lsid or a term identifying a particular object
  Returns   :    listref of hashrefs:
- 				[{object_id	  => Integer,
-          		object_lsid	  => String,
-          		object_type	  => String,
-          		description	  => String,
-          		authority	  => String,
-         	 	contact_email => String}, ...]
+ 		[{object_id	  => Integer,
+          	object_lsid	  => String,
+          	object_type	  => String,
+          	description	  => String,
+          	authority	  => String,
+         	contact_email     => String}, ...]
  Notes     : 	Only allows querying by lsid or type term
 =cut
 sub query_object{
@@ -594,10 +594,10 @@
  Usage     :	my $un = $API->insert_object(%args)
  Function  :	Inserts an object into the database
  Args      :    object_type   => String, 
-				object_lsid	  => String, 
-				description	  => String, 
-				authority	  => String,
-				contact_email => String
+		object_lsid   => String, 
+		description   => String, 
+		authority     => String,
+		contact_email => String
  Returns   :    Integer insertid
  Notes     : 	the fact that it returns an insertid is bad since this
              	is only useful to an SQL-based API...
@@ -613,8 +613,8 @@
  Function  :	Deletes an object and any relationships it has from the database
  Args      :    type => String - lsid or term identifying a particular object
  Returns   :    ($err, $errstr)
- 				$err = 1 if there was an delete error, 0 if successful
- 				$errstr = String error message if there was an error	
+ 		$err = 1 if there was an delete error, 0 if successful
+ 		$errstr = String error message if there was an error	
  
 =cut
 sub delete_object{
@@ -631,11 +631,11 @@
  Function  :	Executes a query for object relationships in the database
  Args      :    type => String - lsid or a term identifying a particular object
  Returns   :    listref of hashrefs:
- 				[{assertion_id	  	=> Integer,
-          		relationship_type 	=> String,
-          		object1_id		  	=> String,
-          		object2_id		  	=> String,
-          		object2_articlename => String}, ...]
+ 		[{assertion_id	    => Integer,
+          	relationship_type   => String,
+          	object1_id	    => String,
+		  object2_id	    => String,
+          	object2_articlename => String}, ...]
  Notes     : 	Only allows querying by lsid or type term
 =cut
 sub query_object_term2term{
@@ -648,9 +648,9 @@
  Usage     :	my $un = $API->insert_object_term2term(%args)
  Function  :	Inserts an object relationship into the database
  Args      :    relationship_type 	=> String, 
-				object1_id 		  	=> String,
-				object2_id 		  	=> String,
-				object2_articlename => String
+		object1_id 		=> String,
+		object2_id 		=> String,
+		object2_articlename     => String
  Returns   :    Integer insertid
  Notes     : 	the fact that it returns an insertid is bad since this
              	is only useful to an SQL-based API...
@@ -673,29 +673,29 @@
  Usage     :	my $un = $API->query_service_instance(%args)
  Function  :	Executes a query for service instances in the database
  Args      :  	0 or more:
- 				service_instance_id 	 		 => Integer 
-				category				  		 => String 
-				servicename			   	  		 => String 
-				service_type_uri		 		 => String 
-				'authority.authority_uri' 		 => String - IMPORTANT notice use of quotes to avoid conflict with perl special operator '.' 
-				url						   		 => String 
-				'service_instance.contact_email' => String - Again IMPORTANT use of quotes
-				authoritative					 => Integer 
-				description						 => String 
-				signatureURL					 => String
-				lsid							 => String 
- Returns   :    listref of hashrefs:
- 				[{service_instance_id 		   => Integer, 
-				category					   => String, 
-				servicename					   => String, 
-				service_type_uri			   => String, 
-				authority.authority_uri		   => String, 
-				url							   => String, 
-				service_instance.contact_email => String, 
-				authoritative				   => Integer, 
-				description					   => String, 
-				signatureURL				   => String,
-				lsid 						   => String}, ...]
+	        service_instance_id 	 	 => Integer 
+		category			 => String 
+		servicename			 => String 
+		service_type_uri		 => String 
+		'authority.authority_uri' 	 => String - IMPORTANT notice use of quotes to avoid conflict with perl special operator '.' 
+		url				 => String 
+		'service_instance.contact_email' => String - Again IMPORTANT use of quotes
+		authoritative			 => Integer 
+		description			 => String 
+		signatureURL			 => String
+		lsid				 => String 
+ Returns   :    listref of hashrefs:
+ 		[{service_instance_id 	       => Integer, 
+		category		       => String, 
+		servicename		       => String, 
+		service_type_uri	       => String, 
+		authority.authority_uri	       => String, 
+		url			       => String, 
+		service_instance.contact_email => String, 
+		authoritative		       => Integer, 
+		description		       => String, 
+		signatureURL		       => String,
+		lsid 			       => String}, ...]
  Notes     : 	Allows querying by multiple conditions joined by 'and'
 =cut
 sub query_service_instance {
@@ -707,10 +707,10 @@
  Title     :	query_service_existence
  Usage     :	my $un = $API->query_service_existence(%args)
  Function  :	Executes a query to check if the service exists in the database
- Args      :    servicename => String
- 				authority_uri => String 				
+ Args      :    servicename   => String
+ 		authority_uri => String 				
  Returns   :    1 if service exists
- 				0 if no such service instance
+ 		0 if no such service instance
  Notes     : 	Only allows querying by URI of the authority and service name
 =cut
 sub query_service_existence{
@@ -729,15 +729,15 @@
  Usage     :	my $un = $API->insert_service_instance(%args)
  Function  :	Inserts a service instance into the database
  Args      :    category         => String,
-				servicename      => String,
-				service_type_uri => String,
-				authority_uri    => String,
-				url              => String,
-				contact_email    => String, 
-				authoritative    => Integer,
-				description      => String,
-				signatureURL     => String,
-				lsid             => String
+		servicename      => String,
+		service_type_uri => String,
+		authority_uri    => String,
+		url              => String,
+		contact_email    => String, 
+		authoritative    => Integer,
+		description      => String,
+		signatureURL     => String,
+		lsid             => String
  Returns   :    Integer insertid
  Notes     : 	the fact that it returns an insertid is bad since this
              	is only useful to an SQL-based API...
@@ -753,8 +753,8 @@
  Function  :	Deletes a service instance from the database
  Args      :    service_instance_lsid => String 
  Returns   :    ($err, $errstr)
- 				$err = 1 if there was an delete error, 0 if successful
- 				$errstr = String error message if there was an error	
+ 		$err = 1 if there was an delete error, 0 if successful
+ 		$errstr = String error message if there was an error	
  
 =cut
 sub delete_service_intance{
@@ -771,9 +771,9 @@
  Function  :	Executes a query for authorities in the database
  Args      :    authority_uri => String
  Returns   :    listref of hashrefs:
- 				[{authority_common_name => String,
-         		authority_uri			=> String,
-          		contact_email			=> String}, ...]
+ 		[{authority_common_name => String,
+         	authority_uri			=> String,
+          	contact_email			=> String}, ...]
  Notes     : 	Only allows querying by URI of the authority
 =cut
 sub query_authority{
@@ -787,7 +787,7 @@
  Function  :	Gets all unique authority URIs from the database
  Args      :    no arguments
  Returns   :    listref of hashrefs:
- 				[{authority_uri => String}]
+ 		[{authority_uri => String}]
  				
 =cut
 sub get_all_authorities{
@@ -800,8 +800,8 @@
  Usage     :	my $un = $API->insert_authority(%args)
  Function  :	Inserts an authority into the database
  Args      :    authority_common_name => String,
-				authority_uri		  => String,
-				contact_email		  => String
+		authority_uri         => String,
+		contact_email	      => String
  Returns   :    Integer insertid
  Notes     : 	the fact that it returns an insertid is bad since this
              	is only useful to an SQL-based API...
@@ -825,12 +825,12 @@
  Function  :	Executes a query for service class
  Args      :    type => String - either service_type or service_lsid
  Returns   :    listref of hashrefs:
- 				[{service_id  => Integer, 
-          		service_lsid  => String,
-          		service_type  => String,
-          		description	  => String,
-          		authority	  => String,
-          		contact_email => String}, ...]
+ 		[{service_id  => Integer, 
+          	service_lsid  => String,
+          	service_type  => String,
+          	description   => String,
+          	authority     => String,
+          	contact_email => String}, ...]
  Notes     : 	the fact that it returns an service_id is bad since this
              	is only useful to an SQL-based API...
 =cut
@@ -844,10 +844,10 @@
  Usage     :	my $un = $API->insert_service(%args)
  Function  :	Inserts a service class into the database
  Args      :    service_type  => String,
-				service_lsid  => String,
-				description   => String,
-				authority 	  => String,
-				contact_email => String
+		service_lsid  => String,
+		description   => String,
+		authority     => String,
+		contact_email => String
  Returns   :    Integer insertid
  Notes     : 	the fact that it returns an insertid is bad since this
              	is only useful to an SQL-based API...
@@ -863,8 +863,8 @@
  Function  :	Deletes a service from the database
  Args      :    service_lsid => String 
  Returns   :    ($err, $errstr)
- 				$err = 1 if there was an delete error, 0 otherwise
- 				$errstr = String error message if there was an error	
+ 		$err = 1 if there was an delete error, 0 otherwise
+ 		$errstr = String error message if there was an error	
  
 =cut
 sub delete_service{
@@ -881,10 +881,10 @@
  Function  :	Executes a query for service relationships
  Args      :    type => String - either service_type or service_lsid
  Returns   :    listref of hashrefs:
- 				[{assertion_id	  => Integer,
-          		relationship_type => String,
-          		service1_id		  => String,
-          		service2_id		  => String}, ...]
+ 		[{assertion_id	  => Integer,
+          	relationship_type => String,
+          	service1_id	  => String,
+          	service2_id	  => String}, ...]
  Notes     : 	the fact that it returns an service ids is bad since this
              	is only useful to an SQL-based API...should return lsids
 =cut
@@ -898,8 +898,8 @@
  Usage     :	my $un = $API->insert_service_term2term(%args)
  Function  :	Inserts a service relationship
  Args      :    relationship_type => String, 
-				service1_type => String,
-				service2_type => String
+		service1_type     => String,
+		service2_type     => String
  Returns   :    Integer insertid
  Notes     : 	the fact that it returns an insertid is bad since this
              	is only useful to an SQL-based API...
@@ -921,18 +921,18 @@
  Title     :	query_relationship
  Usage     :	my $un = $API->query_relationship(%args)
  Function  :	Executes a query for a relationship in an ontology
- Args      :    type => String,
- 				ontology => String
+ Args      :    type     => String,
+ 		ontology => String
  Returns   :    listref of hashrefs:
                 [{relationship_id => Integer,
-          		relationship_lsid => String,
-          		relationship_type => String,
-          		container 		  => Integer,
-          		description		  => String,
-          		authority		  => String,
-          		contact_email	  => String,
-          		ontology		  => String}, ...]
-			one hashref for each relationship
+          	relationship_lsid => String,
+          	relationship_type => String,
+          	container 	  => Integer,
+          	description	  => String,
+          	authority	  => String,
+          	contact_email	  => String,
+          	ontology	  => String}, ...]
+		one hashref for each relationship
  Notes     : the fact that it returns a relationship_id is bad since this
              is only useful to an SQL-based API...
 =cut
@@ -960,12 +960,12 @@
  Function  :	Executes a query for namespace instances in the database
  Args      :    type => String - either lsid or term for a particular namespace
  Returns   :    listref of hashrefs:
- 				[{namespace_id => Integer,
-          		namespace_lsid => String,
-          		namespace_type => String,
-          		description	   => String,
-          		authority	   => String,
-          		contact_email  => String}, ...]
+ 		[{namespace_id => Integer,
+          	namespace_lsid => String,
+          	namespace_type => String,
+          	description    => String,
+          	authority      => String,
+          	contact_email  => String}, ...]
  
 =cut
 sub query_namespace{
@@ -978,10 +978,10 @@
  Usage     :	my $un = $API->insert_namespace(%args)
  Function  :	Deletes a namespace instance from the database
  Args      :    namespace_type => String,
- 				namespace_lsid => String,
- 				description	   => String, 
- 				authority      => String,
- 				contact_email  => String
+ 		namespace_lsid => String,
+ 		description    => String, 
+ 		authority      => String,
+ 		contact_email  => String
  Returns   :    Integer insertid
  Notes     : 	the fact that it returns an insertid is bad since this
              	is only useful to an SQL-based API...
@@ -997,8 +997,8 @@
  Function  :	Deletes a namespace instance from the database
  Args      :    type => String - lsid or namespace term identifying a particular namespace
  Returns   :    ($err, $errstr)
- 				$err = 1 if there was an delete error, 0 otherwise
- 				$errstr = String error message if there was an error	
+ 		$err = 1 if there was an delete error, 0 otherwise
+ 		$errstr = String error message if there was an error	
  
 =cut
 sub delete_namespace{
@@ -1012,10 +1012,10 @@
  Function  :	Execute a query for namespaces_term2term
  Args      :    type => String - namespace_type you are checking for
  Returns   :    listref of hashrefs:
- 				[{assertion_id 	  => Integer,
-          		relationship_type => String,
-          		namespace1_id 	  => String,
-          		namespace2_id	  => String}, ...]
+ 		[{assertion_id 	  => Integer,
+          	relationship_type => String,
+          	namespace1_id 	  => String,
+          	namespace2_id	  => String}, ...]
  Notes	   :    namespace1_id and namespace2_id will be lsids	 				
  
 =cut
@@ -1042,9 +1042,9 @@
  Function  :	Execute a custom query for objects that are used by some service
  Args      :   	type => String - either namespace_lsid or namespace_term 
  Returns   :    a list:
- 				($err, $errstr)
- 				$err = 1 if namespace is used by a service, 0 otherwise
- 				$errstr = contains the error message 
+ 		($err, $errstr)
+ 		$err = 1 if namespace is used by a service, 0 otherwise
+ 		$errstr = contains the error message 
  
 =cut
 # custom query subroutine for Moby::Central.pm->deregisterObjectClass()
@@ -1059,9 +1059,9 @@
  Function  :	Execute a custom query for namespaces that are used by some service
  Args      :   	type => String - either namespace_lsid or namespace_term 
  Returns   :    a list:
- 				($err, $errstr)
- 				$err = 1 if namespace is used by a service, 0 otherwise
- 				$errstr = contains the error message 
+ 		($err, $errstr)
+ 		$err = 1 if namespace is used by a service, 0 otherwise
+ 		$errstr = contains the error message 
  
 =cut
 # custom query routine for Moby::Central.pm -> deregisterNamespace()
@@ -1077,20 +1077,20 @@
  Args      :    keywords => listref (of keywords)
  Returns   :    listref of hashrefs:
                 [{service_instance_id => Integer,
-                category 			  => String, 
-                servicename 		  => String, 
-                service_type_uri 	  => String, 
-                authority_id 		  => Integer, 
-                url 			      => String, 
-                contact_email 		  => String, 
-                authoritative 		  => String, 
+                category 	      => String, 
+                servicename 	      => String, 
+                service_type_uri      => String, 
+                authority_id 	      => Integer, 
+                url 		      => String, 
+                contact_email 	      => String, 
+                authoritative 	      => String, 
                 description 	      => String, 
-                signatureURL 		  => String, 
-                lsid   				  => String}, ...]
+                signatureURL 	      => String, 
+                lsid   		      => String}, ...]
                 Each hash represents a service
  Notes     : 	the fact that it returns a service_instance_id is bad since this
              	is only useful to an SQL-based API...
-				Keywords are assumed to be joined by "OR" for the query 
+		Keywords are assumed to be joined by "OR" for the query 
 
 =cut
 # custom query routine for Moby::Central.pm -> findService()
@@ -1103,9 +1103,9 @@
  Title     :	find_by_simple
  Usage     :	my $un = $API->find_by_simple(%args)
  Function  :	Execute a custom query for service ids in simple_input/output
- Args      :    inout => String - to specify if input or output
-				ancestor_string => String - values that occur in object_type_uri
-				namespaceURIs => array-ref - reference to an array of namespace URIs
+ Args      :    inout           => String - to specify if input or output
+		ancestor_string => String - values that occur in object_type_uri
+		namespaceURIs   => array-ref - reference to an array of namespace URIs
  Returns   :    listref of hashrefs:
                 [{service_instance_id => Integer,
                 namespace_type_uris   => String}, ...]
@@ -1123,9 +1123,9 @@
  Title     :	find_by_collection
  Usage     :	my $un = $API->find_by_collection(%args)
  Function  :	Execute a custom query for service ids from collections
- Args      :    inout => String - to specify if input or output
-				objectURI => String - value that binds to object_type_uri
-				namespaceURIs => array-ref - reference to an array of namespace URIs
+ Args      :    inout         => String - to specify if input or output
+		objectURI     => String - value that binds to object_type_uri
+		namespaceURIs => array-ref - reference to an array of namespace URIs
  Returns   :    listref of hashrefs:
                 [{service_instance_id => Integer,
                 namespace_type_uris   => String}, ...]
@@ -1147,7 +1147,7 @@
  Returns   :    listref of hashrefs:
                 [{authority_uri => String,
                 servicename     => String}, ...]
-				one hashref for each service
+		one hashref for each service
  
 =cut
 # custom query subroutine for Moby::Central.pm->RetrieveServiceNames
@@ -1161,10 +1161,10 @@
  Usage     :	my $un = $API->get_parent_terms(%args)
  Function  :	From a given term, traverse the ontology and get all parent terms
  Args      :    relationship_type_id => Integer - a bind value for relationship_type_id on an underlying SQL-based data source
- 				term => String - bindvalue for OntologyEntry.term
+ 		term                 => String - bindvalue for OntologyEntry.term
  Returns   :    listref of hashrefs:
                 [{term => String}, ...]
-				one hashref for each parent
+		one hashref for each parent
  
 =cut
 # custom query for Moby::Central.pm->_flatten
@@ -1180,13 +1180,13 @@
  Args      :    type => String - either an object name or LSID
  Returns   :    listref of hashrefs:
                 [{relationship_type => String,
-                object_type 		=> String,
+                object_type 	    => String,
                 object_lsid         => String,
-                description 		=> String,
-                authority			=> String,
-                contact_email		=> String,
+                description 	    => String,
+                authority	    => String,
+                contact_email	    => String,
                 object2_articlename => String}, ...]
-				one hashref for each relationship between two objects
+		one hashref for each relationship between two objects
  Notes     : 	relationship_type from object_term2term, object_lsid from object, and object2_articlename from object_term2term
  
 =cut
@@ -1201,13 +1201,13 @@
  Title     :	get_relationship
  Usage     :	my $un = $API->get_relationship(%args)
  Function  :	Execute a query for a relationship between two ontologies
- Args      :    direction => String - direction in the ontology (eg. 'root')
- 				ontology => String - name of the table ontology
- 				term => String - a bind value for lsid
- 				relationship => String - a bind value for relationship_type
+ Args      :    direction    => String - direction in the ontology (eg. 'root')
+ 		ontology     => String - name of the table ontology
+ 		term         => String - a bind value for lsid
+ 		relationship => String - a bind value for relationship_type
  Returns   :	reference to array containing array-refs representing the result set:
- 				[[String lsid, String relationship_type], ...]
- 				each array-ref represents one row
+ 		[[String lsid, String relationship_type], ...]
+ 		each array-ref represents one row
  Notes	   :	Only returns distinct lsids from $ontology and relationship_type from $ontology_term2term
 
 =cut




More information about the MOBY-guts mailing list