[MOBY-guts] biomoby commit
Eddie Kawas
kawas at pub.open-bio.org
Thu Jul 28 15:24:42 UTC 2005
kawas
Thu Jul 28 11:24:42 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-serv3918/org/biomoby/registry/rdfagent/verifier
Modified Files:
DataMngr.java
Log Message:
Fixed some bugs.
Added some statements to help me fix other bugs very soon.
Added some logic that I think is necessary for proper functionality.
moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier DataMngr.java,1.9,1.10
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/DataMngr.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/DataMngr.java 2005/07/26 23:06:25 1.9
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/registry/rdfagent/verifier/DataMngr.java 2005/07/28 15:24:41 1.10
@@ -206,7 +206,6 @@
Hashtable servOut, String servname, String authURI, String signURL) {
Connection con = DBConnector.getConnection();
-
String servName = "";
String cat = "moby";
String url = "";
@@ -245,7 +244,6 @@
Object ob = num.nextElement();
Object val = servSign.get(ob);
- //System.out.println(ob+" = "+val);
if (ob.equals("category")) {
cat = val.toString();
}
@@ -283,9 +281,8 @@
}
ServSignature signature = getServSignature(servname, signURL);
-
servInstId = signature.getServInstId();
-
+ //TODO make sure that the fields are updated
if (servInstId == 0) {
int authId = getAuthIdByAuthURI(authuri);
@@ -313,7 +310,7 @@
// "+Constants.MB_MAIL_SERVER);
/*
* if (Constants.MB_MAIL_SERVER != null |
- * Constants.MB_MAIL_SERVER.equals("")) { String to =
+ * !Constants.MB_MAIL_SERVER.equals("")) { String to =
* DataMngr.getContactEmail(signURL);
* Communicator.sendMail(to,Constants.SP_SUBJECT,msg,Constants.MB_FROM); //
* send message to the service provider - that service was
@@ -325,31 +322,38 @@
} else {
if (!cat.equals(signature.getCategory())
- | !url.equals(signature.getUrl())
- | !email.equals(signature.getEmail())
- | !desc.equals(signature.getDescription())
- | !stype.equals(signature.getServiceType())
- | !authoritative.equals(signature.getAuthoritative())
- | !authuri.equals(authURI)) {
+ || !url.equals(signature.getUrl())
+ || !email.equals(signature.getEmail())
+ || !desc.equals(signature.getDescription())
+ || !stype.equals(signature.getServiceType())
+ || !authoritative.equals(signature.getAuthoritative())
+ || !authuri.equals(authURI)) {
+ //TODO
+ Log.info("Updating the service '" + servName +"' since the RDF document has been modified.");
if (signatureURL.equals("NNN")) {
- int res = updSign(servName, cat, stype, authuri, url,
+ Log.info("sig == NNN" + signURL);
+ Log.info("<servName,cat,stype,authuri,url,email,desc,authoritative,signURL>=<"+servName+","+cat+","+stype+","+authuri+","+url+","+email+","+desc+","+authoritative+","+signURL+">");
+ int res = updSign(servName, cat, stype, authuri, url,
email, desc, authoritative, signURL);
if (res == 1) {
- // Report.doWrite("------The service instance
- // <"+servName+"> was updated ");
- // Report.add("------The service instance <"+servName+">
- // was updated ");
+ Report.doWrite("------The service instance<"+servName+"> was updated ");
+ Report.add("------The service instance <"+servName+">was updated ");
+ } else {
+ Report.doWrite("------The service instance<"+servName+"> was not updated");
+ Report.add("------The service instance <"+servName+">was not updated ");
}
} else {
+ Log.info("sig != NNN");
int res = updSign(servName, cat, stype, authuri, url,
email, desc, authoritative, signatureURL);
if (res == 1) {
- // Report.doWrite("------The service instance
- // <"+servName+"> was updated ");
- // Report.add("------The service instance <"+servName+">
- // was updated ");
+ Report.doWrite("------The service instance <"+servName+"> was updated ");
+ Report.add("------The service instance <"+servName+">was updated ");
+ } else {
+ Report.doWrite("------The service instance <"+servName+"> was not updated ");
+ Report.add("------The service instance <"+servName+">was not updated ");
}
}
}
@@ -368,7 +372,7 @@
while (num1.hasMoreElements()) {
Object ob = num1.nextElement();
Object val = servInp.get(ob);
- //System.out.println(ob+" = "+val );
+ Log.info("INPUTS <ob=val>:"+ob+" = "+val );
String simcol = (ob.toString()).substring(0, 6); // a hashtable name
if (simcol.equals("secinp")) { // if it's a Secondary input
@@ -522,7 +526,7 @@
Object ob = numout.nextElement();
Object val = servOut.get(ob);
String simcol = (ob.toString()).substring(0, 6);
-
+ Log.info("OUTPUTS <ob=val>:"+ob+" = "+val );
if (simcol.equals("colout")) {
co += 1;
Report.doWrite(" ");
@@ -547,6 +551,7 @@
Report.doWrite("Simple output " + so);
Report.add("Simple output " + so + ":");
+ //TODO bug #13 here?
if (delsout == 0) {
delRow("simple_output", servInstId); // delete from
// simple_output table
@@ -571,7 +576,7 @@
col_art = null;
}
}
- if (ob1.equals("article_name")) {
+ if (ob1.equals("articleName")) {
art = simple.get(ob1).toString();
if (art.equals(" ")) {
art = null;
@@ -600,9 +605,13 @@
obt = null;
nst = null;
}
+ // TODO bug #11 here - fixed
if (simcol.equals("simout")) {
insIntoSimpleOutput(new Integer(servInstId), art, obt, nst,
null);
+ art = null;
+ obt=null;
+ nst=null;
}
if (colOutId != null) {
Report.doWrite("collection_output_id: " + colOutId);
@@ -1333,6 +1342,8 @@
signature.setAuthoritative(authoritative);
String description = rs.getString(8);
signature.setDescription(description);
+ signature.setServiceName(servName);
+ signature.setSignatureURL(signURL);
}
} catch (SQLException e) {
More information about the MOBY-guts
mailing list