[MOBY-guts] biomoby commit
Mark Wilkinson
mwilkinson at pub.open-bio.org
Thu Feb 20 02:12:33 UTC 2003
mwilkinson
Wed Feb 19 21:12:33 EST 2003
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory pub.open-bio.org:/tmp/cvs-serv16167
Modified Files:
Central.pm
Log Message:
test
moby-live/Perl/MOBY Central.pm,1.2,1.3
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Central.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- /home/repository/moby/moby-live/Perl/MOBY/Central.pm 2003/02/20 01:49:49 1.2
+++ /home/repository/moby/moby-live/Perl/MOBY/Central.pm 2003/02/20 02:12:33 1.3
@@ -1,3 +1,5 @@
+
+
=head1 NAME
MOBY::Central.pm - API for communicating with the MOBY Central registry
@@ -574,12 +576,14 @@
outputXML : see Registration XML object
+
=cut
sub registerServiceType {
my ($pkg, $payload) = @_;
+# my ($term, $desc, $ISA, $clobber) = &_registerServiceTypePayload($payload);
my ($term, $desc, $ISA) = &_registerServiceTypePayload($payload);
unless ($term && $desc){
@@ -597,15 +601,16 @@
my $sth = $dbh->prepare($sth{check_service_registration});
$sth->execute($term);
my ($existing_id, $acc) = $sth->fetchrow_array;
+# if ($existing_id && !$clobber){
if ($existing_id){
my $reg = &Registration({
success => 0,
- error_message => "Service Type $term already exists",
+ error_message => "Service Type $term already exists - register failed.",
registration_id => "$acc",
});
return $reg;
}
-
+# $clobber = 0 unless $existing_id; # makes sense - can't clobber what isn't there.
$sth = $dbh->prepare($sth{get_last_service_accession});
$sth->execute;
@@ -678,8 +683,9 @@
my $type = &_nodeTextContent($Object, "serviceType");
my $desc = &_nodeTextContent($Object, "Description");
my @ISA = &_nodeArrayContent($Object, "ISA");
+ my $clobber = &_nodeTextContent($Object, "Clobber");
$debug && &_LOG("got $type, $desc, @ISA from registerServiceTypePayload\n");
- return ($type, $desc, \@ISA);
+ return ($type, $desc, \@ISA, $clobber);
}
More information about the MOBY-guts
mailing list