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 ActionDefinition.
026: *
027: * @version $Revision$ $Date$
028: */
029: public class ActionDefinition 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 _expression
047: */
048: private java.lang.String _expression;
049:
050: /**
051: * Field _metric
052: */
053: private java.lang.String _metric;
054:
055: //----------------/
056: //- Constructors -/
057: //----------------/
058:
059: public ActionDefinition() {
060: super ();
061: } //-- com.calipso.reportgenerator.reportdefinitions.ActionDefinition()
062:
063: //-----------/
064: //- Methods -/
065: //-----------/
066:
067: /**
068: * Method getDescriptionReturns the value of field
069: * 'description'.
070: *
071: * @return the value of field 'description'.
072: */
073: public java.lang.String getDescription() {
074: return this ._description;
075: } //-- java.lang.String getDescription()
076:
077: /**
078: * Method getExpressionReturns the value of field 'expression'.
079: *
080: * @return the value of field 'expression'.
081: */
082: public java.lang.String getExpression() {
083: return this ._expression;
084: } //-- java.lang.String getExpression()
085:
086: /**
087: * Method getMetricReturns the value of field 'metric'.
088: *
089: * @return the value of field 'metric'.
090: */
091: public java.lang.String getMetric() {
092: return this ._metric;
093: } //-- java.lang.String getMetric()
094:
095: /**
096: * Method getNameReturns the value of field 'name'.
097: *
098: * @return the value of field 'name'.
099: */
100: public java.lang.String getName() {
101: return this ._name;
102: } //-- java.lang.String getName()
103:
104: /**
105: * Method isValid
106: */
107: public boolean isValid() {
108: try {
109: validate();
110: } catch (org.exolab.castor.xml.ValidationException vex) {
111: return false;
112: }
113: return true;
114: } //-- boolean isValid()
115:
116: /**
117: * Method marshal
118: *
119: * @param out
120: */
121: public void marshal(java.io.Writer out)
122: throws org.exolab.castor.xml.MarshalException,
123: org.exolab.castor.xml.ValidationException {
124:
125: Marshaller.marshal(this , out);
126: } //-- void marshal(java.io.Writer)
127:
128: /**
129: * Method marshal
130: *
131: * @param handler
132: */
133: public void marshal(org.xml.sax.ContentHandler handler)
134: throws java.io.IOException,
135: org.exolab.castor.xml.MarshalException,
136: org.exolab.castor.xml.ValidationException {
137:
138: Marshaller.marshal(this , handler);
139: } //-- void marshal(org.xml.sax.ContentHandler)
140:
141: /**
142: * Method setDescriptionSets the value of field 'description'.
143: *
144: * @param description the value of field 'description'.
145: */
146: public void setDescription(java.lang.String description) {
147: this ._description = description;
148: } //-- void setDescription(java.lang.String)
149:
150: /**
151: * Method setExpressionSets the value of field 'expression'.
152: *
153: * @param expression the value of field 'expression'.
154: */
155: public void setExpression(java.lang.String expression) {
156: this ._expression = expression;
157: } //-- void setExpression(java.lang.String)
158:
159: /**
160: * Method setMetricSets the value of field 'metric'.
161: *
162: * @param metric the value of field 'metric'.
163: */
164: public void setMetric(java.lang.String metric) {
165: this ._metric = metric;
166: } //-- void setMetric(java.lang.String)
167:
168: /**
169: * Method setNameSets the value of field 'name'.
170: *
171: * @param name the value of field 'name'.
172: */
173: public void setName(java.lang.String name) {
174: this ._name = name;
175: } //-- void setName(java.lang.String)
176:
177: /**
178: * Method unmarshal
179: *
180: * @param reader
181: */
182: public static com.calipso.reportgenerator.reportdefinitions.ActionDefinition unmarshal(
183: java.io.Reader reader)
184: throws org.exolab.castor.xml.MarshalException,
185: org.exolab.castor.xml.ValidationException {
186: return (com.calipso.reportgenerator.reportdefinitions.ActionDefinition) Unmarshaller
187: .unmarshal(
188: com.calipso.reportgenerator.reportdefinitions.ActionDefinition.class,
189: reader);
190: } //-- com.calipso.reportgenerator.reportdefinitions.ActionDefinition unmarshal(java.io.Reader)
191:
192: /**
193: * Method validate
194: */
195: public void validate()
196: throws org.exolab.castor.xml.ValidationException {
197: org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
198: validator.validate(this );
199: } //-- void validate()
200:
201: }
|