[MOBY-guts] biomoby commit

Eddie Kawas kawas at pub.open-bio.org
Fri Jun 17 19:25:32 UTC 2005


kawas
Fri Jun 17 15:25:31 EDT 2005
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier
In directory pub.open-bio.org:/tmp/cvs-serv13972/org/biomoby/registry/rdfagent/verifier

Modified Files:
	DataMngr.java 
Log Message:
Added the logic that deals with null signature urls (makes one up)
Added a line that deletes secondary input information when deleting services (not sure why it was missing).
Eddie

moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier DataMngr.java,1.6,1.7
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/DataMngr.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/DataMngr.java	2005/06/13 18:17:42	1.6
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/DataMngr.java	2005/06/17 19:25:31	1.7
@@ -56,9 +56,22 @@
 				String rdfAddr = rs.getString(2);
 				int authorityID = rs.getInt(3);
 				if (rdfAddr == null) {
-					//TODO - get the list of service names so that we can
+					//TODO - make this code more efficient! - maybe perform one sql call instead of many
 					// update the signatureURL field using the service name and authority id
-
+					String bogusSigURL = "http://invalidURL.com/author/"+ authorityID + "/" + servName +".xml";
+					String updateSQLString = "UPDATE service_instance " +
+											 "SET signatureURL='"+ bogusSigURL +"' " +
+											 "WHERE authority_id=" + authorityID + " and servicename='" + servName +"'";
+					PreparedStatement preparedStatement = null;
+					try {
+						Connection updateCon = DBConnector.getConnection();
+						preparedStatement = updateCon.prepareStatement(updateSQLString);
+						int resultSet = preparedStatement.executeUpdate();
+						Log.info(resultSet + ": Updated the signatureURL field of the authority with id #" + authorityID + " to be " + bogusSigURL+".");
+					} catch (SQLException e) {
+						Log.severe("Could not update SignatureURL field with a bogus signatureURL.\n" +e.getMessage());
+					}
+					
 				} else {
 					if (rdfAddr.equals(lastAddr)) {
 						servNames.append("," + servName);
@@ -618,6 +631,7 @@
 		// service_instance
 		delRow("simple_input", servInstId); // delete from table simple_input
 		delRow("simple_output", servInstId); // delete from table simple_output
+		delRow("secondary_input", servInstId); //TODO - should this line be here?
 		delCollectionMember("input", servInstId);
 		delCollectionMember("output", servInstId);
 		delRow("collection_input", servInstId); // delete from table
@@ -645,6 +659,7 @@
 		// service_instance
 		delRow("simple_input", servInstId); // delete from table simple_input
 		delRow("simple_output", servInstId); // delete from table simple_output
+		delRow("secondary_input", servInstId); //TODO - should this line be here?
 		delCollectionMember("input", servInstId);
 		delCollectionMember("output", servInstId);
 		delRow("collection_input", servInstId); // delete from table
@@ -685,6 +700,7 @@
 				if (rez == 1) {
 					del_serv.addElement(servName);
 				}
+				delRow("secondary_input", servInstId); //TODO - should this line be here?
 				delRow("simple_input", servInstId); // delete from table
 				// simple_input
 				delRow("simple_output", servInstId); // delete from table




More information about the MOBY-guts mailing list