package de.ddb.pdc.metadata;

/**
 * Aggregates the metadata of an item from the DDB.
 */
public class DDBItem {
  private String id;
  private String author;
  private String title;
  private String subtitle;
  private String imageUrl;
  private String media;
  private String category;
  private String type;

  /**
   * Creates a new DDBItem.
   *
   * @param id item ID in the DDB databse
   */
  public DDBItem(String id) {
    this.id = id;
  }

  /**
   * Returns the item assigned to the item by the DDB.
   */
  public String getId() {
    return id;
  }

  void setId(String id) {
    this.id = id;
  }

  /**
   * Returns the author of the work represented by the item.
   */
  public String getAuthor() {
    return author;
  }

  void setAuthor(String author) {
    this.author = author;
  }

  /**
   * Returns the title of the work represented by the item.
   */
  public String getTitle() {
    return title;
  }

  void setTitle(String title) {
    this.title = title;
  }

  /**
   * Returns the subtitle (if any) of the work represented by the item.
   * If the work has no subtitle, null is returned.
   */
  public String getSubtitle() {
    return subtitle;
  }

  void setSubtitle(String subtitle) {
    this.subtitle = subtitle;
  }

  /**
   * Returns the URL of an thumbnail image that can be used when displaying
   * the item in a user interface. The URL is always absolute.
   */
  public String getImageUrl() {
    return imageUrl;
  }

  void setImageUrl(String imageUrl) {
    this.imageUrl = imageUrl;
  }

  public String getMedia() {
    return media;
  }

  void setMedia(String media) {
    this.media = media;
  }

  public String getCategory() {
    return category;
  }

  void setCategory(String category) {
    this.category = category;
  }

  public String getType() {
    return type;
  }

  void setType(String type) {
    this.type = type;
  }

}

@@ -23,16 +23,108 @@
 adata;%0A%0A
+import java.util.ArrayList;%0Aimport java.util.Calendar;%0Aimport java.util.GregorianCalendar;%0A%0A
 /**%0A * A
@@ -223,33 +223,8 @@
 id;%0A
-  private String author;%0A
   pr
@@ -372,16 +372,156 @@
  type;%0A%0A
+  //metadata%0A  private ArrayList%3CAuthor%3E authors;%0A  private String institute;%0A  private Calendar publishedYear = new GregorianCalendar();%0A %0A
   /**%0A  
@@ -639,32 +639,76 @@
   this.id = id;%0A
+    this.authors = new ArrayList%3CAuthor%3E();%0A
   %7D%0A%0A  /**%0A   * 
@@ -862,200 +862,8 @@
  %7D%0A%0A
-  /**%0A   * Returns the author of the work represented by the item.%0A   */%0A  public String getAuthor() %7B%0A    return author;%0A  %7D%0A%0A  void setAuthor(String author) %7B%0A    this.author = author;%0A  %7D%0A%0A
   /*
@@ -1912,24 +1912,24 @@
 ing type) %7B%0A
-
     this.typ
@@ -1943,10 +1943,482 @@
 e;%0A  %7D%0A%0A
+  public ArrayList%3CAuthor%3E getAuthors() %7B%0A    return authors;%0A  %7D%0A%0A  public void setAuthor(Author author) %7B%0A    this.authors.add(author);%0A  %7D%0A%0A  public String getInstitute() %7B%0A    return institute;%0A  %7D%0A%0A  public void setInstitute(String institute) %7B%0A    this.institute = institute;%0A  %7D%0A%0A  public Calendar getPublishedYear() %7B%0A    return publishedYear;%0A  %7D%0A%0A  public void setPublishedYear(int publishedYear) %7B%0A    this.publishedYear.set(Calendar.YEAR, publishedYear);%0A  %7D%0A%0A
 %7D%0A

add new fields for answerer