[MOBY-guts] biomoby commit
Mark Wilkinson
mwilkinson at pub.open-bio.org
Fri Jul 29 17:39:32 UTC 2005
mwilkinson
Fri Jul 29 13:39:32 EDT 2005
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory pub.open-bio.org:/tmp/cvs-serv10893/MOBY
Modified Files:
Central.pm OntologyServer.pm
Log Message:
deleting service type failed due to bad lookup of relationships. Fix reporting of errors from MOBY Central - need to bracket teh (==0) phrase of every test
moby-live/Perl/MOBY Central.pm,1.195,1.196 OntologyServer.pm,1.70,1.71
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Central.pm,v
retrieving revision 1.195
retrieving revision 1.196
diff -u -r1.195 -r1.196
--- /home/repository/moby/moby-live/Perl/MOBY/Central.pm 2005/07/29 15:07:40 1.195
+++ /home/repository/moby/moby-live/Perl/MOBY/Central.pm 2005/07/29 17:39:32 1.196
@@ -313,14 +313,14 @@
term => $reltype,
ontology => 'object'
); # success = 1 if it does
- $success == 0 && return &_error( $message, $URI );
+ ($success == 0) && return &_error( $message, $URI );
foreach ( @{$obj} ) {
++$ISAs if ( $URI =~ /isa$/i );
my ( $objectType, $articleName ) = @{$_};
my ( $success, $message, $URI ) =
$OntologyServer->objectExists( term => $objectType )
; # success = 1 if it does
- $success == 0 && return &_error( $message, $URI );
+ ($success == 0) && return &_error( $message, $URI );
}
}
return &_error(
@@ -341,12 +341,12 @@
if ( $clobber == 1 ) {
my ( $success, $message ) =
$OntologyServer->deprecateObject( term => $term );
- $success == 0 && return &_error( $message, $URI );
+ ($success == 0) && return &_error( $message, $URI );
}
elsif ( $clobber == 2 ) {
my ( $success, $message ) =
$OntologyServer->deleteObject( term => $term );
- $success == 0 && return &_error( $message, $URI );
+ ($success == 0) && return &_error( $message, $URI );
}
}
( $success, $message, $URI ) = $OntologyServer->createObject(
@@ -355,7 +355,7 @@
authority => $auth,
contact_email => $email
);
- $success == 0 && return &_error( $message, $URI );
+ ($success == 0) && return &_error( $message, $URI );
my @failures;
if ( keys %{$relationships} ) {
while ( my ( $reltype, $obj ) = each %{$relationships} ) {
@@ -370,7 +370,7 @@
authority => $auth,
contact_email => $email
);
- $success == 0 && push @failures, $objectType;
+ ($success == 0) && push @failures, $objectType;
}
}
}
@@ -378,7 +378,7 @@
my ( $success, $message, $deleteURI ) =
$OntologyServer->deleteObject( term => $term )
; # hopefully this situation will never happen!
- $success == 0 && return &_error(
+ ($success == 0) && return &_error(
"object failed ISA and/or HASA connections,
and subsequently failed deletion. This is a critical error,
and may indicate corruption of the MOBY Central registry.", $deleteURI
@@ -635,7 +635,7 @@
authority => $auth,
contact_email => $email
);
- $success == 0 && return &_error( $message, $URI );
+ ($success == 0) && return &_error( $message, $URI );
my @failures;
if ( keys %{$relationships} ) {
while ( my ( $reltype, $obj ) = each %{$relationships} ) {
@@ -648,7 +648,7 @@
authority => $auth,
contact_email => $email
);
- $success == 0 && push @failures, $serviceType;
+ ($success == 0) && push @failures, $serviceType;
}
}
}
@@ -656,7 +656,7 @@
my ( $success, $message, $deleteURI ) =
$OntologyServer->deleteServiceType( term => $term )
; # hopefully this situation will never happen!
- $success == 0 && return &_error(
+ ($success == 0) && return &_error(
"Service registration failed ISA connections,
and subsequently failed deletion. This is a critical error,
and may indicate corruption of the MOBY Central registry", $deleteURI
@@ -767,7 +767,7 @@
my ( $success2, $message2, $deleteURI ) =
$OntologyServer->deleteServiceType( term => $term )
; # hopefully this situation will never happen!
- $success == 0 && return &_error( $message2, $deleteURI );
+ (($success == 0)) && return &_error( $message2, $deleteURI );
return &_success( "Service type $term deleted.", $deleteURI );
}
@@ -855,7 +855,7 @@
authority => $auth,
contact_email => $email
);
- $success == 0 && return &_error( $message, $URI );
+ ($success == 0) && return &_error( $message, $URI );
return &_success( "Namespace type $term registered successfully.", $URI );
}
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -r1.70 -r1.71
--- /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm 2005/07/29 15:07:40 1.70
+++ /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm 2005/07/29 17:39:32 1.71
@@ -682,7 +682,7 @@
}
# service1_id ISA service2_id?
- my $isa = $adaptor->query_service_term2term(service2_id => $lsid);
+ my $isa = $adaptor->query_service_term2term(type => $lsid);
my $isas = shift(@$isa);
if ( $isas->{service1_id} ) {
More information about the MOBY-guts
mailing list