com.theloutons.search.specialreaders
Class XMLReader

java.lang.Object
  extended bycom.theloutons.search.specialreaders.XMLReader
All Implemented Interfaces:
DocumentAnalyze

public class XMLReader
extends java.lang.Object
implements DocumentAnalyze

Author:
Tom Louton Need to create the Lucene Document and the deal with it and the reading of the special file.

Constructor Summary
XMLReader()
          use this, as it most likely will be instantiated by
XMLReader(java.io.FileInputStream fiS)
           
XMLReader(java.lang.String fileName)
           
 
Method Summary
 org.apache.lucene.document.Document getDocument()
          The just returns the document created.
 void setFile(java.io.File f, java.io.PrintWriter log)
          This sets the files and does the extraction.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XMLReader

public XMLReader()
use this, as it most likely will be instantiated by


XMLReader

public XMLReader(java.lang.String fileName)

XMLReader

public XMLReader(java.io.FileInputStream fiS)
Method Detail

getDocument

public org.apache.lucene.document.Document getDocument()
Description copied from interface: DocumentAnalyze
The just returns the document created.

Specified by:
getDocument in interface DocumentAnalyze
Returns:
the lucene document with the text extracted from the file f (below) was extracted.

setFile

public void setFile(java.io.File f,
                    java.io.PrintWriter log)
Description copied from interface: DocumentAnalyze
This sets the files and does the extraction. Of course, one could use the getDocument to do the extraction too.

Specified by:
setFile in interface DocumentAnalyze
Parameters:
f - the file from which the tokens are to be extracted.
log - a log file. I suggest that where ever a doc=null;return is done, write an reason to the log.

toString

public java.lang.String toString()