[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Fri Jul 22 19:16:41 UTC 2005


mwilkinson
Fri Jul 22 15:16:40 EDT 2005
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory pub.open-bio.org:/tmp/cvs-serv847/MOBY

Modified Files:
	Central.pm secondary_input.pm service_instance.pm 
Log Message:
the logic for findig existing services was still wonky.

moby-live/Perl/MOBY Central.pm,1.166,1.167 secondary_input.pm,1.5,1.6 service_instance.pm,1.22,1.23
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Central.pm,v
retrieving revision 1.166
retrieving revision 1.167
diff -u -r1.166 -r1.167
--- /home/repository/moby/moby-live/Perl/MOBY/Central.pm	2005/07/22 17:12:13	1.166
+++ /home/repository/moby/moby-live/Perl/MOBY/Central.pm	2005/07/22 19:16:40	1.167
@@ -1236,7 +1236,15 @@
 "Service categories other than 'moby' and 'wsdl' are not yet implemented",
 		""
 	  )
-	  unless ( ( $Category eq "moby" ) || ( $Category eq "wsdl" ) );
+	unless ( ( $Category eq "moby" ) || ( $Category eq "wsdl" ) );
+
+#test the existence of the service
+	return &_error( "This service already exists", "" ) if (MOBY::service_instance->new(
+		servicename   => $serviceName,
+		authority_uri => $AuthURI,
+		test => 1));
+
+
 	my @IN   = @{$INPUTS};
 	my @OUT  = @{$OUTPUTS};
 	my @SECS = @{$SECONDARY};

===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/secondary_input.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- /home/repository/moby/moby-live/Perl/MOBY/secondary_input.pm	2005/07/20 22:04:10	1.5
+++ /home/repository/moby/moby-live/Perl/MOBY/secondary_input.pm	2005/07/22 19:16:40	1.6
@@ -115,13 +115,13 @@
 	my $adaptor = $CONFIG->getDataAdaptor( datasource => 'mobycentral' );
 	my $dbh = $self->dbh;
 	my $insertid = $adaptor->insert_secondary_input({default_value => $self->default_value},
-													{maximum_value => $self->maximum_value},
-													{minimum_value => $self->minimum_value},
-													{enum_value => $self->enum_value},
-													{datatype => $self->datatype},
-													{article_name => $self->article_name},
-													{service_instance_id => $self->service_instance_id});
-							
+							{maximum_value => $self->maximum_value},
+							{minimum_value => $self->minimum_value},
+							{enum_value => $self->enum_value},
+							{datatype => $self->datatype},
+							{article_name => $self->article_name},
+							{service_instance_id => $self->service_instance_id});
+	
 	return $insertid;
 }
 

===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/service_instance.pm,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- /home/repository/moby/moby-live/Perl/MOBY/service_instance.pm	2005/07/22 17:25:24	1.22
+++ /home/repository/moby/moby-live/Perl/MOBY/service_instance.pm	2005/07/22 19:16:40	1.23
@@ -216,12 +216,14 @@
 								      authority_uri => $self->authority_uri);
 	my $existing_service = shift(@$existing_services);
 	if ($existing_service->{servicename}) { # if service exists, then instantiate it from the database retrieval we just did
-		$self->service_instance_id( $existing_service->{'serviceid'} );
+		$self->servicename( $existing_service->{'servicename'} );
+		$self->authoritative( $existing_service->{'authoritative'} );
+		$self->service_instance_id( $existing_service->{'service_instance_id'} );
 		$self->category( $existing_service->{'category'} );
-		$self->service_type( $existing_service->{'servicetype'} );
+		$self->service_type( $existing_service->{'service_type_uri'} );
 		$self->url( $existing_service->{'url'} );
-		$self->contact_email( $existing_service->{'email'} );
-		$self->description( $existing_service->{'desc'} );
+		$self->contact_email( $existing_service->{'contact_email'} );
+		$self->description( $existing_service->{'description'} );
 		$self->authority( $existing_service->{'authURI'} );
 		$self->signatureURL( $existing_service->{'signatureURL'} );
 		$self->lsid( $existing_service->{'lsid'} );




More information about the MOBY-guts mailing list