Constructor and Description |
---|
SummaryReport()
empty constructor for SummaryReport analyzer.
|
SummaryReport(java.util.Properties properties)
Constructor for SummaryReport analyzer.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getOutputFilePath()
Retrieves values from properties for path to output file.
|
int |
getTotalTokensCount()
Accessor for the totalTokensCount instance variable.
|
void |
processToken(java.lang.String token)
Processes a single token by incrementing totalTokensCount.
|
void |
writeOutputFile(java.lang.String inputFilePath)
Manages report creation.
|
void |
writeReportContent(java.io.PrintWriter summaryReport,
java.lang.String inputFilePath)
Writes a text file summary report including timestamp and total tokens.
|
public SummaryReport()
public SummaryReport(java.util.Properties properties)
properties
- Properties - Properties file values for this analyzer.public int getTotalTokensCount()
public void processToken(java.lang.String token)
processToken
in interface Analyzer
token
- String - a single text token.public void writeOutputFile(java.lang.String inputFilePath)
writeOutputFile
in interface Analyzer
inputFilePath
- String - Path of the file being analyzed.public java.lang.String getOutputFilePath()
public void writeReportContent(java.io.PrintWriter summaryReport, java.lang.String inputFilePath) throws java.io.IOException, java.lang.Exception
summaryReport
- PrintWriter - File for report output.inputFilePath
- String - Path of the file being analyzed.java.io.IOException
java.lang.Exception