NodeList noteNodes = page.getElementsByTagNameNS(OdfDocumentNamespace.PRESENTATION.getUri(), "notes");
if (noteNodes.getLength() > 0) {
PresentationNotesElement notePage = (PresentationNotesElement) noteNodes.item(0);
NodeList thumbnailList = notePage.getElementsByTagNameNS(OdfDocumentNamespace.DRAW.getUri(), "page-thumbnail");
if (thumbnailList.getLength() > 0) {
DrawPageThumbnailElement thumbnail = (DrawPageThumbnailElement) thumbnailList.item(0);
thumbnail.setDrawPageNumberAttribute(i + 1);
}
}
}
} catch (Exception e) {
Logger.getLogger(OdfPresentationDocument.class.getName()).log(Level.SEVERE, null, e);