Class SampleExtractor

java.lang.Object
  extended by SampleExtractor
All Implemented Interfaces:
IDataExtractor, IPlugin

public class SampleExtractor
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  java.lang.String type
          Extractor type
 
Constructor Summary
SampleExtractor()
           
 
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
 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 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

Constructor Detail

SampleExtractor

public SampleExtractor()
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

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