edu.northwestern.at.wordhoard.tools.cm
Class Author

java.lang.Object
  extended by edu.northwestern.at.wordhoard.tools.cm.Author

public class Author
extends java.lang.Object

An author.


Constructor Summary
Author(org.w3c.dom.Element el)
          Creates a new author from an element.
Author(java.util.Map headerValueMap)
          Creates a new author from a header value map.
Author(java.lang.String name)
          Creates a new author with just a name.
 
Method Summary
 boolean contains(Author other)
          Returns true if this author "contains" some other author.
 boolean equals(java.lang.Object o)
          Returns true if this object equals some other object.
 java.lang.String getBirthYear()
          Gets the author's birth year.
 java.lang.String getDeathYear()
          Gets the author's death year.
 java.lang.String getEarliestWorkYear()
          Gets the author's earliest work year.
 java.lang.String getLatestWorkYear()
          Gets the author's latest work year.
 java.lang.String getName()
          Gets the author's name.
 void write(XMLWriter out)
          Writes the author to the WordHoard authors.xml file.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Author

public Author(java.util.Map headerValueMap)
Creates a new author from a header value map.

Parameters:
headerValueMap - Header value map. Maps the names of WordHoard author items to their values.

Author

public Author(org.w3c.dom.Element el)
Creates a new author from an element. #param el WordHoard author element.


Author

public Author(java.lang.String name)
Creates a new author with just a name.

Parameters:
name - Author name.
Method Detail

getName

public java.lang.String getName()
Gets the author's name.

Returns:
The author's name.

getBirthYear

public java.lang.String getBirthYear()
Gets the author's birth year.

Returns:
The author's birth year, or null.

getDeathYear

public java.lang.String getDeathYear()
Gets the author's death year.

Returns:
The author's death year, or null.

getEarliestWorkYear

public java.lang.String getEarliestWorkYear()
Gets the author's earliest work year.

Returns:
The author's earlies work year, or null.

getLatestWorkYear

public java.lang.String getLatestWorkYear()
Gets the author's latest work year.

Returns:
The author's latest work year.

write

public void write(XMLWriter out)
Writes the author to the WordHoard authors.xml file.

Parameters:
out - XMLWriter for WordHoard authors.xml file.

contains

public boolean contains(Author other)
Returns true if this author "contains" some other author.

Parameters:
other - The other author.
Returns:
True if the two authors have the same name, and any other non-null attributes defined by the other author are the same as in this author.

equals

public boolean equals(java.lang.Object o)
Returns true if this object equals some other object.

Overrides:
equals in class java.lang.Object
Parameters:
o - The other object.
Returns:
True if this object equals the other object.