@@ -0,0 +1,1522 @@
+package net.sf.jabref.logic.pdf;%0A%0Aimport java.io.File;%0Aimport java.io.IOException;%0Aimport java.net.URI;%0Aimport java.util.HashMap;%0Aimport java.util.List;%0A%0Aimport org.apache.pdfbox.pdmodel.PDDocument;%0Aimport org.apache.pdfbox.pdmodel.PDPage;%0Aimport org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation;%0A%0Apublic class PdfCommentImporter %7B%0A%0A    private List pdfPages;%0A    private PDPage page;%0A    public PdfCommentImporter() %7B%0A%0A    %7D%0A%0A    /**%0A     * Imports the comments from a pdf specified by its URI%0A     * @param pathToPDF the URI specifying the document%0A     * @return a hasmap with the unique name as key and the notes content as value%0A     */%0A    public HashMap%3CString, String%3E importNotes(final URI pathToPDF)%7B%0A%0A        PDDocument pdf;%0A        HashMap%3CString, String%3E annotationsMap = new HashMap%3C%3E();%0A        try %7B%0A            pdf = importPdfFile(pathToPDF);%0A%0A            pdfPages = pdf.getDocumentCatalog().getAllPages();%0A            for(int i = 0; i %3C pdfPages.size(); i++)%7B%0A                page = (PDPage) pdfPages.get(i);%0A                for(PDAnnotation annotation : page.getAnnotations())%7B%0A                    annotationsMap.put(annotation.getAnnotationName(), annotation.getContents());%0A                %7D%0A            %7D%0A%0A        %7D catch (IOException e) %7B%0A            e.printStackTrace();%0A        %7D%0A        return annotationsMap;%0A    %7D%0A%0A    private PDDocument importPdfFile(final URI pathToPDF) throws IOException %7B%0A        File file = new File(pathToPDF);%0A        return PDDocument.load(file);%0A    %7D%0A%7D%0A

Add importer class to extract pdf file comments