org.novadeck.jxla.data
Class DayData

java.lang.Object
  |
  +--org.novadeck.jxla.data.DayData
All Implemented Interfaces:
java.io.Serializable

public class DayData
extends java.lang.Object
implements java.io.Serializable

contains all information read from log files about one day

See Also:
Serialized Form

Field Summary
protected  java.util.HashMap _hits
          keys are uris resquested
protected  java.util.HashMap _referers
          keys are list of referers
protected  java.util.HashMap _remote_ip
          keys are list of remote ips
 
Constructor Summary
DayData(int day, MonthData month)
          constructor
 
Method Summary
 void addLine(Line l)
          update day data with line information
 void dumpData(Output out)
          Write day report to the specified output
static void dumpEmptyData(Output out)
          generate an empty day report
 int getDay()
          to retrieve day of month
 long getFiles()
          Return the number of files requested in the current day.
 long getHits()
          retur the number of hit requested in current day
 long getPages()
          Return the number of pages requested in the current day
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_referers

protected java.util.HashMap _referers
keys are list of referers

_remote_ip

protected java.util.HashMap _remote_ip
keys are list of remote ips

_hits

protected java.util.HashMap _hits
keys are uris resquested
Constructor Detail

DayData

public DayData(int day,
               MonthData month)
constructor
Parameters:
day - day in the month
month - month information containing current day
Method Detail

getDay

public int getDay()
to retrieve day of month
Returns:
day number

addLine

public void addLine(Line l)
update day data with line information
Parameters:
l - a log line parsed

dumpData

public void dumpData(Output out)
              throws java.io.IOException
Write day report to the specified output
Parameters:
out - output stream to write the report
Throws:
IOException - if an IO error occures

dumpEmptyData

public static void dumpEmptyData(Output out)
                          throws java.io.IOException
generate an empty day report
Parameters:
out - output where to write the report
Throws:
IOException - IO error

getHits

public long getHits()
retur the number of hit requested in current day
Returns:
hit numbers

getFiles

public long getFiles()
Return the number of files requested in the current day.
Returns:
files count

getPages

public long getPages()
Return the number of pages requested in the current day
Returns:
pages count