degu.util.enchancer
Class PDFEnchancer

java.lang.Object
  extended by degu.util.enchancer.Enchancer
      extended by degu.util.enchancer.PDFEnchancer

public class PDFEnchancer
extends Enchancer

Enchances a PDF document (sets highlights and bookmarks)


Field Summary
private  org.pdfbox.pdmodel.PDDocument pdDocument
           
 
Fields inherited from class degu.util.enchancer.Enchancer
byteArrayOut, hits, is, queryParser, queryStr, terms
 
Constructor Summary
PDFEnchancer(java.io.File file, java.lang.String queryStr)
           
PDFEnchancer(java.io.InputStream is, java.lang.String query, DeguHits hits)
           
 
Method Summary
 void enchance()
          Enchances the document.
 void enchanceTo(java.io.OutputStream os)
          Writes the enhanced document directly to the OutputStream os.
 
Methods inherited from class degu.util.enchancer.Enchancer
getEnchancedData, getEnchancedIS, getHits, getQuery, setHits, setIS, setQuery
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pdDocument

private org.pdfbox.pdmodel.PDDocument pdDocument
Constructor Detail

PDFEnchancer

public PDFEnchancer(java.io.InputStream is,
                    java.lang.String query,
                    DeguHits hits)
             throws org.apache.lucene.queryParser.ParseException
Throws:
org.apache.lucene.queryParser.ParseException

PDFEnchancer

public PDFEnchancer(java.io.File file,
                    java.lang.String queryStr)
             throws org.apache.lucene.queryParser.ParseException,
                    java.io.FileNotFoundException
Throws:
org.apache.lucene.queryParser.ParseException
java.io.FileNotFoundException
Method Detail

enchance

public void enchance()
              throws BadDataException
Description copied from class: Enchancer
Enchances the document. Result can be obtained with getEnchancedIS() or getEnchancedData()

Specified by:
enchance in class Enchancer
Throws:
BadDataException

enchanceTo

public void enchanceTo(java.io.OutputStream os)
                throws BadDataException
Description copied from class: Enchancer
Writes the enhanced document directly to the OutputStream os. (getEnchancedIS() and getEnchancedData() do not work here!)

Specified by:
enchanceTo in class Enchancer
Throws:
BadDataException