Java 类net.sf.jasperreports.engine.JRExpressionCollector 实例源码

项目:jasperreports    文件:XYChartCompiler.java   
public static void collectExpressions(XYDataset dataset, JRExpressionCollector collector)
{
    collector.collect(dataset);

    XYSeries[] xySeries = dataset.getSeries();
    if (xySeries != null && xySeries.length > 0)
    {
        JRExpressionCollector seriesCollector = collector.getCollector(dataset);
        for(int i = 0; i < xySeries.length; i++)
        {
            seriesCollector.addExpression(xySeries[i].getSeriesExpression());
            seriesCollector.addExpression(xySeries[i].getXValueExpression());
            seriesCollector.addExpression(xySeries[i].getYValueExpression());
            seriesCollector.addExpression(xySeries[i].getColorExpression());
        }
    }

}
项目:jasperreports    文件:SpiderChartCompiler.java   
public static void collectExpressions(SpiderDataset dataset, JRExpressionCollector collector)
{
    if(dataset != null)
    {
        collector.collect(dataset);

        JRCategorySeries[] categorySeries = dataset.getSeries();
        if (categorySeries != null && categorySeries.length > 0)
        {
            JRExpressionCollector seriesCollector = collector.getCollector(dataset);
            for(int j = 0; j < categorySeries.length; j++)
            {
                seriesCollector.addExpression(categorySeries[j].getSeriesExpression());
                seriesCollector.addExpression(categorySeries[j].getCategoryExpression());
                seriesCollector.addExpression(categorySeries[j].getValueExpression());
                seriesCollector.addExpression(categorySeries[j].getLabelExpression());

                seriesCollector.collectHyperlink(categorySeries[j].getItemHyperlink());

            }
        }
    }
}
项目:jasperreports    文件:SubreportPartComponentCompiler.java   
@Override
public void collectExpressions(PartComponent component, JRExpressionCollector collector)
{
    SubreportPartComponent subreport = (SubreportPartComponent) component;

    collector.addExpression(subreport.getParametersMapExpression());

    JRSubreportParameter[] parameters = subreport.getParameters();
    if (parameters != null && parameters.length > 0)
    {
        for(int j = 0; j < parameters.length; j++)
        {
            collector.addExpression(parameters[j].getExpression());
        }
    }

    collector.addExpression(subreport.getExpression());
}
项目:jasperreports    文件:ListComponentCompiler.java   
@Override
public void collectExpressions(Component component,
        JRExpressionCollector collector)
{
    ListComponent listComponent = (ListComponent) component;
    JRDatasetRun datasetRun = listComponent.getDatasetRun();
    collector.collect(datasetRun);

    JRExpressionCollector datasetCollector = collector.getDatasetCollector(
            datasetRun.getDatasetName());
    JRElement[] elements = listComponent.getContents().getElements();
    if (elements != null)
    {
        for (int i = 0; i < elements.length; i++)
        {
            elements[i].collectExpressions(datasetCollector);
        }
    }
}
项目:jasperreports    文件:BarbecueCompiler.java   
@Override
public void collectExpressions(Component component, JRExpressionCollector collector)
{
    BarbecueComponent barcode = (BarbecueComponent) component;
    collector.addExpression(barcode.getCodeExpression());
    collector.addExpression(barcode.getApplicationIdentifierExpression());
}
项目:jasperreports    文件:MapCompiler.java   
@Override
public void collectExpressions(Component component, JRExpressionCollector collector)
{
    MapComponent map = (MapComponent) component;
    collector.addExpression(map.getLatitudeExpression());
    collector.addExpression(map.getLongitudeExpression());
    collector.addExpression(map.getAddressExpression());
    collector.addExpression(map.getZoomExpression());
    collector.addExpression(map.getLanguageExpression());

    List<ItemData> markerDataList = map.getMarkerDataList();
    if(markerDataList != null && markerDataList.size() > 0) {
        for(ItemData markerData : markerDataList){
            ItemCompiler.collectExpressions(markerData, collector);
        }
    }
    List<ItemData> pathStyleList = map.getPathStyleList();
    if(pathStyleList != null && pathStyleList.size() > 0) {
        for(ItemData pathStyle : pathStyleList){
            ItemCompiler.collectExpressions(pathStyle, collector);
        }
    }
    List<ItemData> pathDataList = map.getPathDataList();
    if(pathDataList != null && pathDataList.size() > 0) {
        for(ItemData pathData : pathDataList){
            ItemCompiler.collectExpressions(pathData, collector);
        }
    }
}
项目:jasperreports    文件:BarChartCompiler.java   
public static void collectExpressions(BarDataset dataset, JRExpressionCollector collector)
{
    collector.collect(dataset);

    JRExpressionCollector datasetCollector = collector.getCollector(dataset);
    for (Iterator<BarSeries> it = dataset.getSeries().iterator(); it.hasNext();)
    {
        BarSeries series = it.next();
        datasetCollector.addExpression(series.getSeriesExpression());
        datasetCollector.addExpression(series.getCategoryExpression());
        datasetCollector.addExpression(series.getValueExpression());
    }
}
项目:jasperreports    文件:JRBaseMultiAxisPlot.java   
/**
 * Adds all the expression used by this plot with the specified collector.
 * All collected expression that are also registered with a factory will
 * be included with the report is compiled.
 *
 * @param collector the expression collector to use
 */
