Package org.dlese.dpc.index.reader
Class WebLogReader
java.lang.Object
org.dlese.dpc.index.reader.DocReader
org.dlese.dpc.index.reader.WebLogReader
A bean for accessing the data stored in a Lucene
Document that logs a
single web request. The index writer that is responsible for creating this type of Lucene Document is a WebLogWriter.- Author:
- John Weatherley
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor for the WebLogReader objectWebLogReader(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 TypeMethodDescriptionprotected static final StringReturn a string for the current time and date, sutiable for display in log files and output to standout:getNotes()Gets the notes attribute of the WebLogReader objectGets a String describing the reader type.Gets the IP address of the requesting remote host.Gets the fully qualified domain name the requesting IP.Gets the requestDate attribute of the WebLogReader objectGets the requestUrl attribute of the WebLogReader objectvoidinit()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
-
WebLogReader
public WebLogReader()Constructor for the WebLogReader object -
WebLogReader
public WebLogReader(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. -
getRequestDate
Gets the requestDate attribute of the WebLogReader object- Returns:
- The requestDate value
-
getRequestUrl
Gets the requestUrl attribute of the WebLogReader object- Returns:
- The requestUrl value
-
getNotes
Gets the notes attribute of the WebLogReader object- Returns:
- The notes value
-
getRemoteHost
Gets the IP address of the requesting remote host.- Returns:
- The remote host IP, for example 128.123.123.123
-
getRemoteHostName
Gets the fully qualified domain name the requesting IP. Best effort method, meaning we may not be able to return the FQDN depending on the underlying system configuration. If not avaialable, the the IP address is returned instead.- Returns:
- The remote host domain name, for example mysite.org, or IP address if not available
-
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
-