corpus-services
1.0
|
Public Member Functions | |
Report () | |
void | merge (Report sr) |
void | addReportItem (String statId, ReportItem reportItem) |
void | addCritical (String description) |
void | addCritical (String statId, String description) |
void | addCritical (String statId, String description, String extraBlah) |
void | addCritical (String statId, Throwable e, String description, String extrablah) |
void | addCritical (String statId, Throwable e, String description) |
void | addCritical (String statId, CorpusData cd, String description) |
void | addFix (String statId, CorpusData cd, String description) |
void | addWarning (String statId, String description) |
void | addWarning (String statId, String description, String extraBlah) |
void | addWarning (String statId, Throwable e, String description, String extrablah) |
void | addWarning (String statId, CorpusData cd, String description) |
void | addMissing (String statId, String description) |
void | addMissing (String statId, CorpusData cd, String description) |
void | addCorrect (String statId, String description) |
void | addCorrect (String statId, String filename, String description) |
void | addCorrect (String statId, CorpusData cd, String description) |
void | addNote (String statId, String description) |
void | addNote (String statId, Throwable e, String description) |
void | addNote (String statId, Throwable e, String description, String extrablah) |
void | addNote (String statId, String description, String extraBlah) |
void | addNote (String statId, CorpusData cd, String description) |
void | addException (Throwable e, String description) |
void | addException (String statId, Throwable e, String description) |
void | addException (String statId, Throwable e, String description, String extrablah) |
void | addException (Throwable e, String statId, CorpusData cd, String description) |
String | getSummaryLine (String statId) |
String | getAllAsSummaryLine () |
String | getSummaryLines () |
String | getErrorReport (String statId) |
String | getWarningReport (String statId) |
String | getErrorReports () |
String | getWarningReports () |
String | getFullReport (String statId) |
String | getFullReports () |
Collection< ReportItem > | getRawStatistics () |
Collection< ReportItem > | getErrorStatistics () |
String | getFixJson (Corpus corpus) throws JDOMException |
String | getFixJson () |
String | getFixLine (String statId, Corpus corpus) throws JDOMException |
String | getFixLine (String statId) |
Public Attributes | |
final String | ROOT_BUCKET = "root" |
Statistics report is a container class to facilitate building reports for different validators and other file processors. The statistics consist of "messages" that are singular events of success, failure or other notes, categorised in named buckets. It's quite generic, the main point is to create reports like:
File "xyz.xml" has: 1567 of things and stuff: 95 % done correctly, 1 % missing, and 4 % with errors (see details here: ___) 12400 of annotations: 100 % done correctly, 7 % with warnings.
Definition at line 36 of file Report.java.
de.uni_hamburg.corpora.Report.Report | ( | ) |
Create empty report.
Definition at line 65 of file Report.java.
void de.uni_hamburg.corpora.Report.addCorrect | ( | String | statId, |
String | description | ||
) |
Add note for correctly formatted data in named statistics bucket.
Definition at line 217 of file Report.java.
void de.uni_hamburg.corpora.Report.addCorrect | ( | String | statId, |
String | filename, | ||
String | description | ||
) |
Add note for correctly formatted data in named statistics bucket with filenamre
Definition at line 227 of file Report.java.
void de.uni_hamburg.corpora.Report.addCorrect | ( | String | statId, |
CorpusData | cd, | ||
String | description | ||
) |
Add a correct note in named statistics bucket. with CorpusData object
Definition at line 236 of file Report.java.
void de.uni_hamburg.corpora.Report.addCritical | ( | String | description | ) |
Add a critical error in the root log.
Definition at line 104 of file Report.java.
void de.uni_hamburg.corpora.Report.addCritical | ( | String | statId, |
String | description | ||
) |
Add a critical error in named statistics bucket.
Definition at line 111 of file Report.java.
void de.uni_hamburg.corpora.Report.addCritical | ( | String | statId, |
String | description, | ||
String | extraBlah | ||
) |
Add a critical error in named statistics bucket.
Definition at line 122 of file Report.java.
void de.uni_hamburg.corpora.Report.addCritical | ( | String | statId, |
Throwable | e, | ||
String | description, | ||
String | extrablah | ||
) |
Add note for correctly formatted data in named statistics bucket.
Definition at line 129 of file Report.java.
void de.uni_hamburg.corpora.Report.addCritical | ( | String | statId, |
Throwable | e, | ||
String | description | ||
) |
Add a critical error in named statistics bucket.
Definition at line 139 of file Report.java.
void de.uni_hamburg.corpora.Report.addCritical | ( | String | statId, |
CorpusData | cd, | ||
String | description | ||
) |
Add a critical error in named statistics bucket. with CorpusData object
Definition at line 146 of file Report.java.
void de.uni_hamburg.corpora.Report.addException | ( | Throwable | e, |
String | description | ||
) |
Add error with throwable to root log.
Definition at line 287 of file Report.java.
void de.uni_hamburg.corpora.Report.addException | ( | String | statId, |
Throwable | e, | ||
String | description | ||
) |
Add error with throwable in statistics bucket. The exception provides extra information about the error, ideally e.g. when parsing a file if error comes in form of exception is a good idea to re-use the throwable in statistics.
Definition at line 297 of file Report.java.
void de.uni_hamburg.corpora.Report.addException | ( | String | statId, |
Throwable | e, | ||
String | description, | ||
String | extrablah | ||
) |
Add error with throwable in statistics bucket. The exception provides
Definition at line 306 of file Report.java.
void de.uni_hamburg.corpora.Report.addException | ( | Throwable | e, |
String | statId, | ||
CorpusData | cd, | ||
String | description | ||
) |
Add a exception in named statistics bucket. with CorpusData object
Definition at line 314 of file Report.java.
void de.uni_hamburg.corpora.Report.addFix | ( | String | statId, |
CorpusData | cd, | ||
String | description | ||
) |
Add a critical error in named statistics bucket. with CorpusData object
Definition at line 155 of file Report.java.
void de.uni_hamburg.corpora.Report.addMissing | ( | String | statId, |
String | description | ||
) |
Add error about missing data in named statistics bucket.
Definition at line 199 of file Report.java.
void de.uni_hamburg.corpora.Report.addMissing | ( | String | statId, |
CorpusData | cd, | ||
String | description | ||
) |
Add a critical error in named statistics bucket. with CorpusData object
Definition at line 208 of file Report.java.
void de.uni_hamburg.corpora.Report.addNote | ( | String | statId, |
String | description | ||
) |
Add note for correctly formatted data in named statistics bucket.
Definition at line 245 of file Report.java.
void de.uni_hamburg.corpora.Report.addNote | ( | String | statId, |
Throwable | e, | ||
String | description | ||
) |
Add note for correctly formatted data in named statistics bucket.
Definition at line 254 of file Report.java.
void de.uni_hamburg.corpora.Report.addNote | ( | String | statId, |
Throwable | e, | ||
String | description, | ||
String | extrablah | ||
) |
Add note for correctly formatted data in named statistics bucket.
Definition at line 261 of file Report.java.
void de.uni_hamburg.corpora.Report.addNote | ( | String | statId, |
String | description, | ||
String | extraBlah | ||
) |
Add note for correctly formatted data in named statistics bucket.
Definition at line 269 of file Report.java.
void de.uni_hamburg.corpora.Report.addNote | ( | String | statId, |
CorpusData | cd, | ||
String | description | ||
) |
Add a correct note in named statistics bucket. with CorpusData object
Definition at line 276 of file Report.java.
void de.uni_hamburg.corpora.Report.addReportItem | ( | String | statId, |
ReportItem | reportItem | ||
) |
Add a complete ReportItem in the root log. Not sure if this was meant to work like this, I thought it may be needed to add ReportItems generated by corpusFunctions?
Definition at line 94 of file Report.java.
void de.uni_hamburg.corpora.Report.addWarning | ( | String | statId, |
String | description | ||
) |
Add a non-critical error in named statistics bucket.
Definition at line 164 of file Report.java.
void de.uni_hamburg.corpora.Report.addWarning | ( | String | statId, |
String | description, | ||
String | extraBlah | ||
) |
Add a non-critical error in named statistics bucket.
Definition at line 175 of file Report.java.
void de.uni_hamburg.corpora.Report.addWarning | ( | String | statId, |
Throwable | e, | ||
String | description, | ||
String | extrablah | ||
) |
Add note for correctly formatted data in named statistics bucket.
Definition at line 182 of file Report.java.
void de.uni_hamburg.corpora.Report.addWarning | ( | String | statId, |
CorpusData | cd, | ||
String | description | ||
) |
Add a critical error in named statistics bucket. with CorpusData object
Definition at line 190 of file Report.java.
String de.uni_hamburg.corpora.Report.getAllAsSummaryLine | ( | ) |
Generate a one-line text-only message summarising the named bucket.
Definition at line 350 of file Report.java.
String de.uni_hamburg.corpora.Report.getErrorReport | ( | String | statId | ) |
Generate error report for given bucket. Includes only severe errors and problems in detail.
Definition at line 401 of file Report.java.
String de.uni_hamburg.corpora.Report.getErrorReports | ( | ) |
Generate error reports for all buckets.
Definition at line 444 of file Report.java.
Collection<ReportItem> de.uni_hamburg.corpora.Report.getErrorStatistics | ( | ) |
Get single collection of only error statistics.
Definition at line 511 of file Report.java.
String de.uni_hamburg.corpora.Report.getFixJson | ( | Corpus | corpus | ) | throws JDOMException |
Generate summaries for all buckets.
Definition at line 532 of file Report.java.
String de.uni_hamburg.corpora.Report.getFixJson | ( | ) |
Generate summaries for all buckets.
Definition at line 545 of file Report.java.
String de.uni_hamburg.corpora.Report.getFixLine | ( | String | statId, |
Corpus | corpus | ||
) | throws JDOMException |
Generate a one-line text-only message summarising the named bucket.
Definition at line 558 of file Report.java.
String de.uni_hamburg.corpora.Report.getFixLine | ( | String | statId | ) |
Generate a one-line text-only message summarising the named bucket.
Definition at line 615 of file Report.java.
String de.uni_hamburg.corpora.Report.getFullReport | ( | String | statId | ) |
Generate verbose report for given bucket.
Definition at line 468 of file Report.java.
String de.uni_hamburg.corpora.Report.getFullReports | ( | ) |
Generate verbose reports for all buckets.
Definition at line 487 of file Report.java.
Collection<ReportItem> de.uni_hamburg.corpora.Report.getRawStatistics | ( | ) |
Get single collection of statistics.
Definition at line 499 of file Report.java.
String de.uni_hamburg.corpora.Report.getSummaryLine | ( | String | statId | ) |
Generate a one-line text-only message summarising the named bucket.
Definition at line 323 of file Report.java.
String de.uni_hamburg.corpora.Report.getSummaryLines | ( | ) |
Generate summaries for all buckets.
Definition at line 386 of file Report.java.
String de.uni_hamburg.corpora.Report.getWarningReport | ( | String | statId | ) |
Generate error report for given bucket. Includes only severe errors and problems in detail.
Definition at line 423 of file Report.java.
String de.uni_hamburg.corpora.Report.getWarningReports | ( | ) |
Generate error reports for all buckets.
Definition at line 456 of file Report.java.
void de.uni_hamburg.corpora.Report.merge | ( | Report | sr | ) |
Merge two error reports. Efficiently adds statistics from other report to this one.
Definition at line 73 of file Report.java.
final String de.uni_hamburg.corpora.Report.ROOT_BUCKET = "root" |
Special statistics counter for higher level exceptions. I use this to produce an error count with no possible successes, a bit like root logger in logging
Definition at line 45 of file Report.java.