@Override
public void collectExpressions(JRExpressionCollector collector)
{
    Iterator<JRChartAxis> iter = axes.iterator();
    while (iter.hasNext())
    {
        JRChartAxis axis = iter.next();
        collector.collect(axis.getChart());
    }
}
项目:jasperreports    文件:SpiderChartCompiler.java   
public static void collectExpressions(SpiderPlot spiderPlot, JRExpressionCollector collector)
{
    if(spiderPlot != null)
    {
        collector.addExpression(spiderPlot.getMaxValueExpression());
    }
}
项目:jasperreports    文件:JRAbstractCompiler.java   
private JRCompilationUnit createCompileUnit(JasperDesign jasperDesign, JRDesignDataset dataset, JRExpressionCollector expressionCollector, File saveSourceDir, String nameSuffix) throws JRException
{       
    String unitName = JRAbstractCompiler.getUnitName(jasperDesign, dataset, nameSuffix);

    JRSourceCompileTask sourceTask = new JRSourceCompileTask(jasperDesign, dataset, expressionCollector, unitName);
    JRCompilationSourceCode sourceCode = generateSourceCode(sourceTask);

    File sourceFile = getSourceFile(saveSourceDir, unitName, sourceCode);

    return new JRCompilationUnit(unitName, sourceCode, sourceFile, 
            expressionCollector.getExpressions(dataset), sourceTask);
}
项目:jasperreports    文件:SpiderChartCompiler.java   
@Override
public void collectExpressions(Component component, JRExpressionCollector collector)
{
    SpiderChartComponent chart = (SpiderChartComponent) component;
    collectExpressions(chart.getChartSettings(), collector);
    collectExpressions((SpiderDataset)chart.getDataset(), collector);
    collectExpressions((SpiderPlot)chart.getPlot(), collector);
}
项目:jasperreports    文件:SpiderChartCompiler.java   
public static void collectExpressions(ChartSettings chart, JRExpressionCollector collector)
{
    if(chart != null)
    {
        collector.addExpression(chart.getTitleExpression());
        collector.addExpression(chart.getSubtitleExpression());
        collector.addExpression(chart.getAnchorNameExpression());
        collector.addExpression(chart.getHyperlinkReferenceExpression());
        collector.addExpression(chart.getHyperlinkWhenExpression());
        collector.addExpression(chart.getHyperlinkAnchorExpression());
        collector.addExpression(chart.getHyperlinkPageExpression());
        collector.addExpression(chart.getHyperlinkTooltipExpression());

        JRHyperlinkParameter[] hyperlinkParameters = chart.getHyperlinkParameters();
        if (hyperlinkParameters != null)
        {
            for (int i = 0; i < hyperlinkParameters.length; i++)
            {
                JRHyperlinkParameter parameter = hyperlinkParameters[i];
                if (parameter != null)
                {
                    collector.addExpression(parameter.getValueExpression());
                }
            }
        }
    }
}
项目:jasperreports    文件:JRVerifier.java   
/**
 * 
 */
