return instance;
}
public LibraryPresentation parseLibraryFileToObject(String filePath){
try {
LibraryPresentation lPresentation = new LibraryPresentation();
SAXReader reader = new SAXReader();
Document document = reader.read( new FileInputStream(filePath) );
Element root = document.getRootElement();
for ( @SuppressWarnings("unchecked")
Iterator<Element> i = root.elementIterator(); i.hasNext(); ) {
Element item = i.next();
log.debug(item.getName());
String nodeVal = item.getName();
//LinkedHashMap<String,Object> subMap = new LinkedHashMap<String,Object>();
//subMap.put("name", nodeVal);
if (nodeVal.equals("originalDocument")){
lPresentation.setOriginalDocument(this.createListObjectLibraryByFileDocument(item));
} else if (nodeVal.equals("pdfDocument")){
lPresentation.setPdfDocument(this.createListObjectLibraryByFileDocument(item));
} else if (nodeVal.equals("swfDocument")){
lPresentation.setSwfDocument(this.createListObjectLibraryByFileDocument(item));
} else if (nodeVal.equals("thumbs")) {
lPresentation.setThumbs(this.createListObjectLibraryByFileDocumentThumbs(item));
} else {
throw new Exception("Unkown Library type: "+nodeVal);
}