[MOBY-guts] biomoby commit
Martin Senger
senger at pub.open-bio.org
Mon Nov 7 07:03:49 UTC 2005
senger
Mon Nov 7 02:03:49 EST 2005
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client
In directory pub.open-bio.org:/tmp/cvs-serv16438/src/main/org/biomoby/client
Modified Files:
CentralImpl.java
Log Message:
moby-live/Java/src/main/org/biomoby/client CentralImpl.java,1.31,1.32
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/06 16:23:49 1.31
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/CentralImpl.java 2005/11/07 07:03:49 1.32
@@ -1344,22 +1344,6 @@
String result =
(String)doCall ("registerService",
new Object[] { getRegisterServiceXML (service) });
-// "<registerService>" +
-// "<Category>" + service.getCategory() + "</Category>" +
-// "<serviceName>" + service.getName() + "</serviceName>" +
-// "<serviceType>" + service.getType() + "</serviceType>" +
-// "<authURI>" + service.getAuthority() + "</authURI>" +
-// "<signatureURL>" + service.getSignatureURL() + "</signatureURL>" +
-// "<URL>" + service.getURL() + "</URL>" +
-// "<contactEmail>" + service.getEmailContact() + "</contactEmail>" +
-// "<authoritativeService>" + (service.isAuthoritative() ? "1" : "0") + "</authoritativeService>" +
-// "<Description><![CDATA[" + service.getDescription() + "]]>" +
-// "</Description>" +
-// buildPrimaryInputTag (service) +
-// buildSecondaryInputTag (service) +
-// buildOutputTag (service) +
-// "</registerService>"
-// });
String[] registered = checkRegistration (result, service);
service.setId (registered [0]);
service.setRDF (registered [1]);
@@ -1371,9 +1355,22 @@
fileout.println (registered [1]);
fileout.close();
} catch (IOException e) {
- throw new MobyException ("Failed to save RDF in '" + fileRDF.getAbsolutePath() + "'. " +
- e.toString() +
- "\nReturned RDF:\n" + registered [1]);
+ StringBuffer buf = new StringBuffer (100);
+ buf.append ("Failed to save RDF in '");
+ buf.append (fileRDF.getAbsolutePath() + "'. ");
+ buf.append (e.toString());
+ try {
+ File tmpFile = File.createTempFile (service.getName() + "-", ".rdf");
+ PrintStream fileout = new PrintStream (new FileOutputStream (tmpFile));
+ fileout.println (registered [1]);
+ fileout.close();
+ buf.append ("\nReturned RDF file was therefore stored in: ");
+ buf.append (tmpFile.getAbsolutePath());
+ } catch (IOException e2) {
+ buf.append ("\nEven saving in a temporary file failed: ");
+ buf.append (e2.toString());
+ }
+ throw new MobyException (buf.toString());
}
}
}
More information about the MOBY-guts
mailing list