|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.norvelle.textcite.model.AbstractCitationContainer
org.norvelle.textcite.model.Book
public class Book
Book: Represents a publication (book for short) in the CiteBook database. Maintains a bibliographic identifier that should match that which the user's bibliographic software assigns to the same publication (e.g BibTex identifier)
Nested Class Summary | |
---|---|
static class |
Book.BookConverter
BookConverter is an inner class used for serializing Book objects via XStream. |
Field Summary |
---|
Fields inherited from class org.norvelle.textcite.model.AbstractCitationContainer |
---|
citations, citationsIds |
Constructor Summary | |
---|---|
protected |
Book()
A parameterless constructor, so that we can recreate a serialized Book from XML. |
|
Book(java.lang.String n)
Construct a brand-new Book object from scratch. |
|
Book(java.lang.String n,
Author a,
java.lang.String yp,
java.lang.String bid)
Construct a brand-new Book object from scratch, but supplying an Author object. |
Method Summary | |
---|---|
boolean |
authorHasBook()
Test whether this book is present in its Author's list of books |
void |
destroy()
This routine eliminates the Citations that belong to this Book, and unregisters the Book from its associated Author. |
Author |
getAuthor()
|
java.lang.String |
getBibId()
|
java.util.HashMap<java.lang.Integer,Citation> |
getCitations()
|
int |
getId()
|
java.lang.String |
getName()
|
int |
getObjectCount()
|
BookOutlineTree |
getOutline()
|
java.lang.String |
getUniqueIdentifier()
Returns a String that uniquely identifies this Book |
java.lang.String |
getUniqueName()
Returns a name that includes that of the author, in order to distinguish the book from others with the same name but by other authors |
java.lang.String |
getYearPublished()
|
boolean |
hasOutline()
|
void |
registerCitation(Citation citation)
Mark a Citation object as belong to this Book. |
void |
restoreCitationReferences()
This method restores the citations HashMap, filling it with references to the Citations indicated in the citationIds Vector. |
void |
setAuthor(Author newAuthor)
|
void |
setBibId(java.lang.String bid)
|
void |
setName(java.lang.String n)
Change the name of the book. |
void |
setName(java.lang.String n,
boolean register)
Used internally to update a book name when a book by the same name exists, but by a different author. |
void |
setOutline(BookOutlineTree o)
|
void |
setYearPublished(java.lang.String yp)
|
java.lang.String |
toString()
|
void |
unregisterCitation(Citation citation)
Dissasociate a given Citation from this Book. |
Methods inherited from class org.norvelle.textcite.model.AbstractCitationContainer |
---|
saveCitationReferences |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Book(java.lang.String n) throws DuplicateRecordException
n
- The name of the book to be added
DuplicateRecordException
public Book(java.lang.String n, Author a, java.lang.String yp, java.lang.String bid) throws DuplicateRecordException
a
- The Author object to be assigned to this Book.n
- The name of the Book to be createdyp
- The year of publicationbid
- The bibliographic ID code to be assigned.
DuplicateRecordException
protected Book()
Method Detail |
---|
public void registerCitation(Citation citation)
citation
- The Citation object to be addedpublic void unregisterCitation(Citation citation)
citation
- public void destroy()
public int getId()
public boolean hasOutline()
public java.lang.String getName()
public java.lang.String getUniqueName()
public void setName(java.lang.String n) throws DuplicateRecordException
n
- The new name for the book
DuplicateRecordException
- Thrown in case of a name clashpublic void setName(java.lang.String n, boolean register) throws DuplicateRecordException
n
- The new nameregister
- False if we shouldn't call registerBook() in the AuthorCollection.
DuplicateRecordException
public Author getAuthor()
public java.lang.String getYearPublished()
public void setYearPublished(java.lang.String yp)
yp
- The year published to set.public java.lang.String getBibId()
public void setBibId(java.lang.String bid)
bid
- The bibId to set.public void setAuthor(Author newAuthor) throws DuplicateRecordException
DuplicateRecordException
public BookOutlineTree getOutline()
public void setOutline(BookOutlineTree o)
o
- The BookOutlineTree to set as the book's outlinepublic java.util.HashMap<java.lang.Integer,Citation> getCitations()
public boolean authorHasBook()
public int getObjectCount()
public java.lang.String toString()
toString
in class java.lang.Object
public void restoreCitationReferences()
restoreCitationReferences
in class AbstractCitationContainer
public java.lang.String getUniqueIdentifier()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |