public class NewsOppsFileIndexingWriter extends XMLFileIndexingWriter
Document for a DLESE news-opps XML record. The
reader for this type of Document is NewsOppsDocReader. XMLDocReader,
RecordDataService,
FileIndexingServiceWriter| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
FIELD_NS
The News Opps NS
|
| Constructor and Description |
|---|
NewsOppsFileIndexingWriter()
Create a NewsOppsFileIndexingWriter.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String[] |
_getIds()
Gets the ID of this collection record.
|
protected void |
addFields(org.apache.lucene.document.Document newDoc,
org.apache.lucene.document.Document existingDoc,
java.io.File sourceFile)
Adds fields to the index that are part of the news-opps Document.
|
protected void |
destroy()
This method is called at the conclusion of processing and may be used for tear-down.
|
java.lang.String |
getDescription()
Return a description for the document being indexed, or null if none applies.
|
java.lang.String |
getDocType()
Gets the docType attribute of the NewsOppsFileIndexingWriter, which is 'news_opps.'
|
java.lang.String |
getReaderClass()
Gets the name of the concrete
DocReader class that is used to read
this type of Document, which is "NewsOppsDocReader". |
java.lang.String |
getTitle()
Return a title for the document being indexed, or null if none applies.
|
java.lang.String[] |
getUrls()
Return the URL(s) to the resource being indexed, or null if none apply.
|
protected java.lang.String |
getValidationReport()
Gets a report detailing any errors found in the XML validation of the news-opps record, or null if no
error was found.
|
protected java.util.Date |
getWhatsNewDate()
Returns the date used to determine "What's new" in the library, which is the post date.
|
protected java.lang.String |
getWhatsNewType()
Returns 'newsopps'.
|
boolean |
indexFullContentInDefaultAndStems()
Default and stems fields handled here, so do not index full content.
|
void |
init(java.io.File source,
org.apache.lucene.document.Document existingDoc)
Nothing needed.
|
addCustomFields, getBoundingBox, getCollections, getDeletedDoc, getDocGroup, getDom4jDoc, getFieldContent, getFieldContent, getFieldName, getIds, getIndex, getMyAnnoResultDocs, getMyCollectionDoc, getOaiModtime, getPrimaryId, getRecordDataService, getRelatedIds, getRelatedIdsMap, getRelatedUrls, getRelatedUrlsMap, getTermStringFromStringArray, getXmlIndexer, getXmlIndexerFieldsConfigabortIndexing, addDocToRemove, addToAdminDefaultField, addToDefaultField, create, getConfigAttributes, getDocsource, getFileContent, getFileIndexingPlugin, getFileIndexingService, getLuceneDoc, getPreviousRecordDoc, getSessionAttributes, getSourceDir, getSourceFile, isMakingDeletedDoc, isValidationEnabled, prtln, prtlnErr, setConfigAttributes, setDebug, setFileIndexingPlugin, setFileIndexingService, setIsMakingDeletedDoc, setValidationEnabledpublic static final java.lang.String FIELD_NS
public NewsOppsFileIndexingWriter()
protected java.lang.String[] _getIds()
throws java.lang.Exception
_getIds in class XMLFileIndexingWriterjava.lang.Exception - If errorpublic java.lang.String[] getUrls()
throws java.lang.Exception
XMLFileIndexingWritergetUrls in class XMLFileIndexingWriterjava.lang.Exception - This method should throw and Exception with appropriate error message if an error
occurs.public java.lang.String getDescription()
throws java.lang.Exception
XMLFileIndexingWritergetDescription in class XMLFileIndexingWriterjava.lang.Exception - This method should throw and Exception with appropriate error message if an error
occurs.public java.lang.String getTitle()
throws java.lang.Exception
XMLFileIndexingWritergetTitle in class XMLFileIndexingWriterjava.lang.Exception - This method should throw and Exception with appropriate error message if an error
occurs.public java.lang.String getDocType()
getDocType in interface DocWritergetDocType in class FileIndexingServiceWriterpublic java.lang.String getReaderClass()
DocReader class that is used to read
this type of Document, which is "NewsOppsDocReader".getReaderClass in interface DocWritergetReaderClass in class FileIndexingServiceWriterprotected java.util.Date getWhatsNewDate()
throws java.lang.Exception
getWhatsNewDate in class XMLFileIndexingWriterjava.lang.Exception - This method should throw and Exception with appropriate error message if an error
occurs.protected java.lang.String getWhatsNewType()
getWhatsNewType in class XMLFileIndexingWriterpublic void init(java.io.File source,
org.apache.lucene.document.Document existingDoc)
throws java.lang.Exception
init in class XMLFileIndexingWritersource - The source file being indexedexistingDoc - An existing Document that currently resides in the index for the given resource, or
null if none was previously presentjava.lang.Exception - If an error occured during set-up.protected void destroy()
destroy in class FileIndexingServiceWriterprotected java.lang.String getValidationReport()
throws java.lang.Exception
getValidationReport in class FileIndexingServiceWriterjava.lang.Exception - If error in performing the validation.public boolean indexFullContentInDefaultAndStems()
indexFullContentInDefaultAndStems in class XMLFileIndexingWriterprotected final void addFields(org.apache.lucene.document.Document newDoc,
org.apache.lucene.document.Document existingDoc,
java.io.File sourceFile)
throws java.lang.Exception
addFields in class XMLFileIndexingWriternewDoc - 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.java.lang.Exception - If an error occurs