/** * @see org.opencms.search.extractors.I_CmsTextExtractor#extractText(java.io.InputStream, java.lang.String) */ @Override public I_CmsExtractionResult extractText(InputStream in) throws Exception { return extractText(in, new OfficeParser()); } }
textExtractor = CmsExtractorPdf.getExtractor(); } else if (path1.endsWith(".doc") && path2.endsWith(".doc")) { textExtractor = CmsExtractorMsOfficeOLE2.getExtractor(); } else if (path1.endsWith(".xls") && path2.endsWith(".xls")) { textExtractor = CmsExtractorMsOfficeOLE2.getExtractor(); } else if (path1.endsWith(".rtf") && path2.endsWith(".rtf")) { textExtractor = CmsExtractorRtf.getExtractor(); } else if (path1.endsWith(".ppt") && path2.endsWith(".ppt")) { textExtractor = CmsExtractorMsOfficeOLE2.getExtractor();
/** * Returns the raw text content of a given vfs resource containing MS Word data.<p> * * @see org.opencms.search.documents.I_CmsSearchExtractor#extractContent(CmsObject, CmsResource, CmsSearchIndex) */ public I_CmsExtractionResult extractContent(CmsObject cms, CmsResource resource, CmsSearchIndex index) throws CmsIndexException, CmsException { logContentExtraction(resource, index); CmsFile file = readFile(cms, resource); try { return CmsExtractorMsOfficeOLE2.getExtractor().extractText(file.getContents()); } catch (Throwable e) { throw new CmsIndexException( Messages.get().container(Messages.ERR_TEXT_EXTRACTION_1, resource.getRootPath()), e); } }
textExtractor = CmsExtractorPdf.getExtractor(); } else if (path1.endsWith(".doc") && path2.endsWith(".doc")) { textExtractor = CmsExtractorMsOfficeOLE2.getExtractor(); } else if (path1.endsWith(".xls") && path2.endsWith(".xls")) { textExtractor = CmsExtractorMsOfficeOLE2.getExtractor(); } else if (path1.endsWith(".rtf") && path2.endsWith(".rtf")) { textExtractor = CmsExtractorRtf.getExtractor(); } else if (path1.endsWith(".ppt") && path2.endsWith(".ppt")) { textExtractor = CmsExtractorMsOfficeOLE2.getExtractor();