public class NCSCollectionFileIndexingWriter extends XMLFileIndexingWriter
Document
for a NCS Collection XML record.XMLDocReader
,
RecordDataService
,
FileIndexingServiceWriter
Constructor and Description |
---|
NCSCollectionFileIndexingWriter()
Create a NCSCollectionFileIndexingWriter.
|
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 collection-level Document.
|
protected void |
destroy()
This method is called at the conclusion of processing and may be used for tear-down.
|
java.lang.String |
getDescription()
The description for the collection.
|
java.lang.String |
getDocType()
Gets the docType attribute of the NCSCollectionFileIndexingWriter, which is 'ncs_collect.'
|
java.lang.String |
getReaderClass()
Gets the name of the concrete
DocReader class that is used to read
this type of Document , which is "XMLDocReader". |
java.lang.String |
getTitle()
Returns the title for the collection.
|
java.lang.String[] |
getUrls()
Gets the URL to the collection.
|
protected java.lang.String |
getValidationReport()
Gets a report detailing any errors found in the XML validation of the collection 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.
|
protected java.lang.String |
getWhatsNewType()
Returns 'collection'.
|
boolean |
indexFullContentInDefaultAndStems()
Place the entire XML content into the default and stems search field.
|
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, getXmlIndexerFieldsConfig
abortIndexing, addDocToRemove, addToAdminDefaultField, addToDefaultField, create, getConfigAttributes, getDocsource, getFileContent, getFileIndexingPlugin, getFileIndexingService, getLuceneDoc, getPreviousRecordDoc, getSessionAttributes, getSourceDir, getSourceFile, isMakingDeletedDoc, isValidationEnabled, prtln, prtlnErr, setConfigAttributes, setDebug, setFileIndexingPlugin, setFileIndexingService, setIsMakingDeletedDoc, setValidationEnabled
public NCSCollectionFileIndexingWriter()
public java.lang.String getTitle() throws java.lang.Exception
getTitle
in class XMLFileIndexingWriter
java.lang.Exception
- If error reading XML.public java.lang.String getDescription() throws java.lang.Exception
getDescription
in class XMLFileIndexingWriter
java.lang.Exception
- If error reading XML.public java.lang.String[] getUrls() throws java.lang.Exception
getUrls
in class XMLFileIndexingWriter
java.lang.Exception
- If errorprotected java.lang.String[] _getIds() throws java.lang.Exception
_getIds
in class XMLFileIndexingWriter
java.lang.Exception
- If errorpublic java.lang.String getDocType()
getDocType
in interface DocWriter
getDocType
in class FileIndexingServiceWriter
public java.lang.String getReaderClass()
DocReader
class that is used to read
this type of Document
, which is "XMLDocReader".getReaderClass
in interface DocWriter
getReaderClass
in class FileIndexingServiceWriter
protected java.util.Date getWhatsNewDate() throws java.lang.Exception
getWhatsNewDate
in class XMLFileIndexingWriter
java.lang.Exception
- This method should throw and Exception with appropriate error message if an error
occurs.protected java.lang.String getWhatsNewType()
getWhatsNewType
in class XMLFileIndexingWriter
public void init(java.io.File source, org.apache.lucene.document.Document existingDoc) throws java.lang.Exception
init
in class XMLFileIndexingWriter
source
- 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 FileIndexingServiceWriter
protected java.lang.String getValidationReport() throws java.lang.Exception
getValidationReport
in class FileIndexingServiceWriter
java.lang.Exception
- If error in performing the validation.public boolean indexFullContentInDefaultAndStems()
indexFullContentInDefaultAndStems
in class XMLFileIndexingWriter
protected 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 XMLFileIndexingWriter
newDoc
- 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