[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Thu May 8 14:40:41 UTC 2003


mwilkinson
Thu May  8 10:40:41 EDT 2003
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory pub.open-bio.org:/tmp/cvs-serv585/Perl/MOBY

Modified Files:
	OntologyServer.pm 
Log Message:
temp commit to get some changes over.  Client library broken
moby-live/Perl/MOBY OntologyServer.pm,1.2,1.3
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm	2003/05/08 14:24:09	1.2
+++ /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm	2003/05/08 14:40:41	1.3
@@ -121,7 +121,7 @@
 sub deprecateObject {
     my ($self, %args) = @_;
     my $term = $args{term};
-    my $id = $self->dbh->selectrow_array(q{select object_id from object where object_type = ?},undef,$term);
+    my ($id) = $self->dbh->selectrow_array(q{select object_id from object where object_type = ?},undef,$term);
     # object1_id ISA object2_id?
     my (@isa) = $self->dbh->selectrow_array(q{select * from object_term2term where object2_id = ?},undef, $id);
     if (scalar @isa){
@@ -143,7 +143,7 @@
 sub deleteObject {
     my ($self, %args) = @_;
     my $term = $args{term};
-    my $id = $self->dbh->selectrow_array(q{select object_id from object where object_type = ?},undef,$term);
+    my ($id) = $self->dbh->selectrow_array(q{select object_id from object where object_type = ?},undef,$term);
     # object1_id ISA object2_id?
     my (@isa) = $self->dbh->selectrow_array(q{select * from object_term2term where object2_id = ?},undef, $id);
     if (scalar @isa){
@@ -171,13 +171,13 @@
 				#authority => $auth,
 				#contact_email => $email);
     my ($self, %args) = @_;
-    my $id = $self->dbh->selectrow_array(q{select object_id from object where object_type = ?},undef,$args{node});
+    my ($id) = $self->dbh->selectrow_array(q{select object_id from object where object_type = ?},undef,$args{node});
     # object1_id ISA object2_id?
     my (@isa) = $self->dbh->selectrow_array(q{select * from object_term2term where object2_id = ?},undef, $id);
     if (scalar @isa){
         return (0, q{Object type $term has object dependencies in the ontology.  It can not be changed},$self->setURI($id));
     }
-    my $relid = $self->dbh->selectrow_array(q{select object_id from object where object_type = ?},undef,$args{ISA}); # get ID of the related object
+    my ($relid) = $self->dbh->selectrow_array(q{select object_id from object where object_type = ?},undef,$args{ISA}); # get ID of the related object
     $relid || return (0, q{Object $args{ISA} does not exist in the ontology},'');
     
     $self->dbh->do(
@@ -200,13 +200,13 @@
 				#contact_email => $email
                 #articleName => $name
     my ($self, %args) = @_;
-    my $id = $self->dbh->selectrow_array(q{select object_id from object where object_type = ?},undef,$args{node});
+    my ($id) = $self->dbh->selectrow_array(q{select object_id from object where object_type = ?},undef,$args{node});
     # object1_id ISA object2_id?
     my (@isa) = $self->dbh->selectrow_array(q{select * from object_term2term where object2_id = ?},undef, $id);
     if (scalar @isa){
         return (0, q{Object type $term has object dependencies in the ontology.  It can not be changed},$self->setURI($id));
     }
-    my $relid = $self->dbh->selectrow_array(q{select object_id from object where object_type = ?},undef,$args{ISA}); # get ID of the related object
+    my ($relid) = $self->dbh->selectrow_array(q{select object_id from object where object_type = ?},undef,$args{ISA}); # get ID of the related object
     $relid || return (0, q{Object $args{ISA} does not exist in the ontology},'');
     
     $self->dbh->do(q{insert into object_term2term (relationship_type, object1_id, object2_id, object2_articlename) values (?,?,?,?)},undef,("URN:LSID:biomoby.org:ObjectRelation:ISA",$id,$relid,$args{'articleName'}));
@@ -259,7 +259,7 @@
 sub deleteServiceType {
     my ($self, %args) = @_;
     my $term = $args{term};
-    my $id = $self->dbh->selectrow_array(q{select service_id from service where service_type = ?},undef,$term);
+    my ($id) = $self->dbh->selectrow_array(q{select service_id from service where service_type = ?},undef,$term);
     if (!defined $id){
         return (0, q{Service type $term does not exist in the ontology},$self->setURI($id));
     }
@@ -290,13 +290,13 @@
 				#authority => $auth,
 				#contact_email => $email);
     my ($self, %args) = @_;
-    my $id = $self->dbh->selectrow_array(q{select service_id from service where service_type = ?},undef,$args{node});
+    my ($id) = $self->dbh->selectrow_array(q{select service_id from service where service_type = ?},undef,$args{node});
     # object1_id ISA object2_id?
     my (@isa) = $self->dbh->selectrow_array(q{select * from service_term2term where service2_id = ?},undef, $id);
     if (scalar @isa){
         return (0, q{Service type $term has object dependencies in the ontology.  It can not be changed},$self->setURI($id));
     }
-    my $relid = $self->dbh->selectrow_array(q{select service_id from service where service_type = ?},undef,$args{ISA}); # get ID of the related service
+    my ($relid) = $self->dbh->selectrow_array(q{select service_id from service where service_type = ?},undef,$args{ISA}); # get ID of the related service
     $relid || return (0, q{Service $args{ISA} does not exist in the ontology},'');
     
     $self->dbh->do(q{insert into service_term2term (relationship_type, service1_id, service2_id) values (?,?,?)},undef,("URN:LSID:biomoby.org:ServiceRelation:ISA",$id,$relid));
@@ -343,7 +343,7 @@
 sub deleteNamespace {
     my ($self, %args) = @_;
     my $term = $args{term};
-    my $id = $self->dbh->selectrow_array(q{select namespace_id from namespace where namespace_type = ?},undef,$term);
+    my ($id) = $self->dbh->selectrow_array(q{select namespace_id from namespace where namespace_type = ?},undef,$term);
     # service1_id ISA service2_id?
     my (@isa) = $self->dbh->selectrow_array(q{select * from namespace_term2term where namespace2_id = ?},undef, $id);
     if (scalar @isa){
@@ -433,19 +433,19 @@
 
 sub getServiceURI {
     my ($self, $term) = @_;
-    my $id = $self->dbh->selectrow_array(q{select service_id from service where service_type = ?},undef,$term);
+    my ($id) = $self->dbh->selectrow_array(q{select service_id from service where service_type = ?},undef,$term);
     return $self->setURI($id);
 }
 
 sub getObjectURIs {
     my ($self, $term) = @_;
-    my $id = $self->dbh->selectrow_array(q{select object_id from object where object_type = ?},undef,$term);
+    my ($id) = $self->dbh->selectrow_array(q{select object_id from object where object_type = ?},undef,$term);
     return $self->setURI($id);
 }
 
 sub getNamespaceURIs {
     my ($self, $term) = @_;
-    my $id = $self->dbh->selectrow_array(q{select namespace_id from service where namespace_type = ?},undef,$term);
+    my ($id) = $self->dbh->selectrow_array(q{select namespace_id from service where namespace_type = ?},undef,$term);
     return $self->setURI($id);
 }
 




More information about the MOBY-guts mailing list