Author: apfelmaennchen Date: 2008-01-25 20:22:36 +0100 (Fri, 25 Jan 2008) New Revision: 4401
Modified: trunk/source/de/anomic/data/bookmarksDB.java Log: fixed import Netscape Bookmarks Modified: trunk/source/de/anomic/data/bookmarksDB.java =================================================================== --- trunk/source/de/anomic/data/bookmarksDB.java 2008-01-25 13:49:57 UTC (rev 4400) +++ trunk/source/de/anomic/data/bookmarksDB.java 2008-01-25 19:22:36 UTC (rev 4401) @@ -580,30 +580,34 @@ } } public int importFromBookmarks(yacyURL baseURL, InputStreamReader input, String tag, boolean importPublic){ + int importCount = 0; HashMap links=new HashMap(); Iterator it; - String url,title; + String title; + yacyURL url; Bookmark bm; Set tags=listManager.string2set(tag); //this allow multiple default tags try { //load the links - htmlFilterContentScraper scraper = new htmlFilterContentScraper(baseURL); + htmlFilterContentScraper scraper = new htmlFilterContentScraper(baseURL); //OutputStream os = new htmlFilterOutputStream(null, scraper, null, false); Writer writer= new htmlFilterWriter(null,null,scraper, null, false); serverFileUtils.copy(input,writer); writer.close(); - links = (HashMap) scraper.getAnchors(); + links = (HashMap) scraper.getAnchors(); } catch (IOException e) {} it=links.keySet().iterator(); while(it.hasNext()){ - url=(String) it.next(); + // url=(String) it.next(); + url= (yacyURL) it.next(); title=(String) links.get(url); + serverLog.logInfo("BOOKMARKS", "links.get(url)"); if(title.equals("")){//cannot be displayed - title=url; + title=url.toString(); } - bm=new Bookmark(url); + bm=new Bookmark(url.toString()); bm.setProperty(Bookmark.BOOKMARK_TITLE, title); bm.setTags(tags); bm.setPublic(importPublic); _______________________________________________ YaCy-svn mailing list YaCy-svn@lists.berlios.de https://lists.berlios.de/mailman/listinfo/yacy-svn