Author: swatig0
Date: 2007-08-18 18:17:55 +0000 (Sat, 18 Aug 2007)
New Revision: 14791

Modified:
   trunk/plugins/XMLSpider/XMLSpider.java
Log:
XMLSpider with titles

Modified: trunk/plugins/XMLSpider/XMLSpider.java
===================================================================
--- trunk/plugins/XMLSpider/XMLSpider.java      2007-08-18 18:04:33 UTC (rev 
14790)
+++ trunk/plugins/XMLSpider/XMLSpider.java      2007-08-18 18:17:55 UTC (rev 
14791)
@@ -128,7 +128,7 @@
  * directory where the generated indices are stored. 
  * Needs to be created before it can be used
  */
-       public static final String DEFAULT_INDEX_DIR = "myindex2/";
+       public static final String DEFAULT_INDEX_DIR = "myindex/";
        /**
         * Lists the allowed mime types of the fetched page. 
         */
@@ -565,8 +565,10 @@
                                uriElement.setAttribute("id", x.toString());
                                fileElement.setAttribute("id", x.toString());
                                
fileElement.setAttribute("key",(idUris.get(id)).toString());
-                               
fileElement.setAttribute("uriTitle",(titlesOfIds.get(id)).toString());
-                       
+                               if(titlesOfIds.containsKey(id))
+                               
fileElement.setAttribute("title",(titlesOfIds.get(id)).toString());
+                               else 
+                                       
fileElement.setAttribute("title",(idUris.get(id)).toString());
                        //                              try{
 //                             FileWriter outp = new FileWriter("titles",true);
 //                             outp.write("title = 
"+(titlesOfIds.get(id)).toString());


Reply via email to