|
|
@ -580,11 +580,13 @@ public class bookmarksDB {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
public int importFromBookmarks(yacyURL baseURL, InputStreamReader input, String tag, boolean importPublic){
|
|
|
|
public int importFromBookmarks(yacyURL baseURL, InputStreamReader input, String tag, boolean importPublic){
|
|
|
|
|
|
|
|
|
|
|
|
int importCount = 0;
|
|
|
|
int importCount = 0;
|
|
|
|
|
|
|
|
|
|
|
|
HashMap links=new HashMap();
|
|
|
|
HashMap links=new HashMap();
|
|
|
|
Iterator it;
|
|
|
|
Iterator it;
|
|
|
|
String url,title;
|
|
|
|
String title;
|
|
|
|
|
|
|
|
yacyURL url;
|
|
|
|
Bookmark bm;
|
|
|
|
Bookmark bm;
|
|
|
|
Set tags=listManager.string2set(tag); //this allow multiple default tags
|
|
|
|
Set tags=listManager.string2set(tag); //this allow multiple default tags
|
|
|
|
try {
|
|
|
|
try {
|
|
|
@ -598,12 +600,14 @@ public class bookmarksDB {
|
|
|
|
} catch (IOException e) {}
|
|
|
|
} catch (IOException e) {}
|
|
|
|
it=links.keySet().iterator();
|
|
|
|
it=links.keySet().iterator();
|
|
|
|
while(it.hasNext()){
|
|
|
|
while(it.hasNext()){
|
|
|
|
url=(String) it.next();
|
|
|
|
// url=(String) it.next();
|
|
|
|
|
|
|
|
url= (yacyURL) it.next();
|
|
|
|
title=(String) links.get(url);
|
|
|
|
title=(String) links.get(url);
|
|
|
|
|
|
|
|
serverLog.logInfo("BOOKMARKS", "links.get(url)");
|
|
|
|
if(title.equals("")){//cannot be displayed
|
|
|
|
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.setProperty(Bookmark.BOOKMARK_TITLE, title);
|
|
|
|
bm.setTags(tags);
|
|
|
|
bm.setTags(tags);
|
|
|
|
bm.setPublic(importPublic);
|
|
|
|
bm.setPublic(importPublic);
|
|
|
|