Package org.exoplatform.services.document

Examples of org.exoplatform.services.document.DocumentReaderService


               {
                  mimeType = next.getProperty("jcr:mimeType").getString();
               }
               is = next.getProperty("jcr:data").getStream();
               StandaloneContainer scontainer = StandaloneContainer.getInstance();
               DocumentReaderService service_ =
                  (DocumentReaderService)scontainer.getComponentInstanceOfType(DocumentReaderService.class);
               assertNotNull("Can not create service_ a for indexing", world);
               String found_text = service_.getContentAsText(mimeType, is);
               assertNotNull("Can not create found_text for indexing", world);
               is.close();
            }
         }
      }
View Full Code Here


               {
                  mimeType = next.getProperty("jcr:mimeType").getString();
               }
               is = next.getProperty("jcr:data").getStream();
               StandaloneContainer scontainer = StandaloneContainer.getInstance();
               DocumentReaderService service_ =
                  (DocumentReaderService)scontainer.getComponentInstanceOfType(DocumentReaderService.class);
               assertNotNull("Can not create service_ a for indexing", world);
               String found_text = service_.getContentAsText(mimeType, is);
               assertNotNull("Can not create found_text for indexing", world);
               is.close();
            }
         }
      }
View Full Code Here

    * @throws IOException
    */
   private Properties extractMetaInfoProperties(Context ctx, Content content) throws IllegalArgumentException,
      RepositoryException, IOException, DocumentReadException, HandlerNotFoundException
   {
      DocumentReaderService readerService =
         (DocumentReaderService)((ExoContainer)ctx.get(InvocationContext.EXO_CONTAINER))
            .getComponentInstanceOfType(DocumentReaderService.class);

      if (readerService == null)
      {
         throw new IllegalArgumentException("No DocumentReaderService configured for current container");
      }

      Properties props = new Properties();
      props = readerService.getDocumentReader(content.mimeType).getProperties(content.stream);

      return props;
   }
View Full Code Here

TOP

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

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.