Author: batosai
Date: 2008-09-08 15:26:45 +0000 (Mon, 08 Sep 2008)
New Revision: 22566

Modified:
   trunk/plugins/WoT/src/plugins/WoT/IdentityParser.java
Log:
Keep building the trust tree with not yet fetched identities until I figure out 
a way to do it after they are fetched and parsed.

Modified: trunk/plugins/WoT/src/plugins/WoT/IdentityParser.java
===================================================================
--- trunk/plugins/WoT/src/plugins/WoT/IdentityParser.java       2008-09-08 
15:11:14 UTC (rev 22565)
+++ trunk/plugins/WoT/src/plugins/WoT/IdentityParser.java       2008-09-08 
15:26:45 UTC (rev 22566)
@@ -83,11 +83,11 @@
                                else if (elt_name.equals("trust")) {

                                        Identity trustee;
+                                       int value = 
Integer.parseInt(attrs.getValue("value"));
+                                       String comment = 
attrs.getValue("comment");
+                                       
                                        try{
                                                trustee = Identity.getByURI(db, 
attrs.getValue("uri"));
-                                               int value = 
Integer.parseInt(attrs.getValue("value"));
-                                               String comment = 
attrs.getValue("comment");
-               
                                                identity.setTrust(db, trustee, 
value, comment);
                                        }
                                        catch (UnknownIdentityException e) {
@@ -96,6 +96,7 @@

                                                trustee = new 
Identity(attrs.getValue("uri"), "Not found yet...", "false", "test");
                                                db.store(trustee);
+                                               identity.setTrust(db, trustee, 
value, comment);
                                                fetcher.fetch(trustee); 
                                        }



Reply via email to