|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.dlese.dpc.index.writer.FileIndexingServiceWriter org.dlese.dpc.index.writer.XMLFileIndexingWriter org.dlese.dpc.index.writer.DleseCollectionFileIndexingWriter
public class DleseCollectionFileIndexingWriter
Used to write a Lucene Document
for a DLESE Collection XML record. The
reader for this type of Document
is DleseCollectionDocReader
.
XMLDocReader
,
RecordDataService
,
FileIndexingServiceWriter
Nested Class Summary | |
---|---|
static class |
DleseCollectionFileIndexingWriter.CollectionAccessionStatusComparator
Allows sorting of a Collection accession status XML Node, by date giving precedence to status = accessioned if dates are equal. |
Constructor Summary | |
---|---|
DleseCollectionFileIndexingWriter()
Create a DleseCollectionFileIndexingWriter. |
Method Summary | |
---|---|
protected String[] |
_getIds()
Gets the ID of this collection record. |
protected void |
addFields(org.apache.lucene.document.Document newDoc,
org.apache.lucene.document.Document existingDoc,
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. |
protected void |
finalize()
Perform finalization... |
protected Date |
getAccessionDate()
Returns the accession date or null if this collection is not currently accessioned. |
protected String |
getAccessionStatus()
Gets the most recent accession status found in the XML record. |
String |
getAdditionalMetadata()
Gets the additional metadata for this collection that was indicated in org.dlese.dpc.repository.RepositoryManager.putRecord when the collection was created inside an
additionalMetadata element, or null. |
protected String |
getCollectionStatuses()
Gets the collectionStatus attribute of the DleseCollectionFileIndexingWriter object |
protected String |
getCost()
Gets the cost associated with this collection. |
static String |
getCurrentCollectionStatus(Document doc)
Gets the status of the collection based on the values in the collection-level record. |
org.apache.lucene.document.Document |
getDeletedDoc_OFF_2006_08_23(org.apache.lucene.document.Document existingDoc)
Creates a Lucene Document from an existing CollectionFileIndexing
Document by setting the field "deleted" to "true" and making the modtime equal to current time. |
String |
getDescription()
The description for the collection. |
String |
getDocType()
Gets the docType attribute of the DleseCollectionFileIndexingWriter, which is 'dlesecollect.' |
protected String |
getFormatOfRecords()
Gets the format of the records in this collection. |
protected String |
getFullTitle()
Returns the full title for the collection. |
protected String[] |
getGradeRanges()
Gets the gradeRanges for this collection. |
protected String |
getKey()
Gets the collection key used to identify the items in the collection this record refers to. |
protected String |
getKeywords()
Gets the keywords associated with this collection. |
static long |
getNumInstances()
Gets the numInstances attribute of the DleseCollectionFileIndexingWriter class |
protected String |
getPartOfDRC()
Gets whether the collection is part of the DRC [true|false]. |
String |
getReaderClass()
Gets the name of the concrete DocReader class that is used to read
this type of Document , which is "DleseCollectionDocReader". |
protected String |
getReviewProcess()
Gets the collection's review process statement. |
protected String |
getReviewProcessUrl()
Gets the URL to the collection's review process statement. |
protected String |
getScopeUrl()
Gets the URL to the collection's scope statement. |
protected String |
getShortTitle()
Returns the short title for the collection. |
protected String[] |
getSubjects()
Gets the subjects for this collection. |
String |
getTitle()
Gets the full title |
String[] |
getUrls()
Gets the URL to the collection. |
protected 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 Date |
getWhatsNewDate()
Returns the date used to determine "What's new" in the library. |
protected String |
getWhatsNewType()
Returns 'collection'. |
boolean |
indexFullContentInDefaultAndStems()
Default and stems fields handled here, so do not index full content. |
void |
init(File source,
org.apache.lucene.document.Document existingDoc)
Performs the necessary init functions (nothing done). |
Methods inherited from class org.dlese.dpc.index.writer.XMLFileIndexingWriter |
---|
addCustomFields, getBoundingBox, getCollections, getDeletedDoc, getDocGroup, getDom4jDoc, getFieldContent, getFieldContent, getFieldName, getIds, getIndex, getMyAnnoResultDocs, getMyCollectionDoc, getOaiModtime, getPrimaryId, getRecordDataService, getRelatedIds, getRelatedIdsMap, getRelatedUrls, getRelatedUrlsMap, getTermStringFromStringArray, getXmlIndexer, getXmlIndexerFieldsConfig |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DleseCollectionFileIndexingWriter()
Method Detail |
---|
protected void finalize() throws Throwable
finalize
in class Object
Throwable
- If errorpublic static long getNumInstances()
protected String getFullTitle() throws Exception
Exception
- If error reading XML.protected String getShortTitle() throws Exception
Exception
- If error reading XML.public String getTitle() throws Exception
getTitle
in class XMLFileIndexingWriter
Exception
- If errorpublic String getDescription() throws Exception
getDescription
in class XMLFileIndexingWriter
Exception
- If error reading XML.public String getAdditionalMetadata()
org.dlese.dpc.repository.RepositoryManager.putRecord
when the collection was created inside an
additionalMetadata element, or null.
protected String getPartOfDRC() throws Exception
Exception
- If errorprotected String getAccessionStatus() throws Exception
Exception
- If errorprotected String getCollectionStatuses() throws Exception
Exception
- If errorprotected String getKey() throws Exception
Exception
- If errorpublic String[] getUrls() throws Exception
getUrls
in class XMLFileIndexingWriter
Exception
- If errorprotected String getScopeUrl() throws Exception
Exception
- If errorprotected String getReviewProcessUrl() throws Exception
Exception
- If errorprotected String getReviewProcess() throws Exception
Exception
- If errorprotected String getFormatOfRecords() throws Exception
Exception
- If errorprotected String getCost() throws Exception
Exception
- If errorprotected String getKeywords() throws Exception
Exception
- NOT YET DOCUMENTEDprotected String[] getGradeRanges() throws Exception
Exception
- NOT YET DOCUMENTEDprotected String[] getSubjects() throws Exception
Exception
- NOT YET DOCUMENTEDprotected String[] _getIds() throws Exception
_getIds
in class XMLFileIndexingWriter
Exception
- If errorpublic String getDocType()
getDocType
in interface DocWriter
getDocType
in class FileIndexingServiceWriter
public String getReaderClass()
DocReader
class that is used to read
this type of Document
, which is "DleseCollectionDocReader".
getReaderClass
in interface DocWriter
getReaderClass
in class FileIndexingServiceWriter
protected Date getAccessionDate() throws Exception
Exception
- This method should throw and Exception with appropriate error message if an error
occurs.protected Date getWhatsNewDate() throws Exception
getWhatsNewDate
in class XMLFileIndexingWriter
Exception
- This method should throw and Exception with appropriate error message if an error
occurs.protected String getWhatsNewType()
getWhatsNewType
in class XMLFileIndexingWriter
public void init(File source, org.apache.lucene.document.Document existingDoc) throws 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 present
Exception
- If an error occured during set-up.protected void destroy()
destroy
in class FileIndexingServiceWriter
protected String getValidationReport() throws Exception
getValidationReport
in class FileIndexingServiceWriter
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, File sourceFile) throws 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.
Exception
- If an error occurspublic org.apache.lucene.document.Document getDeletedDoc_OFF_2006_08_23(org.apache.lucene.document.Document existingDoc) throws Throwable
Document
from an existing CollectionFileIndexing
Document by setting the field "deleted" to "true" and making the modtime equal to current time.
existingDoc
- An existing FileIndexingService Document that currently resides in the index for
the given resource.
Throwable
- Thrown if error occurspublic static final String getCurrentCollectionStatus(Document doc)
doc
- A dlese_collect XML Document
|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |