ome.services.fulltext
Class PdfParser
java.lang.Object
ome.services.fulltext.FileParser
ome.services.fulltext.PdfParser
- All Implemented Interfaces:
- org.springframework.context.ApplicationContextAware
public class PdfParser
- extends FileParser
FileParser
for "application/pdf" files using PDFBox.
- Author:
- Josh Moore, josh at glencoesoftware.com
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PdfParser
public PdfParser()
doParse
public Iterable<Reader> doParse(File file)
throws Exception
- Description copied from class:
FileParser
- Template method to parse a
File
into 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 dog
might be
parsed to: The quick brown fox jumps
and
jumps over the lazy dog
.
Receives a non-null, readable
File
instance from FileParser.parse(File)
and can return a possible null
Iterable
or throw an Exception
.
In any of the non-successful cases, the FileParser.EMPTY
Iterable
will be returned to the consumer.
- Overrides:
doParse
in class FileParser
- Throws:
Exception
OmeroJava Api
Version: 4.3.4-dbcbce5a-b4
Copyright © 2009 The University of Dundee. All Rights Reserved.