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 MetricProperty.
026: *
027: * @version $Revision$ $Date$
028: */
029: public class MetricProperty implements java.io.Serializable {
030:
031: //--------------------------/
032: //- Class/Member Variables -/
033: //--------------------------/
034:
035: /**
036: * Field _metricName
037: */
038: private java.lang.String _metricName;
039:
040: /**
041: * Field _visible
042: */
043: private boolean _visible = true;
044:
045: /**
046: * keeps track of state for field: _visible
047: */
048: private boolean _has_visible;
049:
050: //----------------/
051: //- Constructors -/
052: //----------------/
053:
054: public MetricProperty() {
055: super ();
056: } //-- com.calipso.reportgenerator.reportdefinitions.MetricProperty()
057:
058: //-----------/
059: //- Methods -/
060: //-----------/
061:
062: /**
063: * Method deleteVisible
064: */
065: public void deleteVisible() {
066: this ._has_visible = false;
067: } //-- void deleteVisible()
068:
069: /**
070: * Method getMetricNameReturns the value of field 'metricName'.
071: *
072: * @return the value of field 'metricName'.
073: */
074: public java.lang.String getMetricName() {
075: return this ._metricName;
076: } //-- java.lang.String getMetricName()
077:
078: /**
079: * Method getVisibleReturns the value of field 'visible'.
080: *
081: * @return the value of field 'visible'.
082: */
083: public boolean getVisible() {
084: return this ._visible;
085: } //-- boolean getVisible()
086:
087: /**
088: * Method hasVisible
089: */
090: public boolean hasVisible() {
091: return this ._has_visible;
092: } //-- boolean hasVisible()
093:
094: /**
095: * Method isValid
096: */
097: public boolean isValid() {
098: try {
099: validate();
100: } catch (org.exolab.castor.xml.ValidationException vex) {
101: return false;
102: }
103: return true;
104: } //-- boolean isValid()
105:
106: /**
107: * Method marshal
108: *
109: * @param out
110: */
111: public void marshal(java.io.Writer out)
112: throws org.exolab.castor.xml.MarshalException,
113: org.exolab.castor.xml.ValidationException {
114:
115: Marshaller.marshal(this , out);
116: } //-- void marshal(java.io.Writer)
117:
118: /**
119: * Method marshal
120: *
121: * @param handler
122: */
123: public void marshal(org.xml.sax.ContentHandler handler)
124: throws java.io.IOException,
125: org.exolab.castor.xml.MarshalException,
126: org.exolab.castor.xml.ValidationException {
127:
128: Marshaller.marshal(this , handler);
129: } //-- void marshal(org.xml.sax.ContentHandler)
130:
131: /**
132: * Method setMetricNameSets the value of field 'metricName'.
133: *
134: * @param metricName the value of field 'metricName'.
135: */
136: public void setMetricName(java.lang.String metricName) {
137: this ._metricName = metricName;
138: } //-- void setMetricName(java.lang.String)
139:
140: /**
141: * Method setVisibleSets the value of field 'visible'.
142: *
143: * @param visible the value of field 'visible'.
144: */
145: public void setVisible(boolean visible) {
146: this ._visible = visible;
147: this ._has_visible = true;
148: } //-- void setVisible(boolean)
149:
150: /**
151: * Method unmarshal
152: *
153: * @param reader
154: */
155: public static com.calipso.reportgenerator.reportdefinitions.MetricProperty unmarshal(
156: java.io.Reader reader)
157: throws org.exolab.castor.xml.MarshalException,
158: org.exolab.castor.xml.ValidationException {
159: return (com.calipso.reportgenerator.reportdefinitions.MetricProperty) Unmarshaller
160: .unmarshal(
161: com.calipso.reportgenerator.reportdefinitions.MetricProperty.class,
162: reader);
163: } //-- com.calipso.reportgenerator.reportdefinitions.MetricProperty unmarshal(java.io.Reader)
164:
165: /**
166: * Method validate
167: */
168: public void validate()
169: throws org.exolab.castor.xml.ValidationException {
170: org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
171: validator.validate(this );
172: } //-- void validate()
173:
174: }
|