[MOBY-guts] biomoby commit

Dennis Wang dwang at pub.open-bio.org
Wed Jul 27 21:26:52 UTC 2005


dwang
Wed Jul 27 17:26:52 EDT 2005
Update of /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby
In directory pub.open-bio.org:/tmp/cvs-serv30900/Perl/MOBY/Adaptor/moby

Modified Files:
	queryapi.pm 
Log Message:
added more comments...

moby-live/Perl/MOBY/Adaptor/moby queryapi.pm,1.20,1.21
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm	2005/07/27 14:19:42	1.20
+++ /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm	2005/07/27 21:26:52	1.21
@@ -433,10 +433,24 @@
 	die "query_object_term2term not implemented in adaptor\n";
 }
 
+=head2 insert_object_term2term
+
+ Title     :	insert_object_term2term
+ Usage     :	my $un = $API->insert_object_term2term(%args)
+ Function  :	Inserts a object relationship into the database
+ Args      :    relationship_type => String, 
+				object1_id => Integer, - but may be string if lsid?
+				object2_id => Integer, - but may be string if lsid?
+				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...
+=cut
 sub insert_object_term2term{
 	die "insert_object_term2term not implemented in adaptor\n";
 }
 
+# private routine in mysql api, should not be documented
 sub delete_object_term2term{
 	die "delete_object_term2term not implemented in adaptor\n";
 }
@@ -444,18 +458,81 @@
 #
 # service_instance table functions
 #
+=head2 query_service_instance
+
+ Title     :	query_service_instance
+ 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}]
+ Notes     : 	Allows querying by multiple conditions joined by 'and'
+=cut
 sub query_service_instance {
 	die "query_service_instance not implemented in adaptor\n";
 }
 
+# This might be redundant of query_service_instance(), since same function can be
+# replicated by several of its calls
 sub match_service_type_uri{
 	die "match_service_type_uri not implemented in adaptor\n";
 }
 
+=head2 insert_service_instance
+
+ Title     :	insert_service_instance
+ 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
+ Returns   :    Integer insertid
+ Notes     : 	the fact that it returns an insertid is bad since this
+             	is only useful to an SQL-based API...
+=cut
 sub insert_service_instance {
 	die "insert_service_instance not implemented in adaptor\n";
 }
 
+=head2 delete_service_instance
+
+ Title     :	delete_service_instance
+ Usage     :	my $un = $API->delete_service_instance(%args)
+ 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	
+ 
+=cut
 sub delete_service_intance{
 	die "delete_service_intance not implemented in adaptor\n";
 }




More information about the MOBY-guts mailing list