[MOBY-guts] biomoby commit

Dennis Wang dwang at pub.open-bio.org
Fri Jul 29 07:50:04 UTC 2005


dwang
Fri Jul 29 03:50:04 EDT 2005
Update of /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby
In directory pub.open-bio.org:/tmp/cvs-serv7522/Perl/MOBY/Adaptor/moby

Modified Files:
	queryapi.pm 
Log Message:
almost there

moby-live/Perl/MOBY/Adaptor/moby queryapi.pm,1.24,1.25
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm	2005/07/28 19:45:26	1.24
+++ /home/repository/moby/moby-live/Perl/MOBY/Adaptor/moby/queryapi.pm	2005/07/29 07:50:04	1.25
@@ -295,15 +295,36 @@
  Notes     : the fact that it returns a collection_input_id is bad since this
              is only useful to an SQL-based API...
 =cut
-
 sub query_collection_input{
 	die "query_collection_input not implemented in adaptor\n";
 }
 
+=head2 insert_collection_input
+
+ Title     :	insert_collection_input
+ Usage     :	my $un = $API->insert_collection_input(%args)
+ Function  :	Inserts a Collection input into the database
+ Args      :   	article_name           => String,
+				service_instance_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_collection_input {
 	die "insert_collection_input not implemented in adaptor\n";
 }
 
+=head2 delete_collection_input
+
+ Title     :	delete_collection_input
+ Usage     :	my $un = $API->delete_collection_input(%args)
+ Function  :	Deletes Collection inputs according to the service instance
+ 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_collection_input{
 	die "delete_collection_input not implemented in adaptor\n";
 }
@@ -311,10 +332,34 @@
 #
 # collection_output table fuctions
 #
+=head2 query_collection_output
+
+ Title     :	query_collection_output
+ Usage     :	my $un = $API->query_collection_output(%args)
+ Function  :	Executes a query for Collection outputs according to the service instance
+ Args      :    service_instance_lsid => String,				
+ Returns   :    listref of hashrefs:
+ 				[{collection_output_id => Integer,
+      			article_name		 => String,
+      			service_instance_id	 => Integer,
+      			}]
+ Notes     : 	Only allows querying by lsid or type term, so service_instance_id is retrieved from lsid or term
+=cut
 sub query_collection_output{
 	die "query_collection_output not implemented in adaptor\n";
 }
 
+=head2 insert_collection_output
+
+ Title     :	insert_collection_output
+ Usage     :	my $un = $API->insert_collection_output(%args)
+ Function  :	Inserts a Collection output into the database
+ Args      :   	article_name           => String,
+				service_instance_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_collection_output {
 	die "insert_collection_output not implemented in adaptor\n";
 	#my ($self, %args) = @_;	
@@ -327,6 +372,17 @@
 	#}
 }
 
+=head2 delete_collection_output
+
+ Title     :	delete_collection_output
+ Usage     :	my $un = $API->delete_collection_output(%args)
+ Function  :	Deletes Collection outputs according to the service instance
+ 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_collection_output{
 	die "delete_collection_output not implemented in adaptor\n";
 }
@@ -334,32 +390,56 @@
 #
 # simple_output table functions
 #
+=head2 query_simple_input
+
+ Title     :	query_simple_input
+ Usage     :	my $un = $API->query_simple_input(%args)
+ Function  :	Executes a query for Simple inputs according to the service instance or collection output
+ Args      :    service_instance_lsid => String,
+ 				collection_input_id  => Integer
+ Returns   :    listref of hashrefs:
+ 				[{simple_input_id 	 => Integer,
+      			object_type_uri		 => String,
+     		 	namespace_type_uris	 => String,
+      			article_name		 => String,
+      			service_instance_id	 => Integer,
+      			collection_input_id => Integer}]
+ Notes     : 	Only allows querying by lsid or type term, so service_instance_id is retrieved from lsid or term
+=cut
 sub query_simple_input{
 	die "query_simple_input not implemented in adaptor\n";
 }
 
+=head2 insert_simple_input
+
+ Title     :	insert_simple_input
+ Usage     :	my $un = $API->insert_simple_input(%args)
+ Function  :	Inserts a Simple input into the database
+ Args      :    object_type_uri        => String,
+				namespace_type_uris    => String,
+				article_name           => String,
+				service_instance_lsid  => String,
+				collection_input_id   => Integer
+ 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_simple_input {
 	die "insert_simple_input not implemented in adaptor\n";
-	#my ($self, %args) = @_;	
-	#my $dbh = $self->dbh;
-	#
-	#$dbh->do("insert into simple_input
-	#			 (object_type_uri,
-	#			  namespace_type_uris,
-	#			  article_name,
-	#			  service_instance_id,
-	#			  collection_input_id)
-	#			 values (?,?,?,?,?)",
-	#	undef,
-	#	($args{object_type_uri},
-	#	$args{namespace_type_uris},
-	#	$args{article_name},
-	#	$args{service_instance_id},
-	#	$args{collection_input_id}));
-	#my $id=$dbh->{mysql_insertid};
-	#return $id;
 }
 
+=head2 delete_simple_input
+
+ Title     :	delete_simple_input
+ 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
+ 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_simple_input{
 	die "delete_simple_input not implemented in adaptor\n";
 }
@@ -371,7 +451,7 @@
 
  Title     :	query_simple_output
  Usage     :	my $un = $API->query_simple_output(%args)
- Function  :	Executes a query for Simput outputs according to the service instance or collection output
+ Function  :	Executes a query for Simple outputs according to the service instance or collection output
  Args      :    service_instance_lsid => String,
  				collection_output_id  => Integer
  Returns   :    listref of hashrefs:




More information about the MOBY-guts mailing list