|
DLESE Tools v1.6.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.dlese.dpc.index.writer.FileIndexingServiceWriter
org.dlese.dpc.index.writer.ErrorFileIndexingWriter
public class ErrorFileIndexingWriter
Writes a Lucene Document that represents an error that has occured in
in indexing a File. This writer is used by FileIndexingService. The FileIndexingServiceWriter may throw a ErrorDocException, which can be
used to specific specific fields to index with the exception.
The Lucene Document fields that are created by this class are (in
addition the the ones listed for FileIndexingServiceWriter) all fields
specified in the ErrorDocException are stored plus:
error - Set to 'true' for all documents indexed by this writer. Not stored.
errormsg - The description of the error, for display. Stored.
errordoctype - The type of error thrown as specified by ErrorDocException.
Defaults to 'generic'. Stored.
exception - The name of the Java exception that was thrown. Stored.
FileIndexingServiceWriter,
FileIndexingService,
ErrorDocException| Constructor Summary | |
|---|---|
ErrorFileIndexingWriter(Throwable exception)
Constructor for the ErrorFileIndexingWriter object |
|
| Method Summary | |
|---|---|
protected void |
addCustomFields(org.apache.lucene.document.Document newDoc,
org.apache.lucene.document.Document existingDoc,
File sourceFile)
Adds the error message to the Lucene document. |
protected void |
destroy()
Does nothing. |
String |
getDocGroup()
Gets the specifier associated with this group of files or null if no group association exists. |
String |
getDocType()
Gets the docType, which is 'errordoc.' |
String |
getReaderClass()
Gets the name of the concrete DocReader class that is used to read
this type of Document, which is "ErrorDocReader". |
void |
init(File source,
org.apache.lucene.document.Document existingDoc)
Does nothing. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ErrorFileIndexingWriter(Throwable exception)
exception - The exception that was thrown when the error occured.| Method Detail |
|---|
public String getDocType()
throws Exception
getDocType in interface DocWritergetDocType in class FileIndexingServiceWriterException - If error.public String getDocGroup()
getDocGroup in class FileIndexingServiceWriterpublic String getReaderClass()
DocReader class that is used to read
this type of Document, which is "ErrorDocReader".
getReaderClass in interface DocWritergetReaderClass in class FileIndexingServiceWriter
protected final void addCustomFields(org.apache.lucene.document.Document newDoc,
org.apache.lucene.document.Document existingDoc,
File sourceFile)
throws Exception
addCustomFields in class FileIndexingServiceWriternewDoc - The new Document that is being created for this resourceexistingDoc - An existing Document that currently resides in the index for the given resource, or
null if none was previously presentsourceFile - The sourceFile that is being indexed.
Exception - If an error occurs
public void init(File source,
org.apache.lucene.document.Document existingDoc)
throws Exception
init in class FileIndexingServiceWritersource - The source file being indexedexistingDoc - An existing Document that currently resides in the index for the given resource, or
null if none was previously present
Exception - If an error occured during set-up.protected void destroy()
destroy in class FileIndexingServiceWriter
|
DLESE Tools v1.6.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||