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 java.io.IOException;
015: import java.io.Reader;
016: import java.io.Serializable;
017: import java.io.Writer;
018: import org.exolab.castor.xml.MarshalException;
019: import org.exolab.castor.xml.Marshaller;
020: import org.exolab.castor.xml.Unmarshaller;
021: import org.exolab.castor.xml.ValidationException;
022: import org.xml.sax.ContentHandler;
023:
024: /**
025: * Class MetricDefinition.
026: *
027: * @version $Revision$ $Date$
028: */
029: public class MetricDefinition implements java.io.Serializable {
030:
031: //--------------------------/
032: //- Class/Member Variables -/
033: //--------------------------/
034:
035: /**
036: * Field _name
037: */
038: private java.lang.String _name;
039:
040: /**
041: * Field _description
042: */
043: private java.lang.String _description;
044:
045: /**
046: * Field _visible
047: */
048: private boolean _visible;
049:
050: /**
051: * keeps track of state for field: _visible
052: */
053: private boolean _has_visible;
054:
055: /**
056: * Field _accumulable
057: */
058: private boolean _accumulable;
059:
060: /**
061: * keeps track of state for field: _accumulable
062: */
063: private boolean _has_accumulable;
064:
065: //----------------/
066: //- Constructors -/
067: //----------------/
068:
069: public MetricDefinition() {
070: super ();
071: } //-- com.calipso.reportgenerator.reportdefinitions.MetricDefinition()
072:
073: //-----------/
074: //- Methods -/
075: //-----------/
076:
077: /**
078: * Method deleteAccumulable
079: */
080: public void deleteAccumulable() {
081: this ._has_accumulable = false;
082: } //-- void deleteAccumulable()
083:
084: /**
085: * Method getAccumulableReturns the value of field
086: * 'accumulable'.
087: *
088: * @return the value of field 'accumulable'.
089: */
090: public boolean getAccumulable() {
091: return this ._accumulable;
092: } //-- boolean getAccumulable()
093:
094: /**
095: * Method getDescriptionReturns the value of field
096: * 'description'.
097: *
098: * @return the value of field 'description'.
099: */
100: public java.lang.String getDescription() {
101: return this ._description;
102: } //-- java.lang.String getDescription()
103:
104: /**
105: * Method getNameReturns the value of field 'name'.
106: *
107: * @return the value of field 'name'.
108: */
109: public java.lang.String getName() {
110: return this ._name;
111: } //-- java.lang.String getName()
112:
113: /**
114: * Method getVisibleReturns the value of field 'visible'.
115: *
116: * @return the value of field 'visible'.
117: */
118: public boolean getVisible() {
119: return this ._visible;
120: } //-- boolean getVisible()
121:
122: /**
123: * Method hasAccumulable
124: */
125: public boolean hasAccumulable() {
126: return this ._has_accumulable;
127: } //-- boolean hasAccumulable()
128:
129: /**
130: * Method hasVisible
131: */
132: public boolean hasVisible() {
133: return this ._has_visible;
134: } //-- boolean hasVisible()
135:
136: /**
137: * Method isValid
138: */
139: public boolean isValid() {
140: try {
141: validate();
142: } catch (org.exolab.castor.xml.ValidationException vex) {
143: return false;
144: }
145: return true;
146: } //-- boolean isValid()
147:
148: /**
149: * Method marshal
150: *
151: * @param out
152: */
153: public void marshal(java.io.Writer out)
154: throws org.exolab.castor.xml.MarshalException,
155: org.exolab.castor.xml.ValidationException {
156:
157: Marshaller.marshal(this , out);
158: } //-- void marshal(java.io.Writer)
159:
160: /**
161: * Method marshal
162: *
163: * @param handler
164: */
165: public void marshal(org.xml.sax.ContentHandler handler)
166: throws java.io.IOException,
167: org.exolab.castor.xml.MarshalException,
168: org.exolab.castor.xml.ValidationException {
169:
170: Marshaller.marshal(this , handler);
171: } //-- void marshal(org.xml.sax.ContentHandler)
172:
173: /**
174: * Method setAccumulableSets the value of field 'accumulable'.
175: *
176: * @param accumulable the value of field 'accumulable'.
177: */
178: public void setAccumulable(boolean accumulable) {
179: this ._accumulable = accumulable;
180: this ._has_accumulable = true;
181: } //-- void setAccumulable(boolean)
182:
183: /**
184: * Method setDescriptionSets the value of field 'description'.
185: *
186: * @param description the value of field 'description'.
187: */
188: public void setDescription(java.lang.String description) {
189: this ._description = description;
190: } //-- void setDescription(java.lang.String)
191:
192: /**
193: * Method setNameSets the value of field 'name'.
194: *
195: * @param name the value of field 'name'.
196: */
197: public void setName(java.lang.String name) {
198: this ._name = name;
199: } //-- void setName(java.lang.String)
200:
201: /**
202: * Method setVisibleSets the value of field 'visible'.
203: *
204: * @param visible the value of field 'visible'.
205: */
206: public void setVisible(boolean visible) {
207: this ._visible = visible;
208: this ._has_visible = true;
209: } //-- void setVisible(boolean)
210:
211: /**
212: * Method unmarshal
213: *
214: * @param reader
215: */
216: public static com.calipso.reportgenerator.reportdefinitions.MetricDefinition unmarshal(
217: java.io.Reader reader)
218: throws org.exolab.castor.xml.MarshalException,
219: org.exolab.castor.xml.ValidationException {
220: return (com.calipso.reportgenerator.reportdefinitions.MetricDefinition) Unmarshaller
221: .unmarshal(
222: com.calipso.reportgenerator.reportdefinitions.MetricDefinition.class,
223: reader);
224: } //-- com.calipso.reportgenerator.reportdefinitions.MetricDefinition unmarshal(java.io.Reader)
225:
226: /**
227: * Method validate
228: */
229: public void validate()
230: throws org.exolab.castor.xml.ValidationException {
231: org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
232: validator.validate(this );
233: } //-- void validate()
234:
235: }
|