protected JRVerifier(
    JasperReportsContext jasperReportsContext,
    JasperDesign jasperDesign, 
    JRExpressionCollector expressionCollector
    )
{
    this.jasperReportsContext = jasperReportsContext;
    this.jasperDesign = jasperDesign;
    this.sectionType = jasperDesign.getSectionType() == null ? SectionTypeEnum.BAND : jasperDesign.getSectionType();
    brokenRules = new ArrayList<JRValidationFault>();

    if (expressionCollector != null)
    {
        this.expressionCollector = expressionCollector;
    }
    else
    {
        this.expressionCollector = JRExpressionCollector.collector(jasperReportsContext, jasperDesign);
    }

    allowElementNegativeWidth = JRPropertiesUtil.getInstance(jasperReportsContext).getBooleanProperty(jasperDesign, PROPERTY_ALLOW_ELEMENT_NEGATIVE_WIDTH, false);
    allowElementNegativeX = JRPropertiesUtil.getInstance(jasperReportsContext).getBooleanProperty(jasperDesign, 
            PROPERTY_ALLOW_ELEMENT_NEGATIVE_X, true);
    allowElementNegativeY = JRPropertiesUtil.getInstance(jasperReportsContext).getBooleanProperty(jasperDesign, 
            PROPERTY_ALLOW_ELEMENT_NEGATIVE_Y, true);
}
项目:jasperreports    文件:ItemCompiler.java   
public static void collectExpressions(ItemData data, JRExpressionCollector collector)
{
    if (data != null)
    {
        JRExpressionCollector datasetCollector = collector;

        JRElementDataset dataset = data.getDataset();
        JRDatasetRun datasetRun = dataset == null ? null : dataset.getDatasetRun();
        if (datasetRun != null)
        {
            collector.collect(datasetRun);
            datasetCollector = collector.getDatasetCollector(datasetRun.getDatasetName());
        }

        List<Item> items = data.getItems();
        if (items != null && !items.isEmpty())
        {
            for(Item item : items)
            {
                List<ItemProperty> itemProperties = item.getProperties();
                if(itemProperties != null)
                {
                    for(ItemProperty property : itemProperties)
                    {
                        datasetCollector.addExpression(property.getValueExpression());
                    }
                }
            }
        }
    }
}
项目:jasperreports    文件:IconLabelComponentCompiler.java   
@Override
public void collectExpressions(Component component, JRExpressionCollector collector) 
{
    IconLabelComponent iconLabelComponent = (IconLabelComponent) component;
    collector.collect(iconLabelComponent.getLabelTextField());
    collector.collect(iconLabelComponent.getIconTextField());
}
项目:opencps-v2    文件:JRReportTemplate.java   
public JRReportTemplate(JRReport report, String compilerClass, Serializable compileData,
        JRExpressionCollector expressionCollector, String compileNameSuffix) {
    super(report, compilerClass, compileData, expressionCollector, compileNameSuffix);

}
项目:jasperreports    文件:FillXYDataset.java   
@Override
public void collectExpressions(JRExpressionCollector collector)
{
    XYChartCompiler.collectExpressions(dataset, collector);
}
项目:jasperreports    文件:DesignXYDataset.java   
@Override
public void collectExpressions(JRExpressionCollector collector)
{
    XYChartCompiler.collectExpressions(this, collector);
}
项目:jasperreports    文件:JRDesignCrosstabDataset.java   
@Override
public void collectExpressions(JRExpressionCollector collector)
{
}
项目:jasperreports    文件:FillBarDataset.java   
public void collectExpressions(JRExpressionCollector collector)
{
    BarChartCompiler.collectExpressions(dataset, collector);
}
项目:jasperreports    文件:PieChartCompiler.java   
public void collectExpressions(Component component, JRExpressionCollector collector)
{
    PieChartComponent chart = (PieChartComponent) component;
    collector.addExpression(chart.getTitleExpression());
    collectExpressions(chart.getDataset(), collector);
}
项目:jasperreports    文件:StandardSpiderDataset.java   
@Override
public void collectExpressions(JRExpressionCollector collector)
{
    SpiderChartCompiler.collectExpressions(this, collector);
}
项目:jasperreports    文件:CompiledPieDataset.java   
public void collectExpressions(JRExpressionCollector collector)
{
    PieChartCompiler.collectExpressions(this, collector);
}
项目:jasperreports    文件:JRFillCrosstab.java   
@Override
public void collectExpressions(JRExpressionCollector collector)
{
    collector.collect(this);
}
项目:jasperreports    文件:BarChartCompiler.java   
public void collectExpressions(Component component, JRExpressionCollector collector)
{
    BarChartComponent chart = (BarChartComponent) component;
    collector.addExpression(chart.getTitleExpression());
    collectExpressions(chart.getDataset(), collector);
}
项目:jasperreports    文件:CompiledBarDataset.java   
public void collectExpressions(JRExpressionCollector collector)
{
    BarChartCompiler.collectExpressions(this, collector);
}
项目:jasperreports    文件:DesignPieDataset.java   
public void collectExpressions(JRExpressionCollector collector)
{
    PieChartCompiler.collectExpressions(this, collector);
}
项目:jasperreports    文件:FillPieDataset.java   
public void collectExpressions(JRExpressionCollector collector)
{
    PieChartCompiler.collectExpressions(dataset, collector);
}
项目:jasperreports    文件:HtmlComponentCompiler.java   
@Override
public void collectExpressions(Component component, JRExpressionCollector collector) {
    HtmlComponent htmlComponent = (HtmlComponent) component;
    collector.addExpression(htmlComponent.getHtmlContentExpression());
}
项目:jasperreports    文件:JRBasePieDataset.java   
@Override
public void collectExpressions(JRExpressionCollector collector)
{
    collector.collect(this);
}
项目:jasperreports    文件:FillChartSettings.java   
/**
 *
 */
