public class DleseAnnoFileIndexingServiceWriter extends XMLFileIndexingWriter
Document
s for a DLESE annotation record. The Lucene fields that are created by this class are:
collection
- The collection associated with this resource. Stored. Appended with a '0'
at the beginning to support wildcard searching.DleseAnnoDocReader
Constructor and Description |
---|
DleseAnnoFileIndexingServiceWriter()
Create a DleseAnnoFileIndexingServiceWriter
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String[] |
_getIds()
Gets the id of this annotation
|
protected void |
addFields(org.apache.lucene.document.Document newDoc,
org.apache.lucene.document.Document existingDoc,
java.io.File sourceFile)
Adds additional custom fields that are unique to the dlese anno document format being indexed.
|
protected void |
destroy()
This method is called at the conclusion of processing and may be used for tear-down.
|
protected void |
finalize()
Perform finalization...
|
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 DleseAnnoFileIndexingServiceWriter object
|
static long |
getNumInstances()
Gets the numInstances attribute of the DleseAnnoFileIndexingServiceWriter class
|
java.lang.String |
getReaderClass()
Gets the fully qualified name of the concrete
DocReader class that is
used to read this type of Document , for example
"org.dlese.dpc.index.reader.ItemDocReader". |
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 validation of the data, or null if no error was found.
|
protected java.util.Date |
getWhatsNewDate()
Returns the the first available of item/statusOf@date, service/date@modified or service/date@created.
|
protected java.lang.String |
getWhatsNewType()
Returns 'annocomplete,' 'annoinprogress,' 'drcannocomplete,' or 'drcannoinprogress'.
|
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)
This method is called prior to processing and may be used to for any necessary set-up.
|
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 DleseAnnoFileIndexingServiceWriter()
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
- If errorpublic static long getNumInstances()
public java.lang.String getDocType() throws java.lang.Exception
getDocType
in interface DocWriter
getDocType
in class FileIndexingServiceWriter
java.lang.Exception
- if errorpublic java.lang.String getReaderClass()
DocReader
class that is
used to read this type of Document
, for example
"org.dlese.dpc.index.reader.ItemDocReader".getReaderClass
in interface DocWriter
getReaderClass
in class FileIndexingServiceWriter
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 java.lang.String getValidationReport() throws java.lang.Exception
getValidationReport
in class FileIndexingServiceWriter
java.lang.Exception
- If error in performing the validation.protected void destroy()
destroy
in class FileIndexingServiceWriter
protected java.lang.String[] _getIds()
_getIds
in class XMLFileIndexingWriter
public java.lang.String[] getUrls()
XMLFileIndexingWriter
getUrls
in class XMLFileIndexingWriter
public java.lang.String getTitle() throws java.lang.Exception
XMLFileIndexingWriter
getTitle
in class XMLFileIndexingWriter
java.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
XMLFileIndexingWriter
getDescription
in class XMLFileIndexingWriter
java.lang.Exception
- This method should throw and Exception with appropriate error message if an error
occurs.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() throws java.lang.Exception
getWhatsNewType
in class XMLFileIndexingWriter
java.lang.Exception
- If errorpublic boolean indexFullContentInDefaultAndStems()
indexFullContentInDefaultAndStems
in class XMLFileIndexingWriter
protected 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 indexedjava.lang.Exception
- This method should throw and Exception with appropriate error message if an error
occurs.