|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dspace.app.statistics.ReportGenerator
public class ReportGenerator
This class performs the action of coordinating a usage report being generated using the standard internal aggregation file format as a basis. All it's configuration information must come from that file. There is the opportunity for different output format options such as HTML. Use the -help flag for more information
| Constructor Summary | |
|---|---|
ReportGenerator()
|
|
| Method Summary | |
|---|---|
static String |
getItemInfo(Context context,
String handle)
get the information for the item with the given handle |
static void |
main(String[] argv)
main method to be run from command line. |
static Statistics |
prepareStats(Map 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,
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,
String myFormat,
String myInput,
String myOutput,
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(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(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(String myInput)
set the passed parameters up as global class variables. |
static String |
translate(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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ReportGenerator()
| Method Detail |
|---|
public static void main(String[] argv)
throws Exception,
SQLException
Exception
SQLException
public static void processReport(Context context,
String myFormat,
String myInput,
String myOutput,
String myMap)
throws Exception,
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 report
Exception
SQLException
public static void processReport(Context context,
Report report,
String myInput)
throws Exception,
SQLException
Exception
SQLException
public static Statistics prepareStats(Map 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 file
public static String translate(String text)
text - the text to be translated
public static void readMap(String map)
throws IOException
map - the map file
IOExceptionpublic static void setParameters(String myInput)
myInput - regex for log file names
public static void readInput(String input)
throws IOException,
ParseException
input - the aggregator file
IOException
ParseException
public static String getItemInfo(Context context,
String handle)
throws SQLException
context - the DSpace context we are operating underhandle - the handle of the item being looked up, in the form
1234/567 and so forth
SQLExceptionpublic static void usage()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||