net.sf.zekr.engine.bookmark
Class BookmarkSet
java.lang.Object
net.sf.zekr.engine.bookmark.BookmarkSet
public class BookmarkSet
- extends java.lang.Object
Constructor Summary |
BookmarkSet(java.lang.String filePath)
This constructor will not load all the bookmark set file. |
BookmarkSet(java.lang.String id,
boolean isNew)
This constructor is used for creating new bookmark sets. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
BookmarkSet
public BookmarkSet(java.lang.String filePath)
- This constructor will not load all the bookmark set file. A call to
load()
is needed first. Hence,
this class is in fact lazy-load.
- Parameters:
filePath
-
BookmarkSet
public BookmarkSet(java.lang.String id,
boolean isNew)
- This constructor is used for creating new bookmark sets. ID of the bookmark in addition to a boolean value is
provided in order to differ it from the other c'tor. However,
isNew
parameter is ignored.
This method will load blank bookmark, and the bookmark will not be saved until a call to save()
be
performed.
Note that after a call to this, bookmark would be loaded as well as initialized, hence there is no need more to
call load()
.
- Parameters:
id
- bookmark idisNew
- a dummy parameter
load
public void load()
- Should be called only once. Nothing happens if this method be called more.
save
public void save()
throws BookmarkSaveException
- Throws:
BookmarkSaveException
save
public void save(org.w3c.dom.Document target)
throws BookmarkSaveException
- Throws:
BookmarkSaveException
getBookmarksItems
public java.util.List getBookmarksItems()
getAuthor
public java.lang.String getAuthor()
setAuthor
public void setAuthor(java.lang.String author)
getDescription
public java.lang.String getDescription()
setDescription
public void setDescription(java.lang.String description)
getDirection
public java.lang.String getDirection()
setDirection
public void setDirection(java.lang.String direction)
getName
public java.lang.String getName()
setName
public void setName(java.lang.String name)
getLanguage
public java.lang.String getLanguage()
setLanguage
public void setLanguage(java.lang.String language)
getCreateDate
public java.util.Date getCreateDate()
setCreateDate
public void setCreateDate(java.util.Date createDate)
getModifyDate
public java.util.Date getModifyDate()
setModifyDate
public void setModifyDate(java.util.Date modifyDate)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getId
public java.lang.String getId()
nextItemId
public java.lang.String nextItemId()
remove
public void remove()
throws ZekrBaseException
- Throws:
ZekrBaseException
changeIdIfPossible
public void changeIdIfPossible(java.lang.String newId)
throws ZekrBaseException
- Throws:
ZekrBaseException
getIdAndName
public java.lang.String[] getIdAndName()
isLoaded
public boolean isLoaded()
getFile
public java.io.File getFile()
getXmlDocument
public org.w3c.dom.Document getXmlDocument()