Package org.exoplatform.services.document

Examples of org.exoplatform.services.document.DocumentReaderService


         if (!parent.isNodeType("dc:elementSet"))
         {
            parent.addMixin("dc:elementSet");
         }

         DocumentReaderService readerService =
            (DocumentReaderService)((ExoContainer)ctx.get("exocontainer"))
               .getComponentInstanceOfType(DocumentReaderService.class);
         if (readerService == null)
         {
            throw new IllegalArgumentException("No DocumentReaderService configured for current container");
         }

         Properties props = new Properties();
         try
         {
            props = readerService.getDocumentReader(mimeType).getProperties(data);
         }
         catch (HandlerNotFoundException e)
         {
            LOG.debug("Binary value reader error, content by path " + property.getPath() + ", property id "
               + property.getData().getIdentifier() + " : " + e.getMessage());
View Full Code Here


         if (!parent.isNodeType("dc:elementSet"))
         {
            parent.addMixin("dc:elementSet");
         }

         DocumentReaderService readerService =
            (DocumentReaderService)((ExoContainer)ctx.get("exocontainer"))
               .getComponentInstanceOfType(DocumentReaderService.class);
         if (readerService == null)
            throw new NullPointerException("No DocumentReaderService configured for current container");

         Properties props = new Properties();
         try
         {
            props = readerService.getDocumentReader(mimeType).getProperties(data);
         }
         catch (HandlerNotFoundException e)
         {
            log.debug(e.getMessage());
         }
View Full Code Here

         if (!parent.isNodeType("dc:elementSet"))
         {
            parent.addMixin("dc:elementSet");
         }

         DocumentReaderService readerService =
            (DocumentReaderService)((ExoContainer)ctx.get("exocontainer"))
               .getComponentInstanceOfType(DocumentReaderService.class);
         if (readerService == null)
            throw new NullPointerException("No DocumentReaderService configured for current container");

         Properties props = new Properties();
         try
         {
            props = readerService.getDocumentReader(mimeType).getProperties(data);
         }
         catch (HandlerNotFoundException e)
         {
            log.debug(e.getMessage());
         }
View Full Code Here

            parent.removeMixin("dc:elementSet");
         }

         parent.addMixin("dc:elementSet");

         DocumentReaderService readerService =
            (DocumentReaderService)((ExoContainer)ctx.get("exocontainer"))
               .getComponentInstanceOfType(DocumentReaderService.class);
         if (readerService == null)
            throw new NullPointerException("No DocumentReaderService configured for current container");

         Properties props = new Properties();
         try
         {
            props = readerService.getDocumentReader(mimeType).getProperties(data);
         }
         catch (HandlerNotFoundException e)
         {
            log.debug(e.getMessage());
         }
View Full Code Here

      cont.setProperty("jcr:data", fis);
      root.save();

      fis.close();
      fis = new FileInputStream(url.getFile());
      DocumentReaderService extr =
         (DocumentReaderService)session.getContainer().getComponentInstanceOfType(DocumentReaderService.class);

      DocumentReader dreader = extr.getDocumentReader("application/excel");
      assertNotNull(dreader);

      System.out.println(dreader);

      if (dreader instanceof MSExcelDocumentReader)
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();

               System.out.println("------------------ SEARCH TEXT RESULTS START-----------------------");
               System.out.println(found_text);
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();
               System.out.println("------------------ SEARCH TEXT RESULTS START-----------------------");
               System.out.println(found_text);
               System.out.println("------------------ SEARCH TEXT RESULTS END-----------------------");
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();
               System.out.println("------------------ SEARCH TEXT RESULTS START-----------------------");
               System.out.println(found_text);
               System.out.println("------------------ SEARCH TEXT RESULTS END-----------------------");
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();
               System.out.println("------------------ SEARCH TEXT RESULTS START-----------------------");
               System.out.println(found_text);
               System.out.println("------------------ SEARCH TEXT RESULTS END-----------------------");
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();
               System.out.println("------------------ SEARCH TEXT RESULTS START-----------------------");
               System.out.println(found_text);
               System.out.println("------------------ SEARCH TEXT RESULTS END-----------------------");
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.