[MOBY-guts] biomoby commit

Nina Opushneva nopushneva at pub.open-bio.org
Tue Feb 8 23:32:15 UTC 2005


nopushneva
Tue Feb  8 18:32:14 EST 2005
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory pub.open-bio.org:/tmp/cvs-serv26754

Modified Files:
	Central.pm 
Log Message:
add the RDFagent call

moby-live/Perl/MOBY Central.pm,1.147,1.148
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Central.pm,v
retrieving revision 1.147
retrieving revision 1.148
diff -u -r1.147 -r1.148
--- /home/repository/moby/moby-live/Perl/MOBY/Central.pm	2005/02/06 21:58:35	1.147
+++ /home/repository/moby/moby-live/Perl/MOBY/Central.pm	2005/02/08 23:32:14	1.148
@@ -1234,6 +1234,26 @@
 		 $OUTPUTS,      $SECONDARY,   $signatureURL
 	  )
 	  = &_registerServicePayload( $payload );
+
+#--------RDFagent call----------------------------------------
+
+if (defined $signatureURL){
+  my $ch = 0;
+  my $i;
+  foreach $i ($serviceName, $serviceType, $AuthURI, $contactEmail, $URL, $desc, $Category){
+       if (defined $i){
+          $ch = 1;
+        }        
+  }
+
+  if ($ch == 0){
+    my $rez = system("/export/home/nina/rdfagent/run-RDFagent ".$signatureURL);
+
+    return &_error("The RDFagent call was successful.  Report will send to you by E-mail","") if ($rez == 0);
+    return &_error("Some problem with a connection or RDF model building","") if ($rez != 0);
+  }
+}
+#---------------------------------------------------------------
 	$authoritativeService = defined( $authoritativeService ) ? 1 : 0;
 	my $error;
 	$error .= "missing serviceName \n" unless defined $serviceName;
@@ -1368,15 +1388,16 @@
 			""
 		);
 	}
-	use MOBY::Client::Central;
-	my $services         = MOBY::Client::Central::_parseServices( '', '', $si );
-	my $service_instance = shift @{$services};
-	my $storage          = new RDF::Core::Storage::Memory;
-	my $model            = new RDF::Core::Model( Storage => $storage );
-	my $RDF_MODEL = MOBY::RDF::ServiceInstanceRDF->new(
-										   model            => $model,
-										   service_instance => $service_instance );
-	my $RDF_XML = $RDF_MODEL->serialize;
+#	use MOBY::Client::Central;
+#	my $services         = MOBY::Client::Central::_parseServices( '', '', $si );
+#	my $service_instance = shift @{$services};
+#	my $storage          = new RDF::Core::Storage::Memory;
+#	my $model            = new RDF::Core::Model( Storage => $storage );
+#	my $RDF_MODEL = MOBY::RDF::ServiceInstanceRDF->new(
+										   #model            => $model,
+										   #service_instance => $service_instance );
+#	my $RDF_XML = $RDF_MODEL->serialize;
+        my $RDF_XML = "";
 	return &_success( "Registration successful",
 					  $SVC->service_instance_id, $RDF_XML );
 }
@@ -3757,4 +3778,39 @@
 	my $XSD;
 	return $XSD;
 }
+
+#=head2 runRDFagent
+
+#Title     :	runRDFagent
+#Usage     :	$MOBY->runRDFagent($inputXML)
+#Function  :	run RDFagent for signatureURL
+#Returns   :	
+#Args      :	
+      
+#inputXML  :
+#<runRDFagent>
+# <RDFfileURL>rdfFileURL</RDFfileURL>
+#</runRDFagent>
+			      
+#=cut
+		
+#sub _runRDFagent{
+		   
+# my ($self)=@_; 
+# my $Parser = new XML::DOM::Parser;
+# my $doc = $Parser->parse($payload);
+# my $Object      = $doc->getDocumentElement();
+# my $obj         = $Object->nodeName;
+# return undef unless ( $obj eq 'runRDFagent' );
+# my $url = &_nodeTextContent( $Object, "RDFfileURL" );
+# my $l = $url->getLength;
+# if ($l == 0){
+#   print "The RDFagent can't run without a parameter";
+# }else{
+#   system("/home/rdfagent/run-RDFagent"+ $url);
+#   print "The RDFagent run saccessfully. A result will sent to you by E-mail";
+# }
+										
+}
 1;
+`




More information about the MOBY-guts mailing list