[MOBY-guts] biomoby commit

Dennis Wang dwang at pub.open-bio.org
Wed Jul 27 00:15:49 UTC 2005


dwang
Tue Jul 26 20:15:48 EDT 2005
Update of /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby
In directory pub.open-bio.org:/tmp/cvs-serv26271/Perl/MOBY/Adaptor/moby

Modified Files:
	queryapi.pm 
Log Message:
added some more documentation

moby-live/Perl/MOBY/Adaptor/moby queryapi.pm,1.16,1.17
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm	2005/07/26 23:32:48	1.16
+++ /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm	2005/07/27 00:15:48	1.17
@@ -486,10 +486,35 @@
 	die "query_service not implemented in adaptor\n";
 }
 
+=head2 insert_service
+
+ Title     :	insert_service
+ 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
+ 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{
 	die "insert_service not implemented in adaptor\n";
 }
 
+=head2 delete_service
+
+ Title     :	delete_service
+ Usage     :	my $un = $API->delete_service(%args)
+ 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	
+ 
+=cut
 sub delete_service{
 	die "delete_service not implemented in adaptor\n";
 }
@@ -497,14 +522,41 @@
 #
 # service_term2term table functions
 #
+=head2 query_service_term2term
+
+ Title     :	query_service_term2term
+ Usage     :	my $un = $API->query_service_term2term(%args)
+ 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		  => Integer,
+          		service2_id		  => Integer}]
+ Notes     : 	the fact that it returns an service ids is bad since this
+             	is only useful to an SQL-based API...
+=cut
 sub query_service_term2term{
 	die "query_service_term2term not implemented in adaptor\n";
 }
 
+=head2 insert_service_term2term
+
+ Title     :	insert_service_term2term
+ Usage     :	my $un = $API->insert_service_term2term(%args)
+ Function  :	Inserts a service relationship
+ Args      :    relationship_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...
+=cut
 sub insert_service_term2term{
 	die "insert_service_term2term not implemented in adaptor\n";
 }
 
+# private subroutine in mysql api
 sub delete_service_term2term{
 	die "delete_service_term2term not implemented in adaptor\n";
 }
@@ -512,14 +564,36 @@
 #
 # relationship table functions
 #
+=head2 query_relationship
+
+ 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
+ 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
+ Notes     : the fact that it returns a relationship_id is bad since this
+             is only useful to an SQL-based API...
+=cut
 sub query_relationship{
 	die "query_relationship not implemented in adaptor\n";
 }
 
+# probably no need for this and not implemented in mysql api
 sub insert_relationship{
 	die "insert_relationship not implemented in adaptor\n";
 }
 
+# is not implemented in mysql api either... should this be removed?
 sub delete_relationship{
 	die "delete_relationship not implemented in adaptor\n";
 }
@@ -555,8 +629,8 @@
  				description	   => String, 
  				authority      => String,
  				contact_email  => String
- Returns   :    Integer mysql_insertid
- Notes     : 	the fact that it returns a mysql_insertid is bad since this
+ 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_namespace{




More information about the MOBY-guts mailing list