DLESE Tools
v1.2

org.dlese.dpc.index.reader
Class ErrorDocReader

java.lang.Object
  extended byorg.dlese.dpc.index.reader.DocReader
      extended byorg.dlese.dpc.index.reader.FileIndexingServiceDocReader
          extended byorg.dlese.dpc.index.reader.ErrorDocReader
All Implemented Interfaces:
Serializable

public class ErrorDocReader
extends FileIndexingServiceDocReader

Provides getter methods to read the data fileds Lucene Document that was created by a ErrorFileIndexingWriter. The getter methods can then be accessed from (Struts) beans that need the data.

Author:
John Weatherley
See Also:
ErrorFileIndexingWriter, Serialized Form

Field Summary
 
Fields inherited from class org.dlese.dpc.index.reader.DocReader
conf, doc, score
 
Constructor Summary
ErrorDocReader(Document doc)
          Constructor that may be used programatically to wrap a reader around a Lucene Document created by a FileIndexingServiceWriter.
ErrorDocReader(Document doc, float score, ResultDocConfig conf)
          Constructor that is used by ResultDoc at search time to create a new instance.
 
Method Summary
 String getErrorMsg()
          Gets the error message.
 String getExceptionName()
          Gets the name of the Exception that was thrown to when the error occured.
 String getReaderType()
          Gets the String 'ErrorDocReader,' which is the key that describes this reader type.
 
Methods inherited from class org.dlese.dpc.index.reader.FileIndexingServiceDocReader
fileExists, getDateStamp, getDeleted, getDocDir, getDocsource, getDocsourceEncoded, getDoctype, getFileExists, getFileName, getFullContent, getLastModified, getLastModifiedString, getSourceFile, isDeleted, prtln, prtlnErr, setDebug
 
Methods inherited from class org.dlese.dpc.index.reader.DocReader
getDocument, getIndex, getQuery, getScore, setDoc
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErrorDocReader

public ErrorDocReader(Document doc,
                      float score,
                      ResultDocConfig conf)
Constructor that is used by ResultDoc at search time to create a new instance.

Parameters:
doc - The Lucene Document that is read.
score - The rank of the Document in a set of results.

ErrorDocReader

public ErrorDocReader(Document doc)
Constructor that may be used programatically to wrap a reader around a Lucene Document created by a FileIndexingServiceWriter.

Parameters:
doc - A Lucene Document created by a ItemFileIndexingWriter.
Method Detail

getReaderType

public String getReaderType()
Gets the String 'ErrorDocReader,' which is the key that describes this reader type. This may be used in (Struts) beans to determine which type of reader is available for a given search result and thus what data is available for display in the UI. The reader type determines which getter methods are available.

Specified by:
getReaderType in class DocReader
Returns:
The String 'ErrorDocReader'.

getErrorMsg

public String getErrorMsg()
Gets the error message.

Returns:
The error message.

getExceptionName

public String getExceptionName()
Gets the name of the Exception that was thrown to when the error occured.

Returns:
The Exception name.

DLESE Tools
v1.2