git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1250 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
allo 19 years ago
parent ece2844385
commit d0d1855520

@ -62,6 +62,7 @@ public class Bookmarks_p {
int MAX_COUNT=10; //TODO: Changeable per Interface
String tag="";
int start=0;
Vector tagUrlHashes=null;
if(post != null){
if(post.containsKey("add")){ //add an Entry
@ -98,8 +99,11 @@ public class Bookmarks_p {
}
prop.put("tags", count);
count=0;
boolean viewTag=false;
if(!tag.equals("")){
it=switchboard.bookmarksDB.getTag(tag).iterator();
tagUrlHashes=switchboard.bookmarksDB.getTag(tag).getUrlHashes();
it=tagUrlHashes.iterator();
viewTag=true;
}else{
it=switchboard.bookmarksDB.bookmarkIterator(true);
}
@ -112,7 +116,11 @@ public class Bookmarks_p {
}
count=0;
while(count<MAX_COUNT && it.hasNext()){
bookmark=(Bookmark) it.next();
if(viewTag){
bookmark=switchboard.bookmarksDB.getBookmark((String)it.next());
}else{
bookmark=(Bookmark) it.next();
}
if(bookmark!=null){
prop.put("bookmarks_"+count+"_link", bookmark.getUrl());
prop.put("bookmarks_"+count+"_title", bookmark.getTitle());

@ -126,6 +126,7 @@ public class bookmarksDB {
ret.copyInto(string.split(","));
}else{
ret = new Vector();
ret.add(string);
}
return ret;
}
@ -239,9 +240,6 @@ public class bookmarksDB {
bookmarksDB.this.tagsTable.set(getTagName(), mem);
} catch (IOException e) {}
}
public Iterator iterator(){
return string2vector((String) this.mem.get(URL_HASHES)).iterator();
}
}
/**
* Subclass, which stores the bookmark

Loading…
Cancel
Save