public class WebLogEntryWriter extends java.lang.Object implements DocWriter
Document
for data in a single web
log entry. Uderstands a log file in the format of the 'Combined Log Format' extension
of the Common Log Format (CLF) with additional extensions added by the DLESE query
logger. See the
Apache logs docs for info about the Combined Log Format, ClfLogger
and DDSQueryAction
method logQuery() for info about the DLESE query log extensions.Constructor and Description |
---|
WebLogEntryWriter()
Constructor for the WebLogEntryWriter object
|
Modifier and Type | Method and Description |
---|---|
protected void |
addToAdminDefaultField(java.lang.String value,
java.lang.StringBuffer defaultFieldStringBuffer)
Adds the given String to a text field referenced in the index by the field name
'default'.
|
org.apache.lucene.document.Document |
createLogEntryDoc(java.lang.String logEntry)
Create a log entry Document, storing and indexing the given notes.
|
java.lang.String |
getDocType()
Gets doctype, which is "weblog".
|
java.lang.String |
getReaderClass()
Gets the name of the concrete
DocReader class that
is used to read this type of Document , which is
"WebLogEntryReader". |
protected void |
prtln(java.lang.String s)
Output a line of text to standard out, with datestamp, if debug is set to true.
|
protected void |
prtlnErr(java.lang.String s)
Output a line of text to error out, with datestamp.
|
static java.lang.String |
removeHexChars(java.lang.String string)
Unencodes chars that have been encoded into hex.
|
static void |
setDebug(boolean db)
Sets the debug attribute of the FileIndexingServiceWriter object
|
static java.lang.String |
tokenizeString(java.lang.String string)
Tokenizes a String by removing all the non-letter/number chars.
|
public WebLogEntryWriter()
public java.lang.String getDocType()
getDocType
in interface DocWriter
public java.lang.String getReaderClass()
DocReader
class that
is used to read this type of Document
, which is
"WebLogEntryReader".getReaderClass
in interface DocWriter
public final org.apache.lucene.document.Document createLogEntryDoc(java.lang.String logEntry)
logEntry
- A single logEntry lineprotected final void addToAdminDefaultField(java.lang.String value, java.lang.StringBuffer defaultFieldStringBuffer)
value
- A text string to be added to the indexed field named
'default.'defaultFieldStringBuffer
- The feature to be added to the ToDefaultField
attributepublic static final java.lang.String tokenizeString(java.lang.String string)
string
- A Stringpublic static final java.lang.String removeHexChars(java.lang.String string)
string
- A Stringprotected final void prtlnErr(java.lang.String s)
s
- The text that will be output to error out.protected final void prtln(java.lang.String s)
s
- The String that will be output.public static final void setDebug(boolean db)
db
- The new debug value