Examples of XSLFPowerPointExtractor


Examples of org.apache.poi.xslf.extractor.XSLFPowerPointExtractor

    }
    if(corePart.getContentType().equals(XWPFRelation.DOCUMENT.getContentType())) {
      return new XWPFWordExtractor(pkg);
    }
    if(corePart.getContentType().equals(XSLFSlideShow.MAIN_CONTENT_TYPE)) {
      return new XSLFPowerPointExtractor(pkg);
    }
    throw new IllegalArgumentException("No supported documents found in the OOXML package");
  }
View Full Code Here

Examples of org.apache.poi.xslf.extractor.XSLFPowerPointExtractor

         if (is.available() == 0)
         {
            return "";
         }
        
         XSLFPowerPointExtractor ppe;
         try
         {
            ppe = new XSLFPowerPointExtractor(OPCPackage.open(is));
         }
         catch (IOException e)
         {
            throw new DocumentReadException("Can't open presentation.", e);
         }
         catch (OpenXML4JRuntimeException e)
         {
            throw new DocumentReadException("Can't open presentation.", e);
         }
         catch (OpenXML4JException e)
         {
            throw new DocumentReadException("Can't open presentation.", e);
         }
         catch (XmlException e)
         {
            throw new DocumentReadException("Can't open presentation.", e);
         }
         return ppe.getText(true, true);
      }
      finally
      {
         if (is != null)
         {
View Full Code Here

Examples of org.apache.poi.xslf.extractor.XSLFPowerPointExtractor

            corePart.getContentType().equals(XWPFRelation.MACRO_TEMPLATE_DOCUMENT.getContentType()) ) {
      return new XWPFWordExtractor(pkg);
    }

    if(corePart.getContentType().equals(XSLFSlideShow.MAIN_CONTENT_TYPE)) {
      return new XSLFPowerPointExtractor(pkg);
    }
    throw new IllegalArgumentException("No supported documents found in the OOXML package (found "+corePart.getContentType()+")");
  }
View Full Code Here

Examples of org.apache.poi.xslf.extractor.XSLFPowerPointExtractor

         if (is.available() == 0)
         {
            return "";
         }
        
         final XSLFPowerPointExtractor ppe;
         try
         {
            ppe = SecurityHelper.doPrivilegedExceptionAction(new PrivilegedExceptionAction<XSLFPowerPointExtractor>()
            {
               public XSLFPowerPointExtractor run() throws Exception
               {
                  return new XSLFPowerPointExtractor(OPCPackage.open(is));
               }
            });
         }
         catch (PrivilegedActionException pae)
         {
            Throwable cause = pae.getCause();
            if (cause instanceof IOException)
            {
               throw new DocumentReadException("Can't open presentation.", cause);
            }
            else if (cause instanceof OpenXML4JRuntimeException)
            {
               throw new DocumentReadException("Can't open presentation.", cause);
            }
            else if (cause instanceof OpenXML4JException)
            {
               throw new DocumentReadException("Can't open presentation.", cause);
            }
            else if (cause instanceof XmlException)
            {
               throw new DocumentReadException("Can't open presentation.", cause);
            }
            else if (cause instanceof RuntimeException)
            {
               throw (RuntimeException)cause;
            }
            else
            {
               throw new RuntimeException(cause);
            }
         }
         return SecurityHelper.doPrivilegedAction(new PrivilegedAction<String>()
         {
            public String run()
            {
               return ppe.getText(true, true);
            }
         });
      }
      finally
      {
View Full Code Here

Examples of org.apache.poi.xslf.extractor.XSLFPowerPointExtractor

       }

       // Is it XSLF?
       for(XSLFRelation rel : XSLFPowerPointExtractor.SUPPORTED_TYPES) {
          if(corePart.getContentType().equals(rel.getContentType())) {
             return new XSLFPowerPointExtractor(pkg);
          }
       }

       throw new IllegalArgumentException("No supported documents found in the OOXML package (found "+corePart.getContentType()+")");
  }
View Full Code Here

Examples of org.apache.poi.xslf.extractor.XSLFPowerPointExtractor

    }
    if(corePart.getContentType().equals(XWPFRelation.DOCUMENT.getContentType())) {
      return new XWPFWordExtractor(pkg);
    }
    if(corePart.getContentType().equals(XSLFSlideShow.MAIN_CONTENT_TYPE)) {
      return new XSLFPowerPointExtractor(pkg);
    }
    throw new IllegalArgumentException("No supported documents found in the OOXML package");
  }
View Full Code Here

Examples of org.apache.poi.xslf.extractor.XSLFPowerPointExtractor

            corePart.getContentType().equals(XWPFRelation.MACRO_TEMPLATE_DOCUMENT.getContentType()) ) {
      return new XWPFWordExtractor(pkg);
    }

    if(corePart.getContentType().equals(XSLFSlideShow.MAIN_CONTENT_TYPE)) {
      return new XSLFPowerPointExtractor(pkg);
    }
    throw new IllegalArgumentException("No supported documents found in the OOXML package (found "+corePart.getContentType()+")");
  }
View Full Code Here

Examples of org.apache.poi.xslf.extractor.XSLFPowerPointExtractor

            corePart.getContentType().equals(XWPFRelation.MACRO_TEMPLATE_DOCUMENT.getContentType()) ) {
      return new XWPFWordExtractor(pkg);
    }

    if(corePart.getContentType().equals(XSLFSlideShow.MAIN_CONTENT_TYPE)) {
      return new XSLFPowerPointExtractor(pkg);
    }
                if(corePart.getContentType().equals(XSLFSlideShow.MACRO_CONTENT_TYPE)) {
                        return new XSLFPowerPointExtractor(pkg);
                }
                if(corePart.getContentType().equals(XSLFSlideShow.MACRO_TEMPLATE_CONTENT_TYPE)) {
                        return new XSLFPowerPointExtractor(pkg);
                }
                if(corePart.getContentType().equals(XSLFSlideShow.PRESENTATIONML_CONTENT_TYPE)) {
                        return new XSLFPowerPointExtractor(pkg);
                }
                if(corePart.getContentType().equals(XSLFSlideShow.PRESENTATIONML_TEMPLATE_CONTENT_TYPE)) {
                        return new XSLFPowerPointExtractor(pkg);
                }
                if(corePart.getContentType().equals(XSLFSlideShow.PRESENTATION_MACRO_CONTENT_TYPE)) {
                        return new XSLFPowerPointExtractor(pkg);
                }

    throw new IllegalArgumentException("No supported documents found in the OOXML package (found "+corePart.getContentType()+")");
  }
View Full Code Here

Examples of org.apache.poi.xslf.extractor.XSLFPowerPointExtractor

    }
    if(corePart.getContentType().equals(XWPFDocument.MAIN_CONTENT_TYPE)) {
      return new XWPFWordExtractor(pkg);
    }
    if(corePart.getContentType().equals(XSLFSlideShow.MAIN_CONTENT_TYPE)) {
      return new XSLFPowerPointExtractor(pkg);
    }
    throw new IllegalArgumentException("No supported documents found in the OOXML package");
  }
View Full Code Here

Examples of org.apache.poi.xslf.extractor.XSLFPowerPointExtractor

       }

       // Is it XSLF?
       for(XSLFRelation rel : XSLFPowerPointExtractor.SUPPORTED_TYPES) {
          if(corePart.getContentType().equals(rel.getContentType())) {
             return new XSLFPowerPointExtractor(pkg);
          }
       }

       throw new IllegalArgumentException("No supported documents found in the OOXML package (found "+corePart.getContentType()+")");
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.