[MOBY-guts] biomoby commit

Eddie Kawas kawas at dev.open-bio.org
Mon Nov 26 22:49:04 UTC 2007


kawas
Mon Nov 26 17:49:03 EST 2007
Update of /home/repository/moby/moby-live/Perl/MOBY/RDF/Ontologies
In directory dev.open-bio.org:/tmp/cvs-serv18115/RDF/Ontologies

Modified Files:
	Services.pm 
Log Message:
split up findservice calls that want all services into many calls by service provider.
moby-live/Perl/MOBY/RDF/Ontologies Services.pm,1.4,1.5
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/RDF/Ontologies/Services.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- /home/repository/moby/moby-live/Perl/MOBY/RDF/Ontologies/Services.pm	2007/08/23 17:48:28	1.4
+++ /home/repository/moby/moby-live/Perl/MOBY/RDF/Ontologies/Services.pm	2007/11/26 22:49:03	1.5
@@ -118,10 +118,24 @@
 	my $authURI = $hash->{authURI}     || '';
 	my $name    = $hash->{serviceName} || '';
 	my $prettyPrint = $hash->{prettyPrint} ? $hash->{prettyPrint} : 'yes';
+	my $services = [];
+	my $RegObject;
+	
+	if ($name ne '' or $authURI ne '') {
+		my $moby = MOBY::Client::Central->new();
+		( $services, $RegObject ) =
+	  		$moby->findService( authURI => $authURI, serviceName => $name );
+	  
+	} else {
+		my $moby = MOBY::Client::Central->new();
+        my ( @URIS ) = $moby->retrieveServiceProviders();
+        foreach my $provider (@URIS) {
+                my ( $instances, $RegObject ) =
+                        $moby->findService( authURI => $provider );
+                push @$services, @$instances;
+        }
 
-	my $moby = MOBY::Client::Central->new();
-	my ( $services, $RegObject ) =
-	  $moby->findService( authURI => $authURI, serviceName => $name );
+	}
 	my $xml = $self->_createRDFModel( \@$services );
 	return new MOBY::RDF::Utils->prettyPrintXML( { xml => $xml } )
 	  unless $prettyPrint eq 'no';




More information about the MOBY-guts mailing list