public void collectExpressions(JRExpressionCollector collector)
{
    SpiderChartCompiler.collectExpressions(this, collector);
}
项目:jasperreports    文件:JRBaseXyzDataset.java   
@Override
public void collectExpressions(JRExpressionCollector collector)
{
    collector.collect(this);
}
项目:jasperreports    文件:JRFillComponentElement.java   
@Override
public void collectExpressions(JRExpressionCollector collector)
{
    collector.collect(this);
}
项目:jasperreports    文件:JRBaseBubblePlot.java   
@Override
public void collectExpressions(JRExpressionCollector collector)
{
    collector.collect(this);
}
项目:jasperreports    文件:JRBaseBarPlot.java   
@Override
public void collectExpressions(JRExpressionCollector collector)
{
    collector.collect(this);
}
项目:jasperreports    文件:JRBaseHighLowPlot.java   
@Override
public void collectExpressions(JRExpressionCollector collector)
{
    collector.collect(this);
}
项目:jasperreports    文件:JRBaseXyDataset.java   
@Override
public void collectExpressions(JRExpressionCollector collector)
{
    collector.collect(this);
}
项目:jasperreports    文件:StandardSpiderPlot.java   
public void collectExpressions(JRExpressionCollector collector)
{
    SpiderChartCompiler.collectExpressions(this, collector);
}
项目:jasperreports    文件:JRFillFrame.java   
@Override
public void collectExpressions(JRExpressionCollector collector)
{
    collector.collect(this);
}
项目:jasperreports    文件:JRBasePiePlot.java   
@Override
public void collectExpressions(JRExpressionCollector collector)
{
}