1 7 8 package com.calipso.reportgenerator.reportdefinitions; 9 10 14 import java.io.IOException ; 15 import java.io.Reader ; 16 import java.io.Serializable ; 17 import java.io.Writer ; 18 import org.exolab.castor.xml.MarshalException; 19 import org.exolab.castor.xml.Marshaller; 20 import org.exolab.castor.xml.Unmarshaller; 21 import org.exolab.castor.xml.ValidationException; 22 import org.xml.sax.ContentHandler ; 23 24 29 public class MetricDefinition implements java.io.Serializable { 30 31 32 36 39 private java.lang.String _name; 40 41 44 private java.lang.String _description; 45 46 49 private boolean _visible; 50 51 54 private boolean _has_visible; 55 56 59 private boolean _accumulable; 60 61 64 private boolean _has_accumulable; 65 66 67 71 public MetricDefinition() { 72 super(); 73 } 75 76 80 83 public void deleteAccumulable() 84 { 85 this._has_accumulable= false; 86 } 88 94 public boolean getAccumulable() 95 { 96 return this._accumulable; 97 } 99 105 public java.lang.String getDescription() 106 { 107 return this._description; 108 } 110 115 public java.lang.String getName() 116 { 117 return this._name; 118 } 120 125 public boolean getVisible() 126 { 127 return this._visible; 128 } 130 133 public boolean hasAccumulable() 134 { 135 return this._has_accumulable; 136 } 138 141 public boolean hasVisible() 142 { 143 return this._has_visible; 144 } 146 149 public boolean isValid() 150 { 151 try { 152 validate(); 153 } 154 catch (org.exolab.castor.xml.ValidationException vex) { 155 return false; 156 } 157 return true; 158 } 160 165 public void marshal(java.io.Writer out) 166 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 167 { 168 169 Marshaller.marshal(this, out); 170 } 172 177 public void marshal(org.xml.sax.ContentHandler handler) 178 throws java.io.IOException , org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 179 { 180 181 Marshaller.marshal(this, handler); 182 } 184 189 public void setAccumulable(boolean accumulable) 190 { 191 this._accumulable = accumulable; 192 this._has_accumulable = true; 193 } 195 200 public void setDescription(java.lang.String description) 201 { 202 this._description = description; 203 } 205 210 public void setName(java.lang.String name) 211 { 212 this._name = name; 213 } 215 220 public void setVisible(boolean visible) 221 { 222 this._visible = visible; 223 this._has_visible = true; 224 } 226 231 public static com.calipso.reportgenerator.reportdefinitions.MetricDefinition unmarshal(java.io.Reader reader) 232 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 233 { 234 return (com.calipso.reportgenerator.reportdefinitions.MetricDefinition) Unmarshaller.unmarshal(com.calipso.reportgenerator.reportdefinitions.MetricDefinition.class, reader); 235 } 237 240 public void validate() 241 throws org.exolab.castor.xml.ValidationException 242 { 243 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); 244 validator.validate(this); 245 } 247 } 248 | Popular Tags |