/*
 * PieDataset.java
 *
 * Created on 15 agosto 2005, 17.49
 *
 * To change this template, choose Tools | Options and locate the template under
 * the Source Creation and Management node. Right-click the template and choose
 * Open. You can then make changes to the template in the Source Editor.
 */

package it.businesslogic.ireport.chart;
import java.util.*;
/**
 *
 * @author Administrator
 */
public class TimeSeriesDataset extends Dataset {
    
    private Vector timeSeries = null;
    
    private String timePeriod = "Day";
        
    /** Creates a new instance of TimeSeriesDataset */
    public TimeSeriesDataset() {
        super();
        setTimeSeries(new Vector());
    }   

    public Vector getTimeSeries() {
        return timeSeries;
    }

    public void setTimeSeries(Vector timeSeries) {
        this.timeSeries = timeSeries;
    }

    public String getTimePeriod() {
        return timePeriod;
    }

    public void setTimePeriod(String timePeriod) {
        this.timePeriod = timePeriod;
    }
    
    public Dataset cloneMe()
    {
        TimeSeriesDataset obj = new TimeSeriesDataset();
        copyBaseDataset(obj);
        for (int i=0; i<getTimeSeries().size(); ++i)
        {
            obj.getTimeSeries().addElement( ((TimeSeries)getTimeSeries().elementAt(i)).cloneMe() );
        }
        obj.setTimePeriod( getTimePeriod() );
        
        return obj;
    }
}
