package net.sf.jasperreports.engine;

import java.util.HashMap;
import java.util.Map;
import net.sf.jasperreports.charts.JRAreaPlot;
import net.sf.jasperreports.charts.JRBar3DPlot;
import net.sf.jasperreports.charts.JRBarPlot;
import net.sf.jasperreports.charts.JRBubblePlot;
import net.sf.jasperreports.charts.JRCandlestickPlot;
import net.sf.jasperreports.charts.JRCategoryDataset;
import net.sf.jasperreports.charts.JRCategorySeries;
import net.sf.jasperreports.charts.JRLinePlot;
import net.sf.jasperreports.charts.JRPie3DPlot;
import net.sf.jasperreports.charts.JRPieDataset;
import net.sf.jasperreports.charts.JRPiePlot;
import net.sf.jasperreports.charts.JRTimePeriodDataset;
import net.sf.jasperreports.charts.JRTimePeriodSeries;
import net.sf.jasperreports.charts.JRTimeSeries;
import net.sf.jasperreports.charts.JRTimeSeriesDataset;
import net.sf.jasperreports.charts.JRXyzDataset;
import net.sf.jasperreports.charts.JRXyzSeries;

public abstract class JRAbstractObjectFactory implements JRVisitor {
  private Map objectsMap = new HashMap();
  
  private Object visitResult = null;
  
  protected Object get(Object object) {
    return this.objectsMap.get(object);
  }
  
  public void put(Object object, Object copy) {
    this.objectsMap.put(object, copy);
  }
  
  public Object getVisitResult(JRVisitable visitable) {
    if (visitable != null) {
      visitable.visit(this);
      return this.visitResult;
    } 
    return null;
  }
  
  protected void setVisitResult(Object visitResult) {
    this.visitResult = visitResult;
  }
  
  public abstract JRReportFont getReportFont(JRReportFont paramJRReportFont);
  
  public abstract JRStyle getStyle(JRStyle paramJRStyle);
  
  public abstract void setStyle(JRStyleSetter paramJRStyleSetter, JRStyleContainer paramJRStyleContainer);
  
  public abstract JRPieDataset getPieDataset(JRPieDataset paramJRPieDataset);
  
  public abstract JRPiePlot getPiePlot(JRPiePlot paramJRPiePlot);
  
  public abstract JRPie3DPlot getPie3DPlot(JRPie3DPlot paramJRPie3DPlot);
  
  public abstract JRCategoryDataset getCategoryDataset(JRCategoryDataset paramJRCategoryDataset);
  
  public abstract JRTimeSeriesDataset getTimeSeriesDataset(JRTimeSeriesDataset paramJRTimeSeriesDataset);
  
  public abstract JRTimePeriodDataset getTimePeriodDataset(JRTimePeriodDataset paramJRTimePeriodDataset);
  
  public abstract JRTimePeriodSeries getTimePeriodSeries(JRTimePeriodSeries paramJRTimePeriodSeries);
  
  public abstract JRTimeSeries getTimeSeries(JRTimeSeries paramJRTimeSeries);
  
  public abstract JRCategorySeries getCategorySeries(JRCategorySeries paramJRCategorySeries);
  
  public abstract JRXyzDataset getXyzDataset(JRXyzDataset paramJRXyzDataset);
  
  public abstract JRXyzSeries getXyzSeries(JRXyzSeries paramJRXyzSeries);
  
  public abstract JRBarPlot getBarPlot(JRBarPlot paramJRBarPlot);
  
  public abstract JRBar3DPlot getBar3DPlot(JRBar3DPlot paramJRBar3DPlot);
  
  public abstract JRLinePlot getLinePlot(JRLinePlot paramJRLinePlot);
  
  public abstract JRAreaPlot getAreaPlot(JRAreaPlot paramJRAreaPlot);
  
  public abstract JRBubblePlot getBubblePlot(JRBubblePlot paramJRBubblePlot);
  
  public abstract JRCandlestickPlot getCandlestickPlot(JRCandlestickPlot paramJRCandlestickPlot);
  
  public abstract JRConditionalStyle getConditionalStyle(JRConditionalStyle paramJRConditionalStyle, JRStyle paramJRStyle);
  
  public abstract JRExpression getExpression(JRExpression paramJRExpression, boolean paramBoolean);
  
  public JRExpression getExpression(JRExpression expression) {
    return getExpression(expression, false);
  }
}
