public class JRExpressionCollector extends Object
The expressions are then included into evaluator classes which are compiled and used at report fill time to evaluate expressions.
Modifier and Type | Class and Description |
---|---|
protected static class |
JRExpressionCollector.GeneratedIds |
Modifier and Type | Field and Description |
---|---|
static String |
EXCEPTION_MESSAGE_KEY_EXPRESSION_NOT_FOUND |
static String |
EXCEPTION_MESSAGE_KEY_TWO_GENERATED_IDS |
Modifier | Constructor and Description |
---|---|
protected |
JRExpressionCollector(JasperReportsContext jasperReportsContext,
JRExpressionCollector parent,
JRReport report) |
Modifier and Type | Method and Description |
---|---|
void |
addExpression(JRExpression expression)
Collects an expression.
|
protected boolean |
canUseId(JRExpression expression,
Integer id) |
protected boolean |
canUseId(List<JRExpressionCollector> collectors,
JRExpression expression,
Integer id) |
Collection<JRExpression> |
collect() |
protected void |
collect(DataAxisLevel level,
JRExpressionCollector datasetCollector) |
void |
collect(JRAreaPlot areaPlot) |
void |
collect(JRBar3DPlot barPlot) |
void |
collect(JRBarPlot barPlot) |
void |
collect(JRBreak breakElement) |
void |
collect(JRBubblePlot bubblePlot) |
void |
collect(JRCandlestickPlot candlestickPlot) |
void |
collect(JRCategoryDataset categoryDataset) |
protected void |
collect(JRCellContents cell) |
void |
collect(JRChart chart) |
void |
collect(JRComponentElement componentElement)
Collects expressions from a component element wrapper.
|
void |
collect(JRCrosstab crosstab)
Collects expressions from a crosstab.
|
void |
collect(JRDataRange dataRange) |
Collection<JRExpression> |
collect(JRDataset dataset)
Collects expressions from a dataset.
|
void |
collect(JRDatasetRun datasetRun)
Collects expressions from a subdataset run object.
|
void |
collect(JRElementDataset dataset)
Collects expressions from an element dataset.
|
void |
collect(JREllipse ellipse) |
void |
collect(JRFrame frame) |
void |
collect(JRGanttDataset ganttDataset) |
void |
collect(JRGenericElement element)
Collects expressions from a generic element.
|
void |
collect(JRHighLowDataset highLowDataset) |
void |
collect(JRHighLowPlot highLowPlot) |
void |
collect(JRImage image) |
void |
collect(JRLine line) |
void |
collect(JRLinePlot linePlot) |
void |
collect(JRMeterPlot meterPlot) |
void |
collect(JRPieDataset pieDataset) |
void |
collect(JRRectangle rectangle) |
protected void |
collect(JRReportTemplate template) |
void |
collect(JRScatterPlot scatterPlot) |
void |
collect(JRStaticText staticText) |
void |
collect(JRStyle style)
Collects expressions used in a style definition.
|
void |
collect(JRSubreport subreport) |
void |
collect(JRTextField textField) |
void |
collect(JRThermometerPlot thermometerPlot) |
void |
collect(JRTimePeriodDataset timePeriodDataset) |
void |
collect(JRTimeSeriesDataset timeSeriesDataset) |
void |
collect(JRTimeSeriesPlot timeSeriesPlot) |
void |
collect(JRValueDataset valueDataset) |
void |
collect(JRXyDataset xyDataset) |
void |
collect(JRXyzDataset xyzDataset) |
void |
collect(MultiAxisData data) |
static List<JRExpression> |
collectExpressions(JasperReportsContext jasperReportsContext,
JRReport report) |
static List<JRExpression> |
collectExpressions(JasperReportsContext jasperReportsContext,
JRReport report,
JRCrosstab crosstab) |
void |
collectHyperlink(JRHyperlink hyperlink) |
protected void |
collectHyperlinkParameter(JRHyperlinkParameter parameter) |
static JRExpressionCollector |
collector(JasperReportsContext jasperReportsContext,
JRReport report) |
static JRExpressionCollector |
collector(JasperReportsContext jasperReportsContext,
JRReport report,
JRCrosstab crosstab) |
protected List<JRExpressionCollector> |
collectorsForExpression(Integer id,
JRExpression expression) |
protected void |
collectPropertyExpression(JRPropertyExpression propertyExpression) |
void |
collectPropertyExpressions(JRPropertyExpression[] propertyExpressions) |
protected void |
collectTemplates() |
JRExpressionCollector |
getCollector(JRCrosstab crosstab)
Returns the expression collector for a crosstab.
|
JRExpressionCollector |
getCollector(JRDataset dataset)
Returns the expression collector for a dataset.
|
JRExpressionCollector |
getCollector(JRElementDataset elementDataset)
Returns the expression collector to which expressions in an element
dataset belong.
|
Integer |
getCrosstabId(JRCrosstab crosstab) |
JRExpressionCollector |
getDatasetCollector(String datasetName)
Returns the expression collector for a report subdataset.
|
JRExpression |
getExpression(int expressionId) |
Object |
getExpressionContext(JRExpression expression) |
Integer |
getExpressionId(JRExpression expression) |
List<JRExpression> |
getExpressions()
Returns the collected expressions.
|
List<JRExpression> |
getExpressions(JRCrosstab crosstab)
Returns the expressions collected for a crosstab.
|
List<JRExpression> |
getExpressions(JRDataset dataset)
Returns the expressions collected for a dataset.
|
JasperReportsContext |
getJasperReportsContext() |
Collection<JRExpression> |
getReportExpressions()
Return all the expressions collected from the report.
|
protected boolean |
hasExpression(Integer id,
JRExpression expression) |
protected Object |
popContextObject() |
protected void |
pushContextObject(Object context) |
protected void |
reassignId(JRExpression expression,
Integer id) |
protected JRExpressionCollector |
rootCollector() |
protected void |
setExpressionContext(JRExpression expression) |
public static final String EXCEPTION_MESSAGE_KEY_EXPRESSION_NOT_FOUND
public static final String EXCEPTION_MESSAGE_KEY_TWO_GENERATED_IDS
protected JRExpressionCollector(JasperReportsContext jasperReportsContext, JRExpressionCollector parent, JRReport report)
public static JRExpressionCollector collector(JasperReportsContext jasperReportsContext, JRReport report)
public static List<JRExpression> collectExpressions(JasperReportsContext jasperReportsContext, JRReport report)
public static JRExpressionCollector collector(JasperReportsContext jasperReportsContext, JRReport report, JRCrosstab crosstab)
public static List<JRExpression> collectExpressions(JasperReportsContext jasperReportsContext, JRReport report, JRCrosstab crosstab)
public void addExpression(JRExpression expression)
expression
- the expression to collectprotected boolean canUseId(JRExpression expression, Integer id)
protected void reassignId(JRExpression expression, Integer id)
protected boolean canUseId(List<JRExpressionCollector> collectors, JRExpression expression, Integer id)
protected JRExpressionCollector rootCollector()
protected boolean hasExpression(Integer id, JRExpression expression)
protected List<JRExpressionCollector> collectorsForExpression(Integer id, JRExpression expression)
protected void pushContextObject(Object context)
protected Object popContextObject()
protected void setExpressionContext(JRExpression expression)
public JRExpressionCollector getCollector(JRElementDataset elementDataset)
If the element dataset includes a subdataset run, a (sub) expression collector that corresponds to the subdataset will be returned. Otherwise, this/the main expression collector will be returned.
elementDataset
- an element datasetpublic JRExpressionCollector getDatasetCollector(String datasetName)
datasetName
- the subdataset namepublic JRExpressionCollector getCollector(JRDataset dataset)
dataset
- the datasetpublic JRExpressionCollector getCollector(JRCrosstab crosstab)
crosstab
- the crosstabpublic List<JRExpression> getExpressions()
public Collection<JRExpression> getReportExpressions()
public List<JRExpression> getExpressions(JRDataset dataset)
dataset
- the datasetpublic List<JRExpression> getExpressions(JRCrosstab crosstab)
crosstab
- the crosstabpublic Integer getExpressionId(JRExpression expression)
public JRExpression getExpression(int expressionId)
public Integer getCrosstabId(JRCrosstab crosstab)
public Object getExpressionContext(JRExpression expression)
public Collection<JRExpression> collect()
protected void collectTemplates()
protected void collect(JRReportTemplate template)
public void collect(JRStyle style)
style
- the style to collect expressions frompublic void collectPropertyExpressions(JRPropertyExpression[] propertyExpressions)
protected void collectPropertyExpression(JRPropertyExpression propertyExpression)
public void collectHyperlink(JRHyperlink hyperlink)
protected void collectHyperlinkParameter(JRHyperlinkParameter parameter)
public void collect(JRBreak breakElement)
public void collect(JRLine line)
public void collect(JRRectangle rectangle)
public void collect(JREllipse ellipse)
public void collect(JRImage image)
public void collect(JRStaticText staticText)
public void collect(JRTextField textField)
public void collect(JRSubreport subreport)
public void collect(JRChart chart)
public void collect(JRPieDataset pieDataset)
public void collect(JRCategoryDataset categoryDataset)
public void collect(JRXyDataset xyDataset)
public void collect(JRTimeSeriesDataset timeSeriesDataset)
public void collect(JRTimePeriodDataset timePeriodDataset)
public void collect(JRGanttDataset ganttDataset)
public void collect(JRValueDataset valueDataset)
public void collect(JRBarPlot barPlot)
public void collect(JRBar3DPlot barPlot)
public void collect(JRLinePlot linePlot)
public void collect(JRTimeSeriesPlot timeSeriesPlot)
public void collect(JRScatterPlot scatterPlot)
public void collect(JRAreaPlot areaPlot)
public void collect(JRXyzDataset xyzDataset)
public void collect(JRBubblePlot bubblePlot)
public void collect(JRHighLowPlot highLowPlot)
public void collect(JRDataRange dataRange)
public void collect(JRMeterPlot meterPlot)
public void collect(JRThermometerPlot thermometerPlot)
public void collect(JRHighLowDataset highLowDataset)
public void collect(JRCandlestickPlot candlestickPlot)
public void collect(JRCrosstab crosstab)
crosstab
- the crosstabpublic Collection<JRExpression> collect(JRDataset dataset)
dataset
- the datasetpublic void collect(JRElementDataset dataset)
dataset
- the element datasetpublic void collect(JRDatasetRun datasetRun)
datasetRun
- the subdataset runprotected void collect(JRCellContents cell)
public void collect(JRFrame frame)
public void collect(JRComponentElement componentElement)
Common element expressions are collected, and then the component
compiler's
ComponentCompiler.collectExpressions(Component, JRExpressionCollector)
is called to collect component expressions.
componentElement
- the component elementpublic void collect(JRGenericElement element)
element
- the generic elementpublic void collect(MultiAxisData data)
protected void collect(DataAxisLevel level, JRExpressionCollector datasetCollector)
public JasperReportsContext getJasperReportsContext()
Copyright © 2017. All rights reserved.