public class ReportGenerator
extends java.lang.Object
| Constructor and Description |
|---|
ReportGenerator() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getItemInfo(Context context,
java.lang.String handle)
get the information for the item with the given handle
|
static void |
main(java.lang.String[] argv)
main method to be run from command line.
|
static Statistics |
prepareStats(java.util.Map<java.lang.String,java.lang.String> aggregator,
boolean sort,
boolean translate)
a standard stats block preparation method for use when an aggregator
has to be put out in its entirity.
|
static void |
processReport(Context context,
Report report,
java.lang.String myInput)
using the pre-configuration information passed here, read in the
aggregation data and output a file containing the report in the
requested format
|
static void |
processReport(Context context,
java.lang.String myFormat,
java.lang.String myInput,
java.lang.String myOutput,
java.lang.String myMap)
using the pre-configuration information passed here, read in the
aggregation data and output a file containing the report in the
requested format
this method is retained for backwards compatibility, but delegates the actual
wprk to a new method
|
static void |
readInput(java.lang.String input)
read the input file and populate all the class globals with the contents
The values that come from this file form the basis of the analysis report
|
static void |
readMap(java.lang.String map)
read in the action map file which converts log file line actions into
actions which are more understandable to humans
|
static void |
setParameters(java.lang.String myInput)
set the passed parameters up as global class variables.
|
static java.lang.String |
translate(java.lang.String text)
look the given text up in the action map table and return a translated
value if one exists.
|
static void |
usage()
output the usage information to the terminal
|
public static void main(java.lang.String[] argv)
throws java.lang.Exception,
java.sql.SQLException
java.lang.Exceptionjava.sql.SQLExceptionpublic static void processReport(Context context, java.lang.String myFormat, java.lang.String myInput, java.lang.String myOutput, java.lang.String myMap) throws java.lang.Exception, java.sql.SQLException
context - the DSpace context in which this action is performedmyFormat - the desired output format (currently on HTML supported)myInput - the aggregation file to be turned into a reportmyOutput - the file into which to write the reportjava.lang.Exceptionjava.sql.SQLExceptionpublic static void processReport(Context context, Report report, java.lang.String myInput) throws java.lang.Exception, java.sql.SQLException
java.lang.Exceptionjava.sql.SQLExceptionpublic static Statistics prepareStats(java.util.Map<java.lang.String,java.lang.String> aggregator, boolean sort, boolean translate)
aggregator - the aggregator that should be convertedsort - should the resulting stats be sorted by valuetranslate - translate the stat name using the map filepublic static java.lang.String translate(java.lang.String text)
text - the text to be translatedpublic static void readMap(java.lang.String map)
throws java.io.IOException
map - the map filejava.io.IOExceptionpublic static void setParameters(java.lang.String myInput)
myInput - regex for log file namespublic static void readInput(java.lang.String input)
throws java.io.IOException,
java.text.ParseException
input - the aggregator filejava.io.IOExceptionjava.text.ParseExceptionpublic static java.lang.String getItemInfo(Context context, java.lang.String handle) throws java.sql.SQLException
context - the DSpace context we are operating underhandle - the handle of the item being looked up, in the form
1234/567 and so forthjava.sql.SQLExceptionpublic static void usage()
Copyright © 2018 DuraSpace. All Rights Reserved.