001: /*
002: * Copyright (C) 2005 - 2008 JasperSoft Corporation. All rights reserved.
003: * http://www.jaspersoft.com.
004: *
005: * Unless you have purchased a commercial license agreement from JasperSoft,
006: * the following license terms apply:
007: *
008: * This program is free software; you can redistribute it and/or modify
009: * it under the terms of the GNU General Public License version 2 as published by
010: * the Free Software Foundation.
011: *
012: * This program is distributed WITHOUT ANY WARRANTY; and without the
013: * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
014: * See the GNU General Public License for more details.
015: *
016: * You should have received a copy of the GNU General Public License
017: * along with this program; if not, see http://www.gnu.org/licenses/gpl.txt
018: * or write to:
019: *
020: * Free Software Foundation, Inc.,
021: * 59 Temple Place - Suite 330,
022: * Boston, MA USA 02111-1307
023: *
024: *
025: *
026: *
027: * TimeSeries.java
028: *
029: * Created on 17 agosto 2005, 10.56
030: *
031: */
032:
033: package it.businesslogic.ireport.chart;
034:
035: /**
036: *
037: * @author Administrator
038: */
039: public class TimeSeries {
040:
041: private String seriesExpression = "";
042: private String timePeriodExpression = "";
043: private String valueExpression = "";
044: private String labelExpression = "";
045: private SectionItemHyperlink sectionItemHyperlink = new SectionItemHyperlink();
046:
047: /** Creates a new instance of CategorySeries */
048: public TimeSeries() {
049: }
050:
051: public String getSeriesExpression() {
052: return seriesExpression;
053: }
054:
055: public void setSeriesExpression(String seriesExpression) {
056: this .seriesExpression = seriesExpression;
057: }
058:
059: public String getValueExpression() {
060: return valueExpression;
061: }
062:
063: public void setValueExpression(String valueExpression) {
064: this .valueExpression = valueExpression;
065: }
066:
067: public String getLabelExpression() {
068: return labelExpression;
069: }
070:
071: public void setLabelExpression(String labelExpression) {
072: this .labelExpression = labelExpression;
073: }
074:
075: public String toString() {
076: String str = getSeriesExpression();
077: if (str == null)
078: str = "";
079: if (str.length() > 50)
080: str = str.substring(0, 30);
081:
082: return "Time series [" + str + "]";
083: }
084:
085: public String getTimePeriodExpression() {
086: return timePeriodExpression;
087: }
088:
089: public void setTimePeriodExpression(String timePeriodExpression) {
090: this .timePeriodExpression = timePeriodExpression;
091: }
092:
093: public TimeSeries cloneMe() {
094: TimeSeries cs = new TimeSeries();
095: cs.setSeriesExpression(this .getSeriesExpression());
096: cs.setTimePeriodExpression(this .getTimePeriodExpression());
097: cs.setValueExpression(this .getValueExpression());
098: cs.setLabelExpression(this .getLabelExpression());
099: cs.setSectionItemHyperlink(this .getSectionItemHyperlink()
100: .cloneMe());
101:
102: return cs;
103: }
104:
105: public SectionItemHyperlink getSectionItemHyperlink() {
106: return sectionItemHyperlink;
107: }
108:
109: public void setSectionItemHyperlink(
110: SectionItemHyperlink sectionItemHyperlink) {
111: this.sectionItemHyperlink = sectionItemHyperlink;
112: }
113: }
|