Package com.gentics.cr.lucene.indexer.transformer.pdf

Examples of com.gentics.cr.lucene.indexer.transformer.pdf.PDFContentTransformer


    query = query.rewrite(searcher.getIndexReader());
  }

  private Document getDocument(CRResolvableBean bean) throws Exception {
    //TRANSFORM BEAN
    ContentTransformer t = new PDFContentTransformer(config);
    t.processBean(bean);

    //CREATE DOCUMENT
    Document doc = new Document();
    Object value = bean.get("binarycontent");
    Field f = new Field("binarycontent", value.toString(), Store.YES, Field.Index.ANALYZED,
View Full Code Here


    config = new GenericConfiguration();
    config.set("attribute", "binarycontent");
  }

  public void testTransformer() throws Exception {
    ContentTransformer t = new PDFContentTransformer(config);
    t.processBean(bean);
    String s = TUtil.normalizeCRLF((String) bean.get("binarycontent"));
    String x = TUtil.normalizeCRLF("testtext \r\n");
    assertEquals("The content (" + s + ") should be (" + x + ")", x, s);
  }
View Full Code Here

TOP

Related Classes of com.gentics.cr.lucene.indexer.transformer.pdf.PDFContentTransformer

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.