Package org.exoplatform.services.document

Examples of org.exoplatform.services.document.DocumentReadException


      catch (PrivilegedActionException pae)
      {
         Throwable cause = pae.getCause();
         if (cause instanceof InvalidFormatException)
         {
            throw new DocumentReadException("Can't read properties from OOXML document", cause);
         }
         else if (cause instanceof OpenXML4JException)
         {
            throw new DocumentReadException("Can't read properties from OOXML document", cause);
         }
         else if (cause instanceof XmlException)
         {
            throw new DocumentReadException("Can't read properties from OOXML document", cause);
         }
         else if (cause instanceof RuntimeException)
         {
            throw (RuntimeException)cause;
         }
View Full Code Here


               }
            });
         }
         catch (IOException e)
         {
            throw new DocumentReadException("Can't open message.", e);
         }
         catch (OpenXML4JRuntimeException e)
         {
            throw new DocumentReadException("Can't open message.", e);
         }

         final XWPFWordExtractor extractor = new XWPFWordExtractor(doc);
         text = SecurityHelper.doPrivilegedAction(new PrivilegedAction<String>()
         {
View Full Code Here

                     {
                        pdDocument.decrypt("");
                     }
                     catch (InvalidPasswordException e)
                     {
                        throw new DocumentReadException("The pdf document is encrypted.", e);
                     }
                     catch (org.apache.pdfbox.exceptions.CryptographyException e)
                     {
                        throw new DocumentReadException(e.getMessage(), e);
                     }
                  }

                  PDDocumentCatalog catalog = pdDocument.getDocumentCatalog();
                  PDMetadata meta = catalog.getMetadata();
View Full Code Here

         {
            wb = new HSSFWorkbook(is);
         }
         catch (IOException e)
         {
            throw new DocumentReadException("Can't open spreadsheet.", e);
         }
         for (int sheetNum = 0; sheetNum < wb.getNumberOfSheets(); sheetNum++)
         {
            HSSFSheet sheet = wb.getSheetAt(sheetNum);
            if (sheet != null)
View Full Code Here

               }
            });
         }
         catch (IOException e)
         {
            throw new DocumentReadException("Can't open spreadsheet.", e);
         }
         catch (OpenXML4JRuntimeException e)
         {
            return builder.toString();
         }
View Full Code Here

         return contentHandler.getContent();
      }
      catch (ParserConfigurationException e)
      {
         throw new DocumentReadException(e.getMessage(), e);
      }
      catch (SAXException e)
      {
         throw new DocumentReadException(e.getMessage(), e);
      }
      finally
      {
         if (is != null)
            try
View Full Code Here

         return metaHandler.getProperties();

      }
      catch (ParserConfigurationException e)
      {
         throw new DocumentReadException(e.getMessage(), e);
      }
      catch (SAXException e)
      {
         throw new DocumentReadException(e.getMessage(), e);
      }
      finally
      {
         if (is != null)
            try
View Full Code Here

         refined_text = (text != null) ? text : ""; // delete(text);

      }
      catch (ParserException e)
      {
         throw new DocumentReadException(e.getMessage(), e);
      }
      finally
      {
         if (is != null)
         {
View Full Code Here

                     parser.parse(is, handler, metadata, context);
                     return handler.toString();
                  }
                  catch (SAXException e)
                  {
                     throw new DocumentReadException(e.getMessage(), e);
                  }
                  catch (TikaException e)
                  {
                     throw new DocumentReadException(e.getMessage(), e);
                  }
               }
               finally
               {
                  try
View Full Code Here

                     parser.parse(is, handler, metadata, context);
                     return handler.toString();
                  }
                  catch (SAXException e)
                  {
                     throw new DocumentReadException(e.getMessage(), e);
                  }
                  catch (TikaException e)
                  {
                     throw new DocumentReadException(e.getMessage(), e);
                  }
               }
               finally
               {
                  try
View Full Code Here

TOP

Related Classes of org.exoplatform.services.document.DocumentReadException

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.