public class DleseIMSFileIndexingWriter extends ItemFileIndexingWriter
Document from a DLESE-IMS XML source file.
The Lucene Document fields that are created by this class are (in
addition the the ones listed for FileIndexingServiceWriter):
doctype - Set to 'dlese_ims'. Stored. Note: the actual indexing of this field happens
in the superclass FileIndexingServiceWriter.
additional fields - A number of additional fields are defined. See the Java code for
method addFrameworkFields(Document, Document) for details.
| Constructor and Description |
|---|
DleseIMSFileIndexingWriter()
Create a DleseIMSFileIndexingWriter
|
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String[] |
_getIds()
Gets the id attribute of the DleseIMSFileIndexingWriter object
|
protected void |
addFrameworkFields(org.apache.lucene.document.Document newDoc,
org.apache.lucene.document.Document existingDoc)
Adds custom fields to the index that are unique to DLESE-IMS
|
protected void |
destroy()
Release map resources for GC after processing.
|
protected java.util.Date |
getAccessionDate()
Returns the accession date, which is null (unknown).
|
protected java.lang.String |
getAccessionStatus()
Returns the accession status of this record, for example 'accessioned'.
|
protected MmdRec[] |
getAllMmdRecs()
Returns the MmdRecs for all records associated with this resouce, including myMmdRec.
|
protected MmdRec[] |
getAssociatedMmdRecs()
Returns the MmdRecs for records in other collections that catalog the same resource.
|
protected java.lang.String |
getContent()
Returns null.
|
protected java.lang.String |
getContentType()
Returns null.
|
protected java.util.Date |
getCreationDate()
Returns null.
|
protected java.lang.String |
getCreator()
Returns the items creator's full name.
|
protected java.lang.String |
getCreatorLastName()
Returns the items creator's last name.
|
java.lang.String |
getDescription()
Gets the description attribute of the DleseIMSFileIndexingWriter object
|
java.lang.String |
getDocType()
Gets the docType attribute of the DleseIMSFileIndexingWriter, which is 'dlese_ims.'
|
protected boolean |
getHasRelatedResource()
Returns false (not implemented).
|
protected java.lang.String |
getKeywords()
Returns the items keywords.
|
protected MmdRec |
getMyMmdRec()
Returns the MmdRec for this record only.
|
java.lang.String |
getReaderClass()
Gets the name of the concrete
DocReader class that is used to read
this type of Document, which is "ItemDocReader". |
protected java.lang.String[] |
getRelatedResourceIds()
Returns the IDs of related resources that are cataloged by ID, or null if none are present
|
protected java.lang.String[] |
getRelatedResourceUrls()
Returns the URLs of related resources that are cataloged by URL, or null if none are present
|
java.lang.String |
getTitle()
Gets the title attribute of the DleseIMSFileIndexingWriter object
|
java.lang.String[] |
getUrls()
Gets the url attribute of the DleseIMSFileIndexingWriter object
|
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 date used to determine "What's new" in the library, which is null (unknown).
|
protected java.lang.String |
getWhatsNewType()
Returns null (unknown).
|
boolean |
indexFullContentInDefaultAndStems()
Default and stems fields handled here, so do not index full content.
|
void |
initItem(java.io.File source,
org.apache.lucene.document.Document existingDoc)
Initialize the XML map prior to processing
|
addFields, getMyAnnoResultDocs, initaddCustomFields, getBoundingBox, getCollections, getDeletedDoc, getDocGroup, getDom4jDoc, getFieldContent, getFieldContent, getFieldName, getIds, getIndex, 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 DleseIMSFileIndexingWriter()
public void initItem(java.io.File source,
org.apache.lucene.document.Document existingDoc)
throws java.lang.Exception
initItem in class ItemFileIndexingWritersource - The source file being indexed.existingDoc - A Document that previously existed in the index for this item, if presentjava.lang.Exception - Thrown if error reading the XML mapprotected void destroy()
destroy in class ItemFileIndexingWriterpublic java.lang.String getReaderClass()
DocReader class that is used to read
this type of Document, which is "ItemDocReader".getReaderClass in interface DocWritergetReaderClass in class ItemFileIndexingWriterprotected java.lang.String getValidationReport()
throws java.lang.Exception
getValidationReport in class ItemFileIndexingWriterjava.lang.Exception - If error in performing the validation.public final java.lang.String getDocType()
getDocType in interface DocWritergetDocType in class ItemFileIndexingWriterprotected final java.lang.String[] _getIds()
throws java.lang.Exception
_getIds in class XMLFileIndexingWriterjava.lang.Exception - If an error occurspublic final java.lang.String getTitle()
throws java.lang.Exception
getTitle in class XMLFileIndexingWriterjava.lang.Exception - If an error occurspublic final java.lang.String getDescription()
throws java.lang.Exception
getDescription in class XMLFileIndexingWriterjava.lang.Exception - If an error occursprotected java.lang.String getKeywords()
throws java.lang.Exception
getKeywords in class ItemFileIndexingWriterjava.lang.Exception - This method should throw and Exception with appropriate error message if an error
occurs.protected java.lang.String getCreatorLastName()
throws java.lang.Exception
getCreatorLastName in class ItemFileIndexingWriterjava.lang.Exception - This method should throw and Exception with appropriate error message if an error
occurs.protected MmdRec[] getAssociatedMmdRecs()
getAssociatedMmdRecs in class ItemFileIndexingWriterprotected MmdRec[] getAllMmdRecs()
getAllMmdRecs in class ItemFileIndexingWriterprotected MmdRec getMyMmdRec()
getMyMmdRec in class ItemFileIndexingWriterprotected java.lang.String getCreator()
throws java.lang.Exception
getCreator in class ItemFileIndexingWriterjava.lang.Exception - This method should throw and Exception with appropriate error message if an error
occurs.protected java.lang.String getContent()
getContent in class ItemFileIndexingWriterprotected java.lang.String getContentType()
getContentType in class ItemFileIndexingWriterprotected java.lang.String getAccessionStatus()
throws java.lang.Exception
getAccessionStatus in class ItemFileIndexingWriterjava.lang.Exception - This method should throw and Exception with appropriate error message if an error
occurs.protected boolean getHasRelatedResource()
throws java.lang.Exception
getHasRelatedResource in class ItemFileIndexingWriterjava.lang.Exception - This method should throw and Exception with appropriate error message if an error
occurs.protected java.lang.String[] getRelatedResourceIds()
throws java.lang.Exception
getRelatedResourceIds in class ItemFileIndexingWriterjava.lang.Exception - This method should throw and Exception with appropriate error message if an error
occurs.protected java.lang.String[] getRelatedResourceUrls()
throws java.lang.Exception
getRelatedResourceUrls in class ItemFileIndexingWriterjava.lang.Exception - This method should throw and Exception with appropriate error message if an error
occurs.public final java.lang.String[] getUrls()
throws java.lang.Exception
getUrls in class XMLFileIndexingWriterjava.lang.Exception - If an error occursprotected java.util.Date getWhatsNewDate()
throws java.lang.Exception
getWhatsNewDate in class ItemFileIndexingWriterjava.lang.Exception - This method should throw and Exception with appropriate error message if an error
occurs.protected java.util.Date getAccessionDate()
throws java.lang.Exception
getAccessionDate in class ItemFileIndexingWriterjava.lang.Exception - This method should throw and Exception with appropriate error message if an error
occurs.protected java.util.Date getCreationDate()
throws java.lang.Exception
getCreationDate in class ItemFileIndexingWriterjava.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 ItemFileIndexingWriterjava.lang.Exception - This method should throw and Exception with appropriate error message if an error
occurs.public boolean indexFullContentInDefaultAndStems()
indexFullContentInDefaultAndStems in class XMLFileIndexingWriterprotected final void addFrameworkFields(org.apache.lucene.document.Document newDoc,
org.apache.lucene.document.Document existingDoc)
throws java.lang.Exception
addFrameworkFields in class ItemFileIndexingWriternewDoc - The feature to be added to the FrameworkFields attributeexistingDoc - The feature to be added to the FrameworkFields attributejava.lang.Exception - If an error occurs