Author: batosai
Date: 2008-05-29 17:09:26 +0000 (Thu, 29 May 2008)
New Revision: 20136

Modified:
   trunk/apps/WoT/src/plugins/WoT/IdentityInserter.java
   trunk/apps/WoT/src/plugins/WoT/OwnIdentity.java
   trunk/apps/WoT/src/plugins/WoT/WoT.java
Log:
Fix insert URI.

Modified: trunk/apps/WoT/src/plugins/WoT/IdentityInserter.java
===================================================================
--- trunk/apps/WoT/src/plugins/WoT/IdentityInserter.java        2008-05-29 
14:44:16 UTC (rev 20135)
+++ trunk/apps/WoT/src/plugins/WoT/IdentityInserter.java        2008-05-29 
17:09:26 UTC (rev 20136)
@@ -99,9 +99,13 @@
                try {
                        exportFile = identity.exportToXML(db, new 
File("exportWOT"));
                        clientPut = new 
ClientPutDiskDir(identity.getFullInsertURI(), "WoTinserter", 
exportFile.getParent());
+                       clientPut.setDefaultName("identity.xml");
                        fcp.sendMessage(clientPut);
                        //TODO Cleanly handle errors. ATM, we don't even listen 
to them !

+                       System.out.println(exportFile.getParent());
+                       System.out.println(identity.getFullInsertURI());
+                       
                        identity.setEdition(identity.getEdition() + 1);
                        db.store(identity);
                }

Modified: trunk/apps/WoT/src/plugins/WoT/OwnIdentity.java
===================================================================
--- trunk/apps/WoT/src/plugins/WoT/OwnIdentity.java     2008-05-29 14:44:16 UTC 
(rev 20135)
+++ trunk/apps/WoT/src/plugins/WoT/OwnIdentity.java     2008-05-29 17:09:26 UTC 
(rev 20136)
@@ -112,7 +112,7 @@
        public File exportToXML(ObjectContainer db, File dir ) throws 
ParserConfigurationException, TransformerConfigurationException, 
TransformerException, FileNotFoundException, IOException {

                // Create the output file
-               File outputFile = new File(dir, "export.xml");
+               File outputFile = new File(dir, "identity.xml");
                BufferedOutputStream fos = new BufferedOutputStream(new 
FileOutputStream(outputFile));
                StreamResult resultStream = new StreamResult(fos);

@@ -168,7 +168,7 @@
         * Returns the full insert URI (with edition number and path)
         */
        public String getFullInsertURI() {
-               return getInsertURI() + "wot/" + edition + "/identity.xml";
+               return getInsertURI() + "wot-" + edition;
                //return getInsertURI() + "wot-" + edition + "/identity.xml";
        }


Modified: trunk/apps/WoT/src/plugins/WoT/WoT.java
===================================================================
--- trunk/apps/WoT/src/plugins/WoT/WoT.java     2008-05-29 14:44:16 UTC (rev 
20135)
+++ trunk/apps/WoT/src/plugins/WoT/WoT.java     2008-05-29 17:09:26 UTC (rev 
20136)
@@ -140,7 +140,7 @@
         */
        public static void main(String[] args) {
                try {
-                       WoT wot = new WoT("freenet", 9481);
+                       WoT wot = new WoT("localhost", 9481);
                        wot.testDrive();

                        Thread.sleep(5000);


Reply via email to