|
DLESE Tools v1.6.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.dlese.dpc.index.writer.FileIndexingServiceWriter
org.dlese.dpc.index.writer.XMLFileIndexingWriter
org.dlese.dpc.index.writer.ItemFileIndexingWriter
org.dlese.dpc.index.writer.DleseIMSFileIndexingWriter
public class DleseIMSFileIndexingWriter
Creates a Lucene 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 Summary | |
|---|---|
DleseIMSFileIndexingWriter()
Create a DleseIMSFileIndexingWriter |
|
| Method Summary | |
|---|---|
protected 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 Date |
getAccessionDate()
Returns the accession date, which is null (unknown). |
protected 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 String |
getContent()
Returns null. |
protected String |
getContentType()
Returns null. |
protected Date |
getCreationDate()
Returns null. |
protected String |
getCreator()
Returns the items creator's full name. |
protected String |
getCreatorLastName()
Returns the items creator's last name. |
String |
getDescription()
Gets the description attribute of the DleseIMSFileIndexingWriter object |
String |
getDocType()
Gets the docType attribute of the DleseIMSFileIndexingWriter, which is 'dlese_ims.' |
protected boolean |
getHasRelatedResource()
Returns false (not implemented). |
protected String |
getKeywords()
Returns the items keywords. |
protected MmdRec |
getMyMmdRec()
Returns the MmdRec for this record only. |
String |
getReaderClass()
Gets the name of the concrete DocReader class that is used to read
this type of Document, which is "ItemDocReader". |
protected String[] |
getRelatedResourceIds()
Returns the IDs of related resources that are cataloged by ID, or null if none are present |
protected String[] |
getRelatedResourceUrls()
Returns the URLs of related resources that are cataloged by URL, or null if none are present |
String |
getTitle()
Gets the title attribute of the DleseIMSFileIndexingWriter object |
String[] |
getUrls()
Gets the url attribute of the DleseIMSFileIndexingWriter object |
protected String |
getValidationReport()
Gets a report detailing any errors found in the validation of the data, or null if no error was found. |
protected Date |
getWhatsNewDate()
Returns the date used to determine "What's new" in the library, which is null (unknown). |
protected String |
getWhatsNewType()
Returns null (unknown). |
boolean |
indexFullContentInDefaultAndStems()
Default and stems fields handled here, so do not index full content. |
void |
initItem(File source,
org.apache.lucene.document.Document existingDoc)
Initialize the XML map prior to processing |
| Methods inherited from class org.dlese.dpc.index.writer.ItemFileIndexingWriter |
|---|
addFields, getMyAnnoResultDocs, init |
| Methods inherited from class org.dlese.dpc.index.writer.XMLFileIndexingWriter |
|---|
addCustomFields, getBoundingBox, getCollections, getDeletedDoc, getDocGroup, getDom4jDoc, getFieldContent, getFieldContent, getFieldName, getIds, getIndex, getMyCollectionDoc, getOaiModtime, getPrimaryId, getRecordDataService, getRelatedIds, getRelatedIdsMap, getRelatedUrls, getRelatedUrlsMap, getTermStringFromStringArray, getXmlIndexer, getXmlIndexerFieldsConfig |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DleseIMSFileIndexingWriter()
| Method Detail |
|---|
public void initItem(File source,
org.apache.lucene.document.Document existingDoc)
throws Exception
initItem in class ItemFileIndexingWritersource - The source file being indexed.existingDoc - A Document that previously existed in the index for this item, if present
Exception - Thrown if error reading the XML mapprotected void destroy()
destroy in class ItemFileIndexingWriterpublic String getReaderClass()
DocReader class that is used to read
this type of Document, which is "ItemDocReader".
getReaderClass in interface DocWritergetReaderClass in class ItemFileIndexingWriter
protected String getValidationReport()
throws Exception
getValidationReport in class ItemFileIndexingWriterException - If error in performing the validation.public final String getDocType()
getDocType in interface DocWritergetDocType in class ItemFileIndexingWriter
protected final String[] _getIds()
throws Exception
_getIds in class XMLFileIndexingWriterException - If an error occurs
public final String getTitle()
throws Exception
getTitle in class XMLFileIndexingWriterException - If an error occurs
public final String getDescription()
throws Exception
getDescription in class XMLFileIndexingWriterException - If an error occurs
protected String getKeywords()
throws Exception
getKeywords in class ItemFileIndexingWriterException - This method should throw and Exception with appropriate error message if an error
occurs.
protected String getCreatorLastName()
throws Exception
getCreatorLastName in class ItemFileIndexingWriterException - 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 ItemFileIndexingWriter
protected String getCreator()
throws Exception
getCreator in class ItemFileIndexingWriterException - This method should throw and Exception with appropriate error message if an error
occurs.protected String getContent()
getContent in class ItemFileIndexingWriterprotected String getContentType()
getContentType in class ItemFileIndexingWriter
protected String getAccessionStatus()
throws Exception
getAccessionStatus in class ItemFileIndexingWriterException - This method should throw and Exception with appropriate error message if an error
occurs.
protected boolean getHasRelatedResource()
throws Exception
getHasRelatedResource in class ItemFileIndexingWriterException - This method should throw and Exception with appropriate error message if an error
occurs.
protected String[] getRelatedResourceIds()
throws Exception
getRelatedResourceIds in class ItemFileIndexingWriterException - This method should throw and Exception with appropriate error message if an error
occurs.
protected String[] getRelatedResourceUrls()
throws Exception
getRelatedResourceUrls in class ItemFileIndexingWriterException - This method should throw and Exception with appropriate error message if an error
occurs.
public final String[] getUrls()
throws Exception
getUrls in class XMLFileIndexingWriterException - If an error occurs
protected Date getWhatsNewDate()
throws Exception
getWhatsNewDate in class ItemFileIndexingWriterException - This method should throw and Exception with appropriate error message if an error
occurs.
protected Date getAccessionDate()
throws Exception
getAccessionDate in class ItemFileIndexingWriterException - This method should throw and Exception with appropriate error message if an error
occurs.
protected Date getCreationDate()
throws Exception
getCreationDate in class ItemFileIndexingWriterException - This method should throw and Exception with appropriate error message if an error
occurs.
protected String getWhatsNewType()
throws Exception
getWhatsNewType in class ItemFileIndexingWriterException - This method should throw and Exception with appropriate error message if an error
occurs.public boolean indexFullContentInDefaultAndStems()
indexFullContentInDefaultAndStems in class XMLFileIndexingWriter
protected final void addFrameworkFields(org.apache.lucene.document.Document newDoc,
org.apache.lucene.document.Document existingDoc)
throws Exception
addFrameworkFields in class ItemFileIndexingWriternewDoc - The feature to be added to the FrameworkFields attributeexistingDoc - The feature to be added to the FrameworkFields attribute
Exception - If an error occurs
|
DLESE Tools v1.6.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||