[MOBY-guts] biomoby commit
Mark Wilkinson
mwilkinson at pub.open-bio.org
Fri Jul 22 20:25:39 UTC 2005
mwilkinson
Fri Jul 22 16:25:39 EDT 2005
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory pub.open-bio.org:/tmp/cvs-serv1569/MOBY
Modified Files:
Central.pm
Log Message:
various queries being sent to the wrong adaptors
moby-live/Perl/MOBY Central.pm,1.171,1.172
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Central.pm,v
retrieving revision 1.171
retrieving revision 1.172
diff -u -r1.171 -r1.172
--- /home/repository/moby/moby-live/Perl/MOBY/Central.pm 2005/07/22 20:18:28 1.171
+++ /home/repository/moby/moby-live/Perl/MOBY/Central.pm 2005/07/22 20:25:39 1.172
@@ -473,7 +473,7 @@
sub deregisterObjectClass {
$CONFIG ||= MOBY::Config->new; # exported by Config.pm
- my $adaptor = $CONFIG->getDataAdaptor( datasource => 'mobycentral' );
+ my $adaptor = $CONFIG->getDataAdaptor( datasource => 'mobyobject' );
my ( $pkg, $payload ) = @_;
my $OntologyServer = &_getOntologyServer( ontology => 'object' );
@@ -486,7 +486,6 @@
$OntologyServer->objectExists( term => $class );
return &_error( "Object class $class does not exist", "" )
unless ($existingURI);
- my $dbh = MOBY::central_db_connection->new()->dbh;
my $errormsg = $adaptor->checkClassUsedByService({object_type_uri => $existingURI});
return &_error(
@@ -745,7 +744,7 @@
sub deregisterServiceType {
$CONFIG ||= MOBY::Config->new; # exported by Config.pm
- my $adaptor = $CONFIG->getDataAdaptor( datasource => 'mobycentral' );
+ my $adaptor = $CONFIG->getDataAdaptor( datasource => 'mobyservice' );
my ( $pkg, $payload ) = @_;
my $OntologyServer = &_getOntologyServer( ontology => 'service' );
@@ -755,12 +754,9 @@
return &_error(
"Must include an accession number to deregister a serviceType", "" )
unless ($term);
- my ( $success, $message, $existingURI ) =
- $OntologyServer->serviceExists( term => $term )
- ; # hopefully this situation will never happen!
+ my ( $success, $message, $existingURI ) = $OntologyServer->serviceExists( term => $term ); # hopefully this situation will never happen!
return &_error( "Service Type $term does not exist in the ontology", "" )
unless ($existingURI);
- my $dbh = MOBY::central_db_connection->new()->dbh;
my $result = $adaptor->query_service({service_type_uri => $existingURI});
my $row = shift(@$result);
@@ -906,7 +902,7 @@
sub deregisterNamespace {
$CONFIG ||= MOBY::Config->new; # exported by Config.pm
- my $adaptor = $CONFIG->getDataAdaptor( datasource => 'mobycentral' );
+ my $adaptor = $CONFIG->getDataAdaptor( datasource => 'mobynamespace' );
my ( $pkg, $payload ) = @_;
my $OntologyServer = &_getOntologyServer( ontology => 'namespace' );
@@ -919,7 +915,6 @@
$OntologyServer->namespaceExists( term => $term );
return &_error( "Namespace Type $term does not exist", "" )
unless ($existingURI);
- my $dbh = MOBY::central_db_connection->new->dbh;
my ($err, $errstr) = $adaptor->checkNamespaceUsedByService({namespace_type_uris => $existingURI}, {term => $term});
return &_error( $errstr, "")
if ($err);
More information about the MOBY-guts
mailing list