DLESE Tools
v1.6.0

org.dlese.dpc.index.reader
Class WebLogReader

java.lang.Object
  extended by org.dlese.dpc.index.reader.DocReader
      extended by org.dlese.dpc.index.reader.WebLogReader

public class WebLogReader
extends DocReader

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:
WebLogWriter

Field Summary
 
Fields inherited from class org.dlese.dpc.index.reader.DocReader
conf, doc, resultDoc, score
 
Constructor Summary
WebLogReader()
          Constructor for the WebLogReader object
WebLogReader(org.apache.lucene.document.Document doc)
          Constructor that may be used programatically to wrap a reader around a Lucene Document created by a DocWriter.
 
Method Summary
protected static String getDateStamp()
          Return a string for the current time and date, sutiable for display in log files and output to standout:
 String getNotes()
          Gets the notes attribute of the WebLogReader object
 String getReaderType()
          Gets a String describing the reader type.
 String getRemoteHost()
          Gets the IP address of the requesting remote host.
 String getRemoteHostName()
          Gets the fully qualified domain name the requesting IP.
 String getRequestDate()
          Gets the requestDate attribute of the WebLogReader object
 String getRequestUrl()
          Gets the requestUrl attribute of the WebLogReader object
 void init()
          Init method does nothing.
 
Methods inherited from class org.dlese.dpc.index.reader.DocReader
doInit, getAttribute, getDocMap, getDocument, getIndex, getLazyDocMap, getQuery, getRepositoryManager, getScore, setDoc
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 Lucene Document created by a DocWriter. Sets the score to 0.

Parameters:
doc - A Lucene Document created by a DocWriter.
Method Detail

init

public void init()
Init method does nothing.

Specified by:
init in class DocReader

getRequestDate

public String getRequestDate()
Gets the requestDate attribute of the WebLogReader object

Returns:
The requestDate value

getRequestUrl

public String getRequestUrl()
Gets the requestUrl attribute of the WebLogReader object

Returns:
The requestUrl value

getNotes

public String getNotes()
Gets the notes attribute of the WebLogReader object

Returns:
The notes value

getRemoteHost

public String getRemoteHost()
Gets the IP address of the requesting remote host.

Returns:
The remote host IP, for example 128.123.123.123

getRemoteHostName

public String 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

public String 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:
getReaderType in class DocReader
Returns:
The readerType value.

getDateStamp

protected static final String getDateStamp()
Return a string for the current time and date, sutiable for display in log files and output to standout:

Returns:
The dateStamp value

DLESE Tools
v1.6.0