net.sourceforge.pavlov.library
Interface AbstractLibrary

All Known Implementing Classes:
Library

public interface AbstractLibrary

An interface to be implemented by classes that can act as a Pavlov Library, i.e. a set of AbstractBooks with AbstractChapters that can be accesses by name.


Method Summary
 void addBook(AbstractBook b)
          Adds an AbstractBook to this library.
 void deleteBook(String bookName)
          Removes the named AbstractBook from this library.
 AbstractBook getBook(String bkName)
          Returns the named Book.
 Collection<AbstractBook> getBookCollection()
          Deprecated.  
 Collection<AbstractBook> getBooksReadOnly()
          Returns all books as a read-only Collection.
 Chapter getChapter(String bkName, String cpName)
          Returns the named Chapter from the named book.
 void populateTree(DefaultMutableTreeNode top)
          Displays books and chapters as a tree.
 

Method Detail

getChapter

Chapter getChapter(String bkName,
                   String cpName)
Returns the named Chapter from the named book. Null if either doesn't exist.

Parameters:
bkName - a String value
cpName - a String value
Returns:
a Chapter value

getBookCollection

@Deprecated
Collection<AbstractBook> getBookCollection()
Deprecated. 

Returns all books as a Collection.

Returns:
a Collection value

getBooksReadOnly

Collection<AbstractBook> getBooksReadOnly()
Returns all books as a read-only Collection.

Returns:
a Collection value

populateTree

void populateTree(DefaultMutableTreeNode top)
Displays books and chapters as a tree.

Parameters:
top - a DefaultMutableTreeNode value

getBook

AbstractBook getBook(String bkName)
Returns the named Book. Null if either doesn't exist.

Parameters:
bkName - a String value
Returns:
a Book value

addBook

void addBook(AbstractBook b)
Adds an AbstractBook to this library.

Parameters:
b - an AbstractBook value

deleteBook

void deleteBook(String bookName)
Removes the named AbstractBook from this library.

Parameters:
bookName - a String value