Package org.dlese.dpc.index.reader
Class HarvestLogReader
java.lang.Object
org.dlese.dpc.index.reader.DocReader
org.dlese.dpc.index.reader.HarvestLogReader
A bean for accessing the data stored in a Lucene
Document that logs a
single OAI harvest. The index writer that is responsible for creating this type of Lucene Document is a HarvestLogWriter.- Author:
- John Weatherley
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor for the HarvestLogReader objectHarvestLogReader(org.apache.lucene.document.Document doc) Constructor that may be used programatically to wrap a reader around a LuceneDocumentcreated by aDocWriter. -
Method Summary
Modifier and TypeMethodDescriptionGets the baseUrl attribute of the HarvestLogReader objectprotected static final StringReturn a string for the current time and date, sutiable for display in log files and output to standout:Gets the level of support for deleted records of the data provider, or null if not available.Gets the end time as a Date, or null.Gets the endTime attribute of the HarvestLogReader objectlongGets the end time as a long, or -1 if not available.Gets the entryType attribute of the HarvestLogReader objectGets the from Date used for this harvest, or null if none was used.Gets the from datestamp of the form yyyy-MM-ddTHH:mm:ssZ used for this harvest, or null if none was used.Gets the harvestDir attribute of the HarvestLogReader objectGets the harvest duration for display, or null if not available.longGets the harvest duration as a long, or -1 if not avialble.The UID of an individual harvest that was performed.longGets the harvestUidLong attribute of the HarvestLogReader objectGets the logDate attribute of the HarvestLogReader objectGets the logMessage attribute of the HarvestLogReader objectGets the numHarvestedRecords attribute of the HarvestLogReader objectintGets the numHarvestedRecordsInt attribute of the HarvestLogReader objectGets the numResumptionTokens attribute of the HarvestLogReader objectintGets the numResumptionTokensInt attribute of the HarvestLogReader objectGets the OAI error code that was returned by the data provider, for example 'noRecordsMatch', or null if not applicable.Gets a String describing the reader type.Gets the repositoryName attribute of the HarvestLogReader objectgetSet()Gets the set if one was specified, or empty String.Gets the start time as a Date, or null.Gets the startTime attribute of the HarvestLogReader objectlongGets the start time as a long, or -1 if not available.Gets the date granularity supported by the data provider, or null if not available.getUid()The UID of the scheduled harvest.longGets the uidLong attribute of the HarvestLogReader objectGets the until Date used for this harvest, or null if none was used.Gets the until datestamp of the form yyyy-MM-ddTHH:mm:ssZ used for this harvest, or null if none was used.Gets the path to the zip file for this harvest, or null if none was saved.voidinit()Init method does nothing.Methods inherited from class org.dlese.dpc.index.reader.DocReader
doInit, getAttribute, getDocMap, getDocument, getIndex, getLazyDocMap, getQuery, getRepositoryManager, getScore, setDoc
-
Constructor Details
-
HarvestLogReader
public HarvestLogReader()Constructor for the HarvestLogReader object -
HarvestLogReader
public HarvestLogReader(org.apache.lucene.document.Document doc) Constructor that may be used programatically to wrap a reader around a LuceneDocumentcreated by aDocWriter. Sets the score to 0.- Parameters:
doc- A LuceneDocumentcreated by aDocWriter.
-
-
Method Details
-
init
public void init()Init method does nothing. -
getLogDate
Gets the logDate attribute of the HarvestLogReader object- Returns:
- The logDate value
-
getStartDate
Gets the start time as a Date, or null.- Returns:
- The startTime value
-
getStartTime
Gets the startTime attribute of the HarvestLogReader object- Returns:
- The startTime value
-
getStartTimeLong
public long getStartTimeLong()Gets the start time as a long, or -1 if not available.- Returns:
- The start time as a long
-
getEndDate
Gets the end time as a Date, or null.- Returns:
- The startTime value
-
getEndTime
Gets the endTime attribute of the HarvestLogReader object- Returns:
- The endTime value
-
getEndTimeLong
public long getEndTimeLong()Gets the end time as a long, or -1 if not available.- Returns:
- The end time or -1
-
getHarvestDurationLong
public long getHarvestDurationLong()Gets the harvest duration as a long, or -1 if not avialble.- Returns:
- The harvest duration
-
getHarvestDuration
Gets the harvest duration for display, or null if not available.- Returns:
- The harvest duration
-
getRepositoryName
Gets the repositoryName attribute of the HarvestLogReader object- Returns:
- The repositoryName value
-
getBaseUrl
Gets the baseUrl attribute of the HarvestLogReader object- Returns:
- The baseUrl value
-
getSet
Gets the set if one was specified, or empty String. Note that the index stores 'noset' for the set if none was specified.- Returns:
- The setSpec or empty String
-
getFromDatestamp
Gets the from datestamp of the form yyyy-MM-ddTHH:mm:ssZ used for this harvest, or null if none was used.- Returns:
- The from datestamp or null
-
getFromDate
Gets the from Date used for this harvest, or null if none was used.- Returns:
- The from Date or null
-
getUntilDatestamp
Gets the until datestamp of the form yyyy-MM-ddTHH:mm:ssZ used for this harvest, or null if none was used.- Returns:
- The until datestamp or null
-
getUntilDate
Gets the until Date used for this harvest, or null if none was used.- Returns:
- The until Date or null
-
getUid
The UID of the scheduled harvest.- Returns:
- The uid value
-
getUidLong
public long getUidLong()Gets the uidLong attribute of the HarvestLogReader object- Returns:
- The uidLong value
-
getHarvestUid
The UID of an individual harvest that was performed.- Returns:
- The harvestUid value
-
getHarvestUidLong
public long getHarvestUidLong()Gets the harvestUidLong attribute of the HarvestLogReader object- Returns:
- The harvestUidLong value
-
getNumHarvestedRecords
Gets the numHarvestedRecords attribute of the HarvestLogReader object- Returns:
- The numHarvestedRecords value
-
getNumHarvestedRecordsInt
public int getNumHarvestedRecordsInt()Gets the numHarvestedRecordsInt attribute of the HarvestLogReader object- Returns:
- The numHarvestedRecordsInt value
-
getNumResumptionTokens
Gets the numResumptionTokens attribute of the HarvestLogReader object- Returns:
- The numResumptionTokens value
-
getNumResumptionTokensInt
public int getNumResumptionTokensInt()Gets the numResumptionTokensInt attribute of the HarvestLogReader object- Returns:
- The numResumptionTokensInt value
-
getLogMessage
Gets the logMessage attribute of the HarvestLogReader object- Returns:
- The logMessage value
-
getHarvestDir
Gets the harvestDir attribute of the HarvestLogReader object- Returns:
- The harvestDir value
-
getZipFilePath
Gets the path to the zip file for this harvest, or null if none was saved.- Returns:
- The zip file path or null
-
getDeletedRecordSupport
Gets the level of support for deleted records of the data provider, or null if not available.- Returns:
- One of 'no', 'persistent', 'transient' or null
-
getSupportedGranularity
Gets the date granularity supported by the data provider, or null if not available.- Returns:
- One of 'days', 'seconds'or null
-
getOaiErrorCode
Gets the OAI error code that was returned by the data provider, for example 'noRecordsMatch', or null if not applicable. See OAI-PMH error codes .- Returns:
- The OAI error code or null
-
getEntryType
Gets the entryType attribute of the HarvestLogReader object- Returns:
- The entryType value
-
getReaderType
Gets a String describing the reader type. This may be used in (Struts) beans to determine which type of reader is available for a given search result and thus what data is available for display in the UI. The reader type implies which getter methods are available.- Specified by:
getReaderTypein classDocReader- Returns:
- The readerType value.
-
getDateStamp
Return a string for the current time and date, sutiable for display in log files and output to standout:- Returns:
- The dateStamp value
-