org.norvelle.textcite.model
Class CiteBook

java.lang.Object
  extended by org.norvelle.textcite.model.CiteBook

public class CiteBook
extends java.lang.Object


Nested Class Summary
static class CiteBook.CiteBookConverter
          CiteBookConverter is an inner class used for serializing CiteBook objects via XStream.
 
Field Summary
static java.lang.String FILENAME_PROPERTY
          Strings used to identify property entries in the Properties object of the CiteBook.
static java.lang.String VERSION_PROPERTY
           
 
Constructor Summary
CiteBook()
          CiteBook constructor.
 
Method Summary
 void clear()
          Empty the CiteBook of all contents.
 void doPostLoad()
          Perform any cleanup necessary after loading a new CiteBook from the disk
 AuthorCollection getAuthorList()
          Property getter for retrieving the AuthorCollection.
 BookCollection getBookList()
          Property getter for retrieving the BookCollection.
 CategoryTree getCategoryTree()
          Property getter for retrieving the CategoryList.
 CitationCollection getCitationList()
          Property getter for retrieving the CitationCollection.
 int getObjectCount()
           
 java.lang.String getProperty(java.lang.String pname)
          Property getter for retrieving a property value from the Properties collection.
 boolean needsSave()
          Return the saved-status of the CiteBook.
 void notifyListeners(boolean value)
          Notify any SaveFlagChangeListeners of the current value.
 void registerSaveFlagListener(SaveFlagChangeListener l)
          Register a SaveFlagChangeListener
 void setProperty(java.lang.String pname, java.lang.String pvalue)
          Property setter for setting a property value in the Properties collection
 void setSaveFlag()
          Set the needsSaveFlag to true... called whenever a modification is made to the CiteBook.
 void unsetSaveFlag()
          Set the needsSaveFlag to false... called whenever the CiteBook is saved.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILENAME_PROPERTY

public static final java.lang.String FILENAME_PROPERTY
Strings used to identify property entries in the Properties object of the CiteBook.

See Also:
Constant Field Values

VERSION_PROPERTY

public static final java.lang.String VERSION_PROPERTY
See Also:
Constant Field Values
Constructor Detail

CiteBook

public CiteBook()
CiteBook constructor. Initializes the various lists it owns (books, authors, citations, categories).

Method Detail

notifyListeners

public void notifyListeners(boolean value)
Notify any SaveFlagChangeListeners of the current value.


doPostLoad

public void doPostLoad()
Perform any cleanup necessary after loading a new CiteBook from the disk


clear

public void clear()
Empty the CiteBook of all contents.


getBookList

public BookCollection getBookList()
Property getter for retrieving the BookCollection.


getAuthorList

public AuthorCollection getAuthorList()
Property getter for retrieving the AuthorCollection.


getCitationList

public CitationCollection getCitationList()
Property getter for retrieving the CitationCollection.


getCategoryTree

public CategoryTree getCategoryTree()
Property getter for retrieving the CategoryList.


getObjectCount

public int getObjectCount()
Returns:
Returns the total number of objects contained in the CiteBook

getProperty

public java.lang.String getProperty(java.lang.String pname)
Property getter for retrieving a property value from the Properties collection.


setProperty

public void setProperty(java.lang.String pname,
                        java.lang.String pvalue)
Property setter for setting a property value in the Properties collection


needsSave

public boolean needsSave()
Return the saved-status of the CiteBook. Returns true if the CiteBook needs saving, i.e. has been changed and not saved.


setSaveFlag

public void setSaveFlag()
Set the needsSaveFlag to true... called whenever a modification is made to the CiteBook.


unsetSaveFlag

public void unsetSaveFlag()
Set the needsSaveFlag to false... called whenever the CiteBook is saved.


registerSaveFlagListener

public void registerSaveFlagListener(SaveFlagChangeListener l)
Register a SaveFlagChangeListener