Package org.apache.openmeetings.data.file.dto

Examples of org.apache.openmeetings.data.file.dto.LibraryPresentation


public class LoadLibraryPresentation {
  private static final Logger log = Red5LoggerFactory.getLogger(LoadLibraryPresentation.class, OpenmeetingsVariables.webAppRootKey);
 
  public static LibraryPresentation parseLibraryFileToObject(File file){
    try {
      LibraryPresentation lPresentation = new LibraryPresentation();
     
          SAXReader reader = new SAXReader();
          Document document = reader.read( new FileInputStream(file) );
         
          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(createListObjectLibraryByFileDocument(item));
         
        } else if (nodeVal.equals("pdfDocument")){
         
          lPresentation.setPdfDocument(createListObjectLibraryByFileDocument(item));
         
        } else if (nodeVal.equals("swfDocument")){
         
          lPresentation.setSwfDocument(createListObjectLibraryByFileDocument(item));
         
        } else if (nodeVal.equals("thumbs")) {
         
          lPresentation.setThumbs(createListObjectLibraryByFileDocumentThumbs(item));
         
        } else {
          throw new Exception("Unkown Library type: "+nodeVal);
        }
             
View Full Code Here

TOP

Related Classes of org.apache.openmeetings.data.file.dto.LibraryPresentation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.