/**
* Returns the low level notes object for the given
* slide, as found from the supplied slide reference
*/
public CTNotesSlide getNotes(CTSlideIdListEntry slide) throws IOException, XmlException {
PackageRelationshipCollection notes;
try {
PackagePart slidePart =
getTargetPart(getCorePart().getRelationship(slide.getId2()));
notes = slidePart.getRelationshipsByType(NOTES_RELATION_TYPE);
} catch(InvalidFormatException e) {
throw new IllegalStateException(e);
}
if(notes.size() == 0) {
// No notes for this slide
return null;
}
if(notes.size() > 1) {
throw new IllegalStateException("Expecting 0 or 1 notes for a slide, but found " + notes.size());
}
try {
PackagePart notesPart =
getTargetPart(notes.getRelationship(0));
NotesDocument notesDoc =
NotesDocument.Factory.parse(notesPart.getInputStream());
return notesDoc.getNotes();
} catch(InvalidFormatException e) {