public abstract class MapperEntry
extends java.lang.Object
implements uk.ac.ed.epcc.webapp.Contexed, java.lang.Cloneable
PlotEntry UsageProducer and
RecordSelector. Each combination of a MapperEntry and a PlotEntry adds an additional
dataset to the chart. If multiple properties are to be added then this should be performed as
multiple datasets.
Note that the chart quantity is set from the PlotEntry (if not already set). Therefore by default
if multiple PlotEntries are added the first one will set the chart Quantity.| Modifier and Type | Field and Description |
|---|---|
protected uk.ac.ed.epcc.webapp.AppContext |
conn |
| Constructor and Description |
|---|
MapperEntry(uk.ac.ed.epcc.webapp.AppContext c,
java.lang.String name,
java.lang.String description) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
compatible(UsageProducer<?> ap) |
boolean |
equals(java.lang.Object obj) |
static MapperEntry |
getConfigMapperEntry(uk.ac.ed.epcc.webapp.AppContext conn,
uk.ac.ed.epcc.webapp.config.FilteredProperties prop,
PropertyFinder finder,
java.lang.String name) |
static MapperEntry |
getConfigMapperEntry(uk.ac.ed.epcc.webapp.AppContext conn,
PropertyFinder finder,
java.lang.String name) |
uk.ac.ed.epcc.webapp.AppContext |
getContext() |
java.lang.String |
getDescription() |
protected abstract UsageRecordQueryMapper |
getInnerQueryMapper(RecordSelector sel,
Reduction red,
PropExpression<? extends java.lang.Number> prop_tag,
PropertyTag<java.util.Date> start_prop,
PropertyTag<java.util.Date> end_prop)
Get a QueryMapper that combined records completely within a specified period
This is intended to be used as part of an overlap calculation.
|
protected java.util.Vector<java.lang.String> |
getLabels() |
abstract uk.ac.ed.epcc.webapp.charts.strategy.SetRangeMapper |
getMapper(PlotEntry e) |
static java.util.Set<MapperEntry> |
getMappers(uk.ac.ed.epcc.webapp.AppContext c,
UsageProducer up) |
static java.util.Set<MapperEntry> |
getMappers(uk.ac.ed.epcc.webapp.AppContext c,
UsageProducer up,
java.lang.String mode) |
static java.util.Set<MapperEntry> |
getMapperSet(PropertyFinder finder,
uk.ac.ed.epcc.webapp.AppContext c,
java.lang.String mode)
Get the set of MappeEntrys defined by the config properties
|
static java.lang.String |
getMapType(java.lang.String plot_type,
java.util.Set<MapperEntry> list) |
java.lang.String |
getName() |
protected abstract UsageRecordQueryMapper |
getOverlapQueryMapper(RecordSelector s,
Reduction red,
PropExpression<? extends java.lang.Number> prop_tag,
PropertyTag<java.util.Date> start_prop,
PropertyTag<java.util.Date> end_prop)
Get a Query mapper that combined records based on the overlap of records
defined by a pair of properties as defined in
OverlapHandler |
protected abstract UsageRecordQueryMapper |
getPointQueryMapper(RecordSelector sel,
Reduction red,
PropExpression<? extends java.lang.Number> prop_tag,
PropertyTag<java.util.Date> end_prop)
Get a Query mapper that combined records selected on a single Date Property
No ovrelapp is considered.
|
int |
hashCode() |
boolean |
isCumulative()
Should the data be converted to a cummulative plot
|
boolean |
isStacked()
Should the data be converted to a stacked plot
|
uk.ac.ed.epcc.webapp.charts.PeriodSetPlot |
makeBarTimeChartPlot(PlotEntry e,
uk.ac.ed.epcc.webapp.charts.BarTimeChart tc,
UsageProducer ap,
RecordSelector sel,
int nplots,
boolean allow_overlap) |
uk.ac.ed.epcc.webapp.charts.PeriodSetPlot |
makePieTimeChartPlot(PlotEntry e,
uk.ac.ed.epcc.webapp.charts.PieTimeChart tc,
UsageProducer ap,
RecordSelector sel,
int nplots,
boolean overlap)
Generate a dataset for a PieTimeChart using this mapper.
|
<P extends uk.ac.ed.epcc.webapp.charts.PeriodSequencePlot> |
makeTimeChartPlot(PlotEntry e,
uk.ac.ed.epcc.webapp.charts.TimeChart<P> tc,
UsageProducer<?> ap,
RecordSelector request_sel,
int nplots,
boolean allow_overlap,
boolean use_line,
boolean graph_transforms)
Make a dataset for a TimeChart and plot data to it usign this transform.
|
static java.lang.String |
MapSelector(java.lang.String plot_type,
java.util.Set<MapperEntry> list)
Generate a HTML selector for the possible Mappers
|
static MapperEntry |
parseMapSelector(java.lang.String plot_type,
java.util.Set<MapperEntry> list)
parse the HTML request for the possible mappers.
|
boolean |
plot(boolean graph_transform,
PlotEntry e,
uk.ac.ed.epcc.webapp.charts.PeriodChart tc,
UsageProducer ap,
RecordSelector sel,
int nplots,
boolean allow_overlap) |
boolean |
plot(boolean graph_transforms,
PlotEntry e,
uk.ac.ed.epcc.webapp.charts.TimeChart<?> tc,
UsageProducer<?> ap,
RecordSelector sel,
int nplots,
boolean allow_overlap)
plot data on a TimeChart using this SimpleMapper
|
boolean |
plot(PlotEntry e,
uk.ac.ed.epcc.webapp.charts.BarTimeChart tc,
UsageProducer ap,
RecordSelector sel,
int nplots,
boolean allow_overlap)
plot data on a PieTimeChart using this mapper
|
boolean |
plot(PlotEntry e,
uk.ac.ed.epcc.webapp.charts.PieTimeChart tc,
UsageProducer ap,
RecordSelector sel,
int nplots,
boolean overlap)
plot data on a PieTimeChart using this mapper
|
boolean |
plot(PlotEntry e,
uk.ac.ed.epcc.webapp.charts.TimeChart<?> tc,
UsageProducer<?> ap,
RecordSelector sel,
int nplots,
boolean allow_overlap) |
<P extends uk.ac.ed.epcc.webapp.charts.PeriodSequencePlot> |
plot(PlotEntry e,
uk.ac.ed.epcc.webapp.charts.TimeChart<P> tc,
UsageProducer<?> ap,
RecordSelector request_sel,
int nplots,
boolean allow_overlap,
boolean use_line,
boolean graph_transforms)
make and plot a single dataset.
|
void |
plotBarTimeChart(PlotEntry e,
uk.ac.ed.epcc.webapp.charts.BarTimeChart tc,
int nplots,
uk.ac.ed.epcc.webapp.charts.SingleValueSetPlot ds) |
void |
plotPieTimeChart(PlotEntry e,
uk.ac.ed.epcc.webapp.charts.PieTimeChart tc,
int nplots,
uk.ac.ed.epcc.webapp.charts.SingleValueSetPlot ds) |
<P extends uk.ac.ed.epcc.webapp.charts.PeriodSequencePlot> |
plotTimeChart(PlotEntry e,
uk.ac.ed.epcc.webapp.charts.TimeChart<P> tc,
P ds,
int nplots,
boolean use_line,
boolean graph_transforms)
Add a dataset to a TimeChart using the category data from this mapper.
|
void |
setColours(java.awt.Color[] custom) |
void |
setCumulative(boolean cumulative) |
protected void |
setLegendName(uk.ac.ed.epcc.webapp.charts.Chart tc) |
protected void |
setQuant(java.lang.String quant,
uk.ac.ed.epcc.webapp.charts.PeriodChart tc) |
void |
setStacked(boolean stacked) |
void |
setUseLine(boolean use) |
java.lang.String |
toString() |
public MapperEntry(uk.ac.ed.epcc.webapp.AppContext c,
java.lang.String name,
java.lang.String description)
public uk.ac.ed.epcc.webapp.AppContext getContext()
getContext in interface uk.ac.ed.epcc.webapp.Contexedpublic void setColours(java.awt.Color[] custom)
public void setUseLine(boolean use)
public boolean isCumulative()
public void setCumulative(boolean cumulative)
public java.lang.String getName()
public boolean isStacked()
public void setStacked(boolean stacked)
public java.lang.String getDescription()
public abstract uk.ac.ed.epcc.webapp.charts.strategy.SetRangeMapper getMapper(PlotEntry e)
protected abstract UsageRecordQueryMapper getPointQueryMapper(RecordSelector sel, Reduction red, PropExpression<? extends java.lang.Number> prop_tag, PropertyTag<java.util.Date> end_prop) throws uk.ac.ed.epcc.webapp.jdbc.filter.CannotUseSQLException
uk.ac.ed.epcc.webapp.jdbc.filter.CannotUseSQLExceptionsel - red - prop_tag - end_prop - protected abstract UsageRecordQueryMapper getOverlapQueryMapper(RecordSelector s, Reduction red, PropExpression<? extends java.lang.Number> prop_tag, PropertyTag<java.util.Date> start_prop, PropertyTag<java.util.Date> end_prop) throws uk.ac.ed.epcc.webapp.jdbc.filter.CannotUseSQLException
OverlapHandleruk.ac.ed.epcc.webapp.jdbc.filter.CannotUseSQLExceptions - red - prop_tag - start_prop - end_prop - protected abstract UsageRecordQueryMapper getInnerQueryMapper(RecordSelector sel, Reduction red, PropExpression<? extends java.lang.Number> prop_tag, PropertyTag<java.util.Date> start_prop, PropertyTag<java.util.Date> end_prop) throws uk.ac.ed.epcc.webapp.jdbc.filter.CannotUseSQLException
uk.ac.ed.epcc.webapp.jdbc.filter.CannotUseSQLExceptionsel - red - prop_tag - start_prop - end_prop - public boolean compatible(UsageProducer<?> ap)
protected java.util.Vector<java.lang.String> getLabels()
public uk.ac.ed.epcc.webapp.charts.PeriodSetPlot makePieTimeChartPlot(PlotEntry e, uk.ac.ed.epcc.webapp.charts.PieTimeChart tc, UsageProducer ap, RecordSelector sel, int nplots, boolean overlap) throws uk.ac.ed.epcc.webapp.charts.InvalidTransformException
uk.ac.ed.epcc.webapp.charts.InvalidTransformExceptione - tc - ap - sel - nplots - overlap - public boolean plot(PlotEntry e, uk.ac.ed.epcc.webapp.charts.PieTimeChart tc, UsageProducer ap, RecordSelector sel, int nplots, boolean overlap) throws uk.ac.ed.epcc.webapp.charts.InvalidTransformException
uk.ac.ed.epcc.webapp.charts.InvalidTransformExceptione - tc - PieTimeChartap - sel - nplots - int max number of plotsoverlap - public void plotPieTimeChart(PlotEntry e, uk.ac.ed.epcc.webapp.charts.PieTimeChart tc, int nplots, uk.ac.ed.epcc.webapp.charts.SingleValueSetPlot ds)
protected void setQuant(java.lang.String quant,
uk.ac.ed.epcc.webapp.charts.PeriodChart tc)
public uk.ac.ed.epcc.webapp.charts.PeriodSetPlot makeBarTimeChartPlot(PlotEntry e, uk.ac.ed.epcc.webapp.charts.BarTimeChart tc, UsageProducer ap, RecordSelector sel, int nplots, boolean allow_overlap) throws uk.ac.ed.epcc.webapp.charts.InvalidTransformException
uk.ac.ed.epcc.webapp.charts.InvalidTransformExceptionpublic boolean plot(PlotEntry e, uk.ac.ed.epcc.webapp.charts.BarTimeChart tc, UsageProducer ap, RecordSelector sel, int nplots, boolean allow_overlap) throws uk.ac.ed.epcc.webapp.charts.InvalidTransformException
uk.ac.ed.epcc.webapp.charts.InvalidTransformExceptione - tc - PieTimeChartap - sel - nplots - int max number of plotsallow_overlap - public void plotBarTimeChart(PlotEntry e, uk.ac.ed.epcc.webapp.charts.BarTimeChart tc, int nplots, uk.ac.ed.epcc.webapp.charts.SingleValueSetPlot ds)
public boolean plot(boolean graph_transform,
PlotEntry e,
uk.ac.ed.epcc.webapp.charts.PeriodChart tc,
UsageProducer ap,
RecordSelector sel,
int nplots,
boolean allow_overlap)
throws java.lang.Exception
java.lang.Exceptionpublic boolean plot(boolean graph_transforms,
PlotEntry e,
uk.ac.ed.epcc.webapp.charts.TimeChart<?> tc,
UsageProducer<?> ap,
RecordSelector sel,
int nplots,
boolean allow_overlap)
throws java.lang.Exception
java.lang.Exceptiongraph_transforms - should transforms that only make sense graphically be appliede - PlotEntrytc - timeChartap - UsageProducersel - RecordSelectornplots - int max number of plotsallow_overlap - public boolean plot(PlotEntry e, uk.ac.ed.epcc.webapp.charts.TimeChart<?> tc, UsageProducer<?> ap, RecordSelector sel, int nplots, boolean allow_overlap) throws java.lang.Exception
java.lang.Exceptionpublic <P extends uk.ac.ed.epcc.webapp.charts.PeriodSequencePlot> P makeTimeChartPlot(PlotEntry e, uk.ac.ed.epcc.webapp.charts.TimeChart<P> tc, UsageProducer<?> ap, RecordSelector request_sel, int nplots, boolean allow_overlap, boolean use_line, boolean graph_transforms) throws java.lang.Exception
java.lang.Exceptione - tc - ap - request_sel - nplots - allow_overlap - use_line - graph_transforms - public <P extends uk.ac.ed.epcc.webapp.charts.PeriodSequencePlot> void plotTimeChart(PlotEntry e, uk.ac.ed.epcc.webapp.charts.TimeChart<P> tc, P ds, int nplots, boolean use_line, boolean graph_transforms) throws java.lang.Exception
java.lang.Exceptione - tc - ds - nplots - use_line - graph_transforms - public <P extends uk.ac.ed.epcc.webapp.charts.PeriodSequencePlot> boolean plot(PlotEntry e, uk.ac.ed.epcc.webapp.charts.TimeChart<P> tc, UsageProducer<?> ap, RecordSelector request_sel, int nplots, boolean allow_overlap, boolean use_line, boolean graph_transforms) throws java.lang.Exception
java.lang.Exceptione - tc - ap - request_sel - nplots - allow_overlap - use_line - graph_transforms - protected void setLegendName(uk.ac.ed.epcc.webapp.charts.Chart tc)
public static java.lang.String MapSelector(java.lang.String plot_type,
java.util.Set<MapperEntry> list)
plot_type - list - Vector of MapperEntrypublic static java.lang.String getMapType(java.lang.String plot_type,
java.util.Set<MapperEntry> list)
public static MapperEntry parseMapSelector(java.lang.String plot_type, java.util.Set<MapperEntry> list)
plot_type - list - Vector of MapperEntrypublic static java.util.Set<MapperEntry> getMapperSet(PropertyFinder finder, uk.ac.ed.epcc.webapp.AppContext c, java.lang.String mode)
finder - c - AppContextmode - public static MapperEntry getConfigMapperEntry(uk.ac.ed.epcc.webapp.AppContext conn, PropertyFinder finder, java.lang.String name) throws java.lang.Exception
java.lang.Exceptionpublic static MapperEntry getConfigMapperEntry(uk.ac.ed.epcc.webapp.AppContext conn, uk.ac.ed.epcc.webapp.config.FilteredProperties prop, PropertyFinder finder, java.lang.String name) throws java.lang.Exception
java.lang.Exceptionpublic static java.util.Set<MapperEntry> getMappers(uk.ac.ed.epcc.webapp.AppContext c, UsageProducer up)
public static java.util.Set<MapperEntry> getMappers(uk.ac.ed.epcc.webapp.AppContext c, UsageProducer up, java.lang.String mode)
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object