@@ -0,0 +1,1140 @@
+package nl.tudelft.pl2016gr2.dao;%0A%0Aimport nl.tudelft.pl2016gr2.model.Annotation;%0A%0Aimport java.util.Collection;%0Aimport java.util.HashMap;%0A%0A/**%0A * A DAO for the %7B@link Annotation%7D class.%0A *%0A * %3Cp%3E%0A *  Typical usage:%0A *  %3Cpre%3E%0A *  %7B@code%0A *%0A *    File file = new File(%22some/path/to/file%22);%0A *    AnnotationReader reader = new AnnotationReader(file);%0A *    AnnotationDAO dao = new AnnotationDAO(reader.read());%0A *    ...%0A *    dao.getAllAnnotations();%0A *    ...%0A *    dao.getAnnotation(%22TKK-01-0075%22);%0A *  %7D%0A *  %3C/pre%3E%0A * %3C/p%3E%0A * %3Cp%3E%0A *   Feel free to extend this class for ways to access metadata in an efficient way.%0A * %3C/p%3E%0A */%0A@SuppressWarnings(%22AbbreviationAsWordInName%22)%0Apublic class AnnotationDAO %7B%0A%0A  private HashMap%3CString, Annotation%3E annotations = new HashMap%3C%3E();%0A%0A  public AnnotationDAO(Collection%3CAnnotation%3E annotations) %7B%0A    annotations.forEach(annotation -%3E%0A        this.annotations.put(annotation.specimenID, annotation)%0A    );%0A  %7D%0A%0A  public Annotation getAnnotation(String speciesId) %7B%0A    return annotations.get(speciesId);%0A  %7D%0A%0A  public Collection%3CAnnotation%3E getAllAnnotations() %7B%0A    return annotations.values();%0A  %7D%0A%0A%7D%0A

Add AnnotationDAO