Class WebLogReader

java.lang.Object
org.dlese.dpc.index.reader.DocReader
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:
  • 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 Lucene Document created by a DocWriter. Sets the score to 0.
      Parameters:
      doc - A Lucene Document created by a DocWriter.
  • Method Details

    • 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