ome.services.fulltext
Class PdfParser

java.lang.Object
  extended by ome.services.fulltext.FileParser
      extended by 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

Field Summary
 
Fields inherited from class ome.services.fulltext.FileParser
context, EMPTY
 
Constructor Summary
PdfParser()
           
 
Method Summary
 Iterable<Reader> doParse(File file)
          Template method to parse a File into manageable chunks.
 
Methods inherited from class ome.services.fulltext.FileParser
parse, setApplicationContext, wrap, wrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PdfParser

public PdfParser()
Method Detail

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: Beta-4.2.0-r7571-b29

Copyright © 2009 The University of Dundee. All Rights Reserved.