net.firstpartners.rp.back.extractor
Class XmlDataExtractor

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

public class XmlDataExtractor
extends GenericDataExtractor

Extracts information from an XML file in a format that can be added to an Index.

Author:
brownpa

Field Summary
private  boolean linkRequired
          Links are required
private  java.lang.String linkTags
          Link tags
protected  org.apache.log4j.Logger logger
          Logger for this class and subclasses
 
Constructor Summary
XmlDataExtractor()
           
 
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 xml file information into a list of documents
 java.lang.String getLinkTags()
           
 java.lang.String getOriginalUri()
          The original place where we got this data
 boolean isLinkRequired()
           
 void onLoad()
          Carry out any initiation tasks
 void setLinkRequired(boolean linkRequired)
           
 void setLinkTags(java.lang.String linkTags)
           
 
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


linkRequired

private boolean linkRequired
Links are required


linkTags

private java.lang.String linkTags
Link tags

Constructor Detail

XmlDataExtractor

public XmlDataExtractor()
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 -
Returns:
Integer value (0 if cann't handle the data)

convert

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

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

isLinkRequired

public boolean isLinkRequired()
Returns:
Returns the linkRequired.

setLinkRequired

public void setLinkRequired(boolean linkRequired)
Parameters:
linkRequired - The linkRequired to set.

getLinkTags

public java.lang.String getLinkTags()
Returns:
Returns the linkTags.

setLinkTags

public void setLinkTags(java.lang.String linkTags)
Parameters:
linkTags - The linkTags to set.