DLESE Tools
v1.2

org.dlese.dpc.index.writer
Interface DocWriter

All Known Implementing Classes:
FileIndexingServiceWriter, HarvestLogWriter, WebLogWriter

public interface DocWriter

Abstract class for creating a typed Lucene Document. A DocReader should be implemented to read Documents of this type. A switch must then be implemented in ResultDoc.getDocReader() to select the appropriate DocReader.

Author:
John Weatherley
See Also:
DocReader, ResultDoc

Method Summary
 String getDocType()
          Returns a unique document type key for this kind of document, corresponding to the format type.
 String getReaderClass()
          Gets the name of the concrete DocReader class that is used to read this type of Document, for example "ItemDocReader".
 

Method Detail

getDocType

public String getDocType()
                  throws Exception
Returns a unique document type key for this kind of document, corresponding to the format type. For example "dleseims". The string is parsed using the Lucene StandardAnalyzer so it must be lowercase and should not contain any stop words.

Returns:
The docType String
Throws:
Exception - This method should throw and Exception with appropriate error message if an error occurs.

getReaderClass

public String getReaderClass()
Gets the name of the concrete DocReader class that is used to read this type of Document, for example "ItemDocReader".

Returns:
The name of the DocReader

DLESE Tools
v1.2