001: /*
002: * This class was automatically generated with
003: * <a href="http://www.castor.org">Castor 0.9.4.3</a>, using an XML
004: * Schema.
005: * $Id$
006: */
007:
008: package com.calipso.reportgenerator.reportdefinitions;
009:
010: //---------------------------------/
011: //- Imported classes and packages -/
012: //---------------------------------/
013:
014: import com.calipso.reportgenerator.reportdefinitions.types.LightBoxDefinitionParameterType;
015: import com.calipso.reportgenerator.reportdefinitions.types.LightBoxDefinitionTypeType;
016: import java.io.IOException;
017: import java.io.Reader;
018: import java.io.Serializable;
019: import java.io.Writer;
020: import org.exolab.castor.xml.MarshalException;
021: import org.exolab.castor.xml.Marshaller;
022: import org.exolab.castor.xml.Unmarshaller;
023: import org.exolab.castor.xml.ValidationException;
024: import org.xml.sax.ContentHandler;
025:
026: /**
027: * Class LightBoxDefinition.
028: *
029: * @version $Revision$ $Date$
030: */
031: public class LightBoxDefinition implements java.io.Serializable {
032:
033: //--------------------------/
034: //- Class/Member Variables -/
035: //--------------------------/
036:
037: /**
038: * Field _metricName
039: */
040: private java.lang.String _metricName;
041:
042: /**
043: * Field _type
044: */
045: private com.calipso.reportgenerator.reportdefinitions.types.LightBoxDefinitionTypeType _type;
046:
047: /**
048: * Field _parameter
049: */
050: private com.calipso.reportgenerator.reportdefinitions.types.LightBoxDefinitionParameterType _parameter;
051:
052: /**
053: * Field _colorRed
054: */
055: private int _colorRed;
056:
057: /**
058: * keeps track of state for field: _colorRed
059: */
060: private boolean _has_colorRed;
061:
062: /**
063: * Field _colorGreen
064: */
065: private int _colorGreen;
066:
067: /**
068: * keeps track of state for field: _colorGreen
069: */
070: private boolean _has_colorGreen;
071:
072: /**
073: * Field _colorBlue
074: */
075: private int _colorBlue;
076:
077: /**
078: * keeps track of state for field: _colorBlue
079: */
080: private boolean _has_colorBlue;
081:
082: /**
083: * Field _value
084: */
085: private java.lang.String _value;
086:
087: //----------------/
088: //- Constructors -/
089: //----------------/
090:
091: public LightBoxDefinition() {
092: super ();
093: } //-- com.calipso.reportgenerator.reportdefinitions.LightBoxDefinition()
094:
095: //-----------/
096: //- Methods -/
097: //-----------/
098:
099: /**
100: * Method getColorBlueReturns the value of field 'colorBlue'.
101: *
102: * @return the value of field 'colorBlue'.
103: */
104: public int getColorBlue() {
105: return this ._colorBlue;
106: } //-- int getColorBlue()
107:
108: /**
109: * Method getColorGreenReturns the value of field 'colorGreen'.
110: *
111: * @return the value of field 'colorGreen'.
112: */
113: public int getColorGreen() {
114: return this ._colorGreen;
115: } //-- int getColorGreen()
116:
117: /**
118: * Method getColorRedReturns the value of field 'colorRed'.
119: *
120: * @return the value of field 'colorRed'.
121: */
122: public int getColorRed() {
123: return this ._colorRed;
124: } //-- int getColorRed()
125:
126: /**
127: * Method getMetricNameReturns the value of field 'metricName'.
128: *
129: * @return the value of field 'metricName'.
130: */
131: public java.lang.String getMetricName() {
132: return this ._metricName;
133: } //-- java.lang.String getMetricName()
134:
135: /**
136: * Method getParameterReturns the value of field 'parameter'.
137: *
138: * @return the value of field 'parameter'.
139: */
140: public com.calipso.reportgenerator.reportdefinitions.types.LightBoxDefinitionParameterType getParameter() {
141: return this ._parameter;
142: } //-- com.calipso.reportgenerator.reportdefinitions.types.LightBoxDefinitionParameterType getParameter()
143:
144: /**
145: * Method getTypeReturns the value of field 'type'.
146: *
147: * @return the value of field 'type'.
148: */
149: public com.calipso.reportgenerator.reportdefinitions.types.LightBoxDefinitionTypeType getType() {
150: return this ._type;
151: } //-- com.calipso.reportgenerator.reportdefinitions.types.LightBoxDefinitionTypeType getType()
152:
153: /**
154: * Method getValueReturns the value of field 'value'.
155: *
156: * @return the value of field 'value'.
157: */
158: public java.lang.String getValue() {
159: return this ._value;
160: } //-- java.lang.String getValue()
161:
162: /**
163: * Method hasColorBlue
164: */
165: public boolean hasColorBlue() {
166: return this ._has_colorBlue;
167: } //-- boolean hasColorBlue()
168:
169: /**
170: * Method hasColorGreen
171: */
172: public boolean hasColorGreen() {
173: return this ._has_colorGreen;
174: } //-- boolean hasColorGreen()
175:
176: /**
177: * Method hasColorRed
178: */
179: public boolean hasColorRed() {
180: return this ._has_colorRed;
181: } //-- boolean hasColorRed()
182:
183: /**
184: * Method isValid
185: */
186: public boolean isValid() {
187: try {
188: validate();
189: } catch (org.exolab.castor.xml.ValidationException vex) {
190: return false;
191: }
192: return true;
193: } //-- boolean isValid()
194:
195: /**
196: * Method marshal
197: *
198: * @param out
199: */
200: public void marshal(java.io.Writer out)
201: throws org.exolab.castor.xml.MarshalException,
202: org.exolab.castor.xml.ValidationException {
203:
204: Marshaller.marshal(this , out);
205: } //-- void marshal(java.io.Writer)
206:
207: /**
208: * Method marshal
209: *
210: * @param handler
211: */
212: public void marshal(org.xml.sax.ContentHandler handler)
213: throws java.io.IOException,
214: org.exolab.castor.xml.MarshalException,
215: org.exolab.castor.xml.ValidationException {
216:
217: Marshaller.marshal(this , handler);
218: } //-- void marshal(org.xml.sax.ContentHandler)
219:
220: /**
221: * Method setColorBlueSets the value of field 'colorBlue'.
222: *
223: * @param colorBlue the value of field 'colorBlue'.
224: */
225: public void setColorBlue(int colorBlue) {
226: this ._colorBlue = colorBlue;
227: this ._has_colorBlue = true;
228: } //-- void setColorBlue(int)
229:
230: /**
231: * Method setColorGreenSets the value of field 'colorGreen'.
232: *
233: * @param colorGreen the value of field 'colorGreen'.
234: */
235: public void setColorGreen(int colorGreen) {
236: this ._colorGreen = colorGreen;
237: this ._has_colorGreen = true;
238: } //-- void setColorGreen(int)
239:
240: /**
241: * Method setColorRedSets the value of field 'colorRed'.
242: *
243: * @param colorRed the value of field 'colorRed'.
244: */
245: public void setColorRed(int colorRed) {
246: this ._colorRed = colorRed;
247: this ._has_colorRed = true;
248: } //-- void setColorRed(int)
249:
250: /**
251: * Method setMetricNameSets the value of field 'metricName'.
252: *
253: * @param metricName the value of field 'metricName'.
254: */
255: public void setMetricName(java.lang.String metricName) {
256: this ._metricName = metricName;
257: } //-- void setMetricName(java.lang.String)
258:
259: /**
260: * Method setParameterSets the value of field 'parameter'.
261: *
262: * @param parameter the value of field 'parameter'.
263: */
264: public void setParameter(
265: com.calipso.reportgenerator.reportdefinitions.types.LightBoxDefinitionParameterType parameter) {
266: this ._parameter = parameter;
267: } //-- void setParameter(com.calipso.reportgenerator.reportdefinitions.types.LightBoxDefinitionParameterType)
268:
269: /**
270: * Method setTypeSets the value of field 'type'.
271: *
272: * @param type the value of field 'type'.
273: */
274: public void setType(
275: com.calipso.reportgenerator.reportdefinitions.types.LightBoxDefinitionTypeType type) {
276: this ._type = type;
277: } //-- void setType(com.calipso.reportgenerator.reportdefinitions.types.LightBoxDefinitionTypeType)
278:
279: /**
280: * Method setValueSets the value of field 'value'.
281: *
282: * @param value the value of field 'value'.
283: */
284: public void setValue(java.lang.String value) {
285: this ._value = value;
286: } //-- void setValue(java.lang.String)
287:
288: /**
289: * Method unmarshal
290: *
291: * @param reader
292: */
293: public static com.calipso.reportgenerator.reportdefinitions.LightBoxDefinition unmarshal(
294: java.io.Reader reader)
295: throws org.exolab.castor.xml.MarshalException,
296: org.exolab.castor.xml.ValidationException {
297: return (com.calipso.reportgenerator.reportdefinitions.LightBoxDefinition) Unmarshaller
298: .unmarshal(
299: com.calipso.reportgenerator.reportdefinitions.LightBoxDefinition.class,
300: reader);
301: } //-- com.calipso.reportgenerator.reportdefinitions.LightBoxDefinition unmarshal(java.io.Reader)
302:
303: /**
304: * Method validate
305: */
306: public void validate()
307: throws org.exolab.castor.xml.ValidationException {
308: org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
309: validator.validate(this );
310: } //-- void validate()
311:
312: }
|