public class HarvestLogWriter extends java.lang.Object implements DocWriter
Document
fields that are created by this class are: requestdate
- The date of the client request. Stored. requesturl
- The URL and query the client requested. Stored.remotehost
- The requesting client's host name or IP address. Stored.notes
- Free text notes related to this log entry. Stored.doctype
- The document format type, which is 'weblog,' with '0' appended to support
wildcard searching.readerclass
- The class which is used to read Document
s created by this writer, which is 'WebLogReader'.admindefaultfield
- The default field that holds all content for searching.
'WebLogReader'.HarvestLogReader
Modifier and Type | Field and Description |
---|---|
static int |
COMPLETED_OAI_ERROR
NOT YET DOCUMENTED
|
static int |
COMPLETED_SERIOUS_ERROR
NOT YET DOCUMENTED
|
static int |
COMPLETED_SUCCESSFUL
NOT YET DOCUMENTED
|
static int |
HARVEST_IN_PROGRESS
NOT YET DOCUMENTED
|
Constructor and Description |
---|
HarvestLogWriter(java.lang.String repositoryName,
java.lang.String baseURL,
java.lang.String set,
java.lang.String shUid)
Constructor for the HarvestLogWriter object
|
Modifier and Type | Method and Description |
---|---|
protected void |
addToAdminDefaultField(java.lang.String value,
java.lang.StringBuffer adminDefaultBuffer)
Adds the given String to a text field referenced in the index by the field name 'default'.
|
java.lang.String |
getDocType()
Gets doctype, which is "harvestlog".
|
java.lang.String |
getReaderClass()
Gets the name of the concrete
DocReader class that is used to read
this type of Document , which is "HarvestLogReader". |
org.apache.lucene.document.Document |
logEntry(long harvestUid,
long startTime,
long endTime,
int recordCount,
int resumptionCount,
int messageType,
java.lang.String harvestedRecordsDir,
java.lang.String zipFilePathName,
java.lang.String supportedGranularity,
java.lang.String deletedRecordSupport,
java.lang.String oaiErrCode,
java.lang.String message)
Logs an entry in the index.
|
void |
setHarvestAttributes(java.util.Date from,
java.util.Date until)
Sets the harvest attributes for this harvest.
|
public static int HARVEST_IN_PROGRESS
public static int COMPLETED_SUCCESSFUL
public static int COMPLETED_OAI_ERROR
public static int COMPLETED_SERIOUS_ERROR
public HarvestLogWriter(java.lang.String repositoryName, java.lang.String baseURL, java.lang.String set, java.lang.String shUid)
repositoryName
- Repos namebaseURL
- baseUrlset
- set, or null if noneshUid
- The harvest Uidpublic java.lang.String getDocType()
getDocType
in interface DocWriter
public java.lang.String getReaderClass()
DocReader
class that is used to read
this type of Document
, which is "HarvestLogReader".getReaderClass
in interface DocWriter
public final void setHarvestAttributes(java.util.Date from, java.util.Date until)
from
- The from date or null if none useduntil
- The until date or null if none usedpublic final org.apache.lucene.document.Document logEntry(long harvestUid, long startTime, long endTime, int recordCount, int resumptionCount, int messageType, java.lang.String harvestedRecordsDir, java.lang.String zipFilePathName, java.lang.String supportedGranularity, java.lang.String deletedRecordSupport, java.lang.String oaiErrCode, java.lang.String message)
harvestUid
- Harvest UidstartTime
- Start timeendTime
- End timerecordCount
- Num recordsresumptionCount
- Num resumption tokens issuedmessageType
- The message typeharvestedRecordsDir
- Dir where harvested records are savedzipFilePathName
- Zip filesupportedGranularity
- GranularitydeletedRecordSupport
- Deleted record supportoaiErrCode
- OAI error code, or nullmessage
- Message to be loggedprotected final void addToAdminDefaultField(java.lang.String value, java.lang.StringBuffer adminDefaultBuffer)
value
- A text string to be added to the indexed field named 'default.'adminDefaultBuffer
- The feature to be added to the ToDefaultField attribute