[MOBY-guts] biomoby commit
Mark Wilkinson
mwilkinson at pub.open-bio.org
Wed Jul 27 18:00:54 UTC 2005
mwilkinson
Wed Jul 27 14:00:53 EDT 2005
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory pub.open-bio.org:/tmp/cvs-serv30292/MOBY
Modified Files:
OntologyServer.pm
Log Message:
expecting a list of IDs instead of a database row
moby-live/Perl/MOBY OntologyServer.pm,1.62,1.63
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -r1.62 -r1.63
--- /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm 2005/07/27 17:36:02 1.62
+++ /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm 2005/07/27 18:00:53 1.63
@@ -462,11 +462,11 @@
return ( 0,qq{Object type $args{object_node} does not exist in the ontology},'' )
unless defined $obj_lsid;
my $isa = $adaptor->query_object_term2term(type => $subj_lsid);
-
- if ( scalar @$isa ) {
+ my $isarow = shift @$isa;
+ if ( $isarow->object_lsid ) {
return (
0,
-qq{Object type $args{subject_node} has existing object dependencies in the ontology. It cannot be changed.},
+ qq{Object type $args{subject_node} has existing object dependencies in the ontology. It cannot be changed.},
$subj_lsid
);
}
@@ -513,18 +513,17 @@
my $row = shift(@$result);
my $sbj_lsid = $row->{service_lsid};
- return (
- 0,
-qq{Service type $args{subject_node} has object dependencies in the ontology. It can not be changed},
+ return (0,
+ qq{Service type $args{subject_node} has object dependencies in the ontology. It can not be changed},
$sbj_lsid
- )
- unless defined $sbj_lsid;
+ ) unless defined $sbj_lsid;
my $isa = $adaptor->query_service_term2term(service2_id => $sbj_lsid);
- if ( scalar @$isa ) {
+ my $isarow = shift @$isa;
+ if ( $isarow->service_lsid ) {
return (
0,
-qq{Service type $args{subject_node} has object dependencies in the ontology. It can not be changed},
+ qq{Service type $args{subject_node} has object dependencies in the ontology. It can not be changed},
$sbj_lsid
);
}
@@ -549,7 +548,7 @@
my $insertid = $adaptor->insert_service_term2term(relationship_type => $rel_lsid,
service1_type => $sbj_lsid,
service2_type => $obj_lsid);
- if ( $insertid ) {
+ if ( defined($insertid)) {
return ( 1, "Service relationship created successfully", '' );
} else {
return ( 0, "Service relationship creation failed for unknown reasons",
More information about the MOBY-guts
mailing list