[MOBY-guts] biomoby commit

Eddie Kawas kawas at pub.open-bio.org
Fri Mar 24 17:52:38 UTC 2006


kawas
Fri Mar 24 12:52:38 EST 2006
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier
In directory pub.open-bio.org:/tmp/cvs-serv15307/org/biomoby/registry/rdfagent/verifier

Modified Files:
	Processor.java 
Log Message:
fixed a bug where the rdf is valid RDF, but doesnt contain a valid service description. This resulted in a null pointer exception.

moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier Processor.java,1.15,1.16
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/Processor.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/Processor.java	2006/03/23 19:10:31	1.15
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/Processor.java	2006/03/24 17:52:38	1.16
@@ -77,7 +77,7 @@
 				if (badURLs.containsKey(signatureURL)) {
 					Log.warning("The signature url, " + signatureURL + ", has already been"
 							+ newline + " processed and was invalid"
-							+ " for one reason or another.");
+							+ " for one reason or another." );
 
 					removeInvalidSignatureURLServiceFromRegistry(registryService, central,
 							"The service has an invalid signature url.", ((Integer) badURLs
@@ -116,7 +116,8 @@
 						// add the url to the bad list so that the hitlist
 						// doesnt grow by the number of services at the service
 						// description location
-						badURLs.put(signatureURL, connection.getBadUrlMap().get(signatureURL));
+						badURLs.put(signatureURL,
+								(connection.getBadUrlMap().get(signatureURL)));
 						// rdf is missing
 						removeInvalidSignatureURLService(registryService, central,
 								"The signature url was missing, or the rdf document was invalid.",
@@ -129,7 +130,8 @@
 
 						// this would happen if a url contained rdf but not
 						// current rdf
-						badURLs.put(signatureURL, connection.getBadUrlMap().get(signatureURL));
+						badURLs.put(signatureURL,
+								(connection.getBadUrlMap().get(signatureURL)));
 						// no services found in the document
 						removeInvalidSignatureURLService(registryService, central, "given, "
 								+ signatureURL + ", no service was found called "
@@ -589,10 +591,12 @@
 		if (enableServiceUpdates) {
 			// TODO keep track of the revision on the new service - change the
 			// revision to the one in the document
-			int code = removeChangedServiceFromRegistry(registryService, central, differences);
+			int code = removeChangedServiceFromRegistry(registryService, central, differences,
+					rdfService.getEmailContact());
 			if (code == 200) {
 				if (addServiceToRegistry(rdfService, central)) {
 					// service was added
+
 				} else {
 					// service was not added, so replace with old one?
 					if (!addServiceToRegistry(registryService, central)) {
@@ -746,7 +750,7 @@
 	 * remove a changed service
 	 */
 	private int removeChangedServiceFromRegistry(MobyService service, Central central,
-			String changes) {
+			String changes, String email) {
 
 		// create and optionally save the report
 		Report report = new Report(Constants.ADMIN_NAME, Constants.ADMIN_EMAIL,
@@ -768,7 +772,9 @@
 		}
 
 		if (sendMailOnChanged) {
-			sendMail(service, report);
+			MobyService ms = service;
+			ms.setEmailContact(email);
+			sendMail(ms, report);
 		}
 
 		Log.info("Service, (" + service.getName() + ", " + service.getAuthority()




More information about the MOBY-guts mailing list