Package org.openmeetings.app.data.file.dto

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


    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 ( 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);
        }
             
View Full Code Here


    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);
        }
             
View Full Code Here

TOP

Related Classes of org.openmeetings.app.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.