[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Tue Apr 20 19:02:19 UTC 2004


mwilkinson
Tue Apr 20 15:02:19 EDT 2004
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory pub.open-bio.org:/tmp/cvs-serv14446/MOBY

Modified Files:
	OntologyServer.pm 
Log Message:
more LSID compatibility for object registration

moby-live/Perl/MOBY OntologyServer.pm,1.35,1.36
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm	2004/04/20 18:58:05	1.35
+++ /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm	2004/04/20 19:02:19	1.36
@@ -238,6 +238,7 @@
     my $LSID = ($args{'node'} =~ /urn\:lsid/)?$args{'node'}:$self->setURI($args{'node'});
     unless ($LSID){return (0, "Failed during creation of an LSID",'')}
 
+	my $sth;
     if ($args{'node'} =~ /^urn\:lsid/){
         $sth = $self->dbh->prepare("select object_lsid, object_type, description, authority, contact_email from object where object_lsid = ?");
     } else {
@@ -388,20 +389,21 @@
     my ($self, %args) = @_;
 
     return (0, "WRONG ONTOLOGY!",'') unless ($self->ontology eq 'object');
-
+	
+	my ($subj_id, $subj_lsid, $obj_id, $obj_lsid);
 	if ($args{subject_node} =~ /^urn:lsid/){
-	    my ($subj_id, $subj_lsid) = $self->dbh->selectrow_array(q{select object_id, object_lsid from object where object_lsid = ?},undef,$args{subject_node});
+	    ($subj_id, $subj_lsid) = $self->dbh->selectrow_array(q{select object_id, object_lsid from object where object_lsid = ?},undef,$args{subject_node});
 	} else {
-	    my ($subj_id, $subj_lsid) = $self->dbh->selectrow_array(q{select object_id, object_lsid from object where object_type = ?},undef,$args{subject_node});
+	    ($subj_id, $subj_lsid) = $self->dbh->selectrow_array(q{select object_id, object_lsid from object where object_type = ?},undef,$args{subject_node});
 	}
     return (0, qq{Object type $args{subject_node} does not exist in the ontology},'') unless defined $subj_id;
 
 	if ($args{object_node} =~ /^urn:lsid/){
-	    my ($subj_id, $subj_lsid) = $self->dbh->selectrow_array(q{select object_id, object_lsid from object where object_lsid = ?},undef,$args{object_node});
+	    ($obj_id, $obj_lsid) = $self->dbh->selectrow_array(q{select object_id, object_lsid from object where object_lsid = ?},undef,$args{object_node});
 	} else {
-	    my ($subj_id, $subj_lsid) = $self->dbh->selectrow_array(q{select object_id, object_lsid from object where object_type = ?},undef,$args{object_node});
+	    ($obj_id, $obj_lsid) = $self->dbh->selectrow_array(q{select object_id, object_lsid from object where object_type = ?},undef,$args{object_node});
 	}
-    return (0, qq{Object type $args{object_node} does not exist in the ontology},'') unless defined $subj_id;
+    return (0, qq{Object type $args{object_node} does not exist in the ontology},'') unless defined $obj_id;
 
 
     my (@isa) = $self->dbh->selectrow_array(q{select * from object_term2term where object2_id = ?},undef, $subj_id);




More information about the MOBY-guts mailing list