Package ome.services.fulltext
Class PdfParser
- java.lang.Object
-
- ome.services.fulltext.FileParser
-
- ome.services.fulltext.PdfParser
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
public class PdfParser extends FileParser
FileParserfor "application/pdf" files using PDFBox.
-
-
Field Summary
-
Fields inherited from class ome.services.fulltext.FileParser
context, EMPTY, maxFileSize
-
-
Constructor Summary
Constructors Constructor Description PdfParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Iterable<java.io.Reader>doParse(java.io.File file)Template method to parse aFileinto manageable chunks.-
Methods inherited from class ome.services.fulltext.FileParser
parse, setApplicationContext, setMaxFileSize, wrap, wrap
-
-
-
-
Method Detail
-
doParse
public java.lang.Iterable<java.io.Reader> doParse(java.io.File file) throws java.lang.ExceptionDescription copied from class:FileParserTemplate method to parse aFileinto manageable chunks. The default implementation reads from the file lazily with chunks overlapping on the final white space. For example a file with:The quick brown fox jumps over the lazy dogmight be parsed to:The quick brown fox jumpsandjumps over the lazy dog. Receives a non-null,readableFileinstance fromFileParser.parse(File)and can return a possible nullIterableor throw anException. In any of the non-successful cases, theFileParser.EMPTYIterablewill be returned to the consumer.- Overrides:
doParsein classFileParser- Throws:
java.lang.Exception
-
-