title: JAX-B annotations for elements that inherit from a parent
body: <p>When adding <code>JAX-B</code> Java annotations for Java classes - if I have a parent <strong>Class Entry</strong>, with two children, <strong>Book</strong> and <strong>JournalArticle</strong>,</p>
  
  <p>Would I add these annotations for all three classes:</p>
  
  <pre><code>@XmlAccessorType(XmlAccessType.FIELD)
  @XmlRootElement
  </code></pre>
  
  <p>ie: </p>
  
  <pre><code>@XmlSeeAlso({au.com.library.Book.class, au.com.library.JournalArticle.class})
  @XmlAccessorType(XmlAccessType.FIELD)
  @XmlRootElement
  public abstract class Entry implements Serializable{
  
  
  private static final long serialVersionUID = -1895155325179947581L;
  
  @XmlElement(name="title")
  protected String title;
  @XmlElement(name="author")
  protected String author;
  @XmlElement(name="year")
  protected int year;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>@XmlAccessorType(XmlAccessType.FIELD)
  @XmlRootElement
  public class Book extends Entry {
  
  @XmlElement(name="edition")
  private String edition;
  @XmlElement(name="publisher")
  private String publisher;
  @XmlElement(name="placeOfPublication")
  private String placeOfPub;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>@XmlAccessorType(XmlAccessType.FIELD)
  @XmlRootElement
  public class JournalArticle extends Entry {
  
  @XmlElement(name="journalTitle")
  private String journalTitle;
  @XmlElement(name="volume")
  private String volume;
  @XmlElement(name="issue")
  private String issue;
  @XmlElement(name="pageNumbers")
  private String pgNumbers;
  </code></pre>