|
||||||||||
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.Author
public class Author
Nested Class Summary | |
---|---|
static class |
Author.AuthorConverter
AuthorConverter is an inner class used for serializing Author objects via XStream. |
Field Summary |
---|
Fields inherited from class org.norvelle.textcite.model.AbstractCitationContainer |
---|
citations, citationsIds |
Constructor Summary | |
---|---|
protected |
Author()
A parameterless constructor, so that we can recreate a serialized Author from XML. |
|
Author(java.lang.String name)
Construct the Author object using the name given. |
Method Summary | |
---|---|
void |
destroy()
Removes all Books that were associated with this Author (and therefore any of the Citations associated with the Author). |
java.util.HashMap<java.lang.Integer,Book> |
getBooks()
|
java.util.HashMap<java.lang.Integer,Citation> |
getCitations()
|
int |
getId()
|
java.lang.String |
getLastName()
Returns the last name of the author, if the author name is formatted in Last, First fashion; otherwise, returns the entire name. |
java.lang.String |
getName()
|
void |
recreateObjectReferences()
After loading a CiteBook, instead of having references to the Citations for this Author, we will have a list of IDs, which we need to turn into real object references. |
void |
registerBook(Book book)
Marks the given Book object as being by the current Author |
void |
registerCitation(Citation citation)
Registers the given Citation as being by the current Author. |
void |
setName(java.lang.String name)
Changing the name of an Author involves resorting the AuthorCollection, so we remove the Author from the list, then re-add it to make it sort properly under its new name. |
java.lang.String |
toString()
|
void |
unregisterBook(Book book)
Dissasociates a Book object from this Author. |
void |
unregisterCitation(Citation citation)
Dissasociates a Citation object from the current Author. |
Methods inherited from class org.norvelle.textcite.model.AbstractCitationContainer |
---|
restoreCitationReferences, saveCitationReferences |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Author(java.lang.String name) throws DuplicateRecordException
name
- The name of the author this object represents.
DuplicateRecordException
protected Author()
Method Detail |
---|
public void registerCitation(Citation citation)
citation
- The Citation object to be associated with this Author.public void unregisterCitation(Citation citation)
citation
- The Citation that needs to be dissociated.public void registerBook(Book book)
book
- The Book to be associated with this Author.public void unregisterBook(Book book)
book
- The Book object to be dissasociated.public void destroy()
public java.lang.String getName()
public java.lang.String getLastName()
public void setName(java.lang.String name) throws DuplicateRecordException
name
- The new name of the Author.
DuplicateRecordException
public java.util.HashMap<java.lang.Integer,Book> getBooks()
public java.util.HashMap<java.lang.Integer,Citation> getCitations()
public int getId()
public java.lang.String toString()
toString
in class java.lang.Object
public void recreateObjectReferences()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |