|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.hawlitzek.logparser.LogEntry
This class represents one line in the http log. It parses the line into the fields for date, ip address, referrer etc. It also provides functionality to filter log entries by type, occurring names and search engines.
Constructor Summary | |
LogEntry()
|
Method Summary | |
java.lang.String |
getBrowser()
Gets the browser |
java.lang.String |
getClientIP()
Gets the clientIP |
java.util.Date |
getDate()
Gets the date |
java.lang.String |
getHttpMethod()
Gets the httpMethod |
java.lang.String |
getPage()
Gets the page |
java.lang.String |
getReferrer()
Gets the referrer |
java.lang.String |
getReturncode()
Gets the returncode |
boolean |
isGet()
checks, if a log entry belongs to a http GET request |
boolean |
isHtml()
checks, if a log entry is referring to an html page |
boolean |
isImage()
checks, if a log entry is referring to an image |
boolean |
isMainPage()
special function for NetObjects fusion generated sites checks, if a log entry is main html page or a sub frame |
boolean |
isOk()
checks, if the requested page could be delivered |
boolean |
matches(java.lang.String type,
java.lang.String[] filter)
checks, if a log entry matches to a given filter |
java.lang.String[] |
parseAltavistaKeywords()
searches for altavista keywords |
java.lang.String[] |
parseFireballKeywords()
searches for fireball keywords |
java.lang.String[] |
parseGoogleKeywords()
searches for google keywords |
static java.lang.String |
parseLine(java.lang.String line)
parses a line in the (log entry) an return the used browser type (fast method without creating LogEntry instances, only for detecting the browser type) |
static java.lang.String |
parseLine(java.lang.String line,
LogEntry logEntry)
parses a line in the (log entry) an return the used browser type If a LogEntry instance is provided, the instance is filled with the entries detail data |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LogEntry()
Method Detail |
public boolean isHtml()
public boolean isImage()
public boolean isMainPage()
public boolean matches(java.lang.String type, java.lang.String[] filter)
type
- type of the search: HTML: only html pages,
MAIN: only main html pages
IMG: only images
REF: look in referrer, not in requested ressource
filter
- set of AND combined search itemspublic boolean isGet()
public java.lang.String getBrowser()
public java.lang.String getClientIP()
public java.util.Date getDate()
public java.lang.String getHttpMethod()
public java.lang.String getPage()
public java.lang.String getReferrer()
public java.lang.String getReturncode()
public boolean isOk()
public static java.lang.String parseLine(java.lang.String line) throws InvalidLogEntryException
line
- one line in an http log file
InvalidLogEntryException
public static java.lang.String parseLine(java.lang.String line, LogEntry logEntry) throws InvalidLogEntryException
line
- one line in an http log filelogEntry
- object to be filled
InvalidLogEntryException
public java.lang.String[] parseGoogleKeywords()
public java.lang.String[] parseFireballKeywords()
public java.lang.String[] parseAltavistaKeywords()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |