net.firstpartners.rp.back.extractor
Class PdfDataExtractor

java.lang.Object
  extended by net.firstpartners.rp.back.extractor.GenericDataExtractor
      extended by net.firstpartners.rp.back.extractor.PdfDataExtractor
All Implemented Interfaces:
IDataExtractor, IPlugin

public class PdfDataExtractor
extends GenericDataExtractor

Extracts information from pdf files in a format that can be stored and added to the Index.

Author:
brownpa

Field Summary
protected  org.apache.log4j.Logger logger
          Logger for this class and subclasses
 
Constructor Summary
PdfDataExtractor()
           
 
Method Summary
 int canHandle(INewInformation info)
          How well the plugin thinks it can handle a new piece of information
 void convert(INewInformation info)
          Convert the file information into tuples
 java.lang.String getOriginalUri()
          The original place where we got this data
 void onLoad()
          Carry out any initiation tasks
 
Methods inherited from class net.firstpartners.rp.back.extractor.GenericDataExtractor
getListExtensions, getMaxLengthSummary, getMinLengthWord, getNotIgnoreChars, getReplaceChars, getType, setListExtensions, setMaxLengthSummary, setMinLengthWord, setNotIgnoreChars, setReplaceChars, setType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final org.apache.log4j.Logger logger
Logger for this class and subclasses

Constructor Detail

PdfDataExtractor

public PdfDataExtractor()
Method Detail

getOriginalUri

public java.lang.String getOriginalUri()
The original place where we got this data

Specified by:
getOriginalUri in interface IDataExtractor
Overrides:
getOriginalUri in class GenericDataExtractor
Returns:
pointer

onLoad

public void onLoad()
Carry out any initiation tasks

Specified by:
onLoad in interface IPlugin
Overrides:
onLoad in class GenericDataExtractor

canHandle

public int canHandle(INewInformation info)
How well the plugin thinks it can handle a new piece of information

Specified by:
canHandle in interface IDataExtractor
Overrides:
canHandle in class GenericDataExtractor
Parameters:
info - Information to be handled
Returns:
1 In case that the open for the location is succesfully.

convert

public void convert(INewInformation info)
             throws RpException
Convert the file information into tuples

Specified by:
convert in interface IDataExtractor
Overrides:
convert in class GenericDataExtractor
Parameters:
info - Information to be converted
Throws:
RpException - If an error occur in processing the file