net.firstpartners.rp.back.extractor
Class FileTreeDataExtractor

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

public class FileTreeDataExtractor
extends java.lang.Object
implements IDataExtractor

Extracts information from a File Tree (Directory) in a format that can be added to an Index.

Author:
brownpa

Field Summary
protected  org.apache.log4j.Logger logger
          Logger for this class and subclasses
private  int maxFileSize
          Maxim process document size
private  java.lang.String type
          Extractor type
 
Constructor Summary
FileTreeDataExtractor()
           
 
Method Summary
 int canHandle(INewInformation info)
          How well the plugin thinks it can handle a new piece of information
 void convert(INewInformation info)
          Comvert the tree information into a list of documents
 java.lang.String[] getListExtensions()
          Return the list of supported extensions
 int getMaxFileSize()
          Get the maxim file size which can be proces
 java.lang.String getOriginalUri()
          The original place where we got this data
 java.lang.String getType()
          Get the extractor type
 void onLoad()
          Carry out any initiation tasks
 void setMaxFileSize(int maxFileSize)
          Set the maxim file size which can be process
 void setType(java.lang.String type)
          Set the extractor type
 
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


type

private java.lang.String type
Extractor type


maxFileSize

private int maxFileSize
Maxim process document size

Constructor Detail

FileTreeDataExtractor

public FileTreeDataExtractor()
Method Detail

getOriginalUri

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

Specified by:
getOriginalUri in interface IDataExtractor
Returns:
pointer

onLoad

public void onLoad()
Carry out any initiation tasks

Specified by:
onLoad in interface IPlugin

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
Parameters:
info -
Returns:

convert

public void convert(INewInformation info)
             throws RpException
Comvert the tree information into a list of documents

Specified by:
convert in interface IDataExtractor
Parameters:
info - Information to be converted
Throws:
RpException - If an error occur in xml processing

getListExtensions

public java.lang.String[] getListExtensions()
Return the list of supported extensions

Specified by:
getListExtensions in interface IDataExtractor
Returns:
List of supported extesnsions

getMaxFileSize

public int getMaxFileSize()
Get the maxim file size which can be proces

Returns:
Maxim file size

setMaxFileSize

public void setMaxFileSize(int maxFileSize)
Set the maxim file size which can be process

Parameters:
maxFileSize - Maxim file size allowed.

getType

public java.lang.String getType()
Get the extractor type

Specified by:
getType in interface IDataExtractor
Returns:
Type of the extractor

setType

public void setType(java.lang.String type)
Set the extractor type

Parameters:
type - Extractor type