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 ActionDefinition 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 java.lang.String _expression; 50 51 54 private java.lang.String _metric; 55 56 57 61 public ActionDefinition() { 62 super(); 63 } 65 66 70 76 public java.lang.String getDescription() 77 { 78 return this._description; 79 } 81 86 public java.lang.String getExpression() 87 { 88 return this._expression; 89 } 91 96 public java.lang.String getMetric() 97 { 98 return this._metric; 99 } 101 106 public java.lang.String getName() 107 { 108 return this._name; 109 } 111 114 public boolean isValid() 115 { 116 try { 117 validate(); 118 } 119 catch (org.exolab.castor.xml.ValidationException vex) { 120 return false; 121 } 122 return true; 123 } 125 130 public void marshal(java.io.Writer out) 131 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 132 { 133 134 Marshaller.marshal(this, out); 135 } 137 142 public void marshal(org.xml.sax.ContentHandler handler) 143 throws java.io.IOException , org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 144 { 145 146 Marshaller.marshal(this, handler); 147 } 149 154 public void setDescription(java.lang.String description) 155 { 156 this._description = description; 157 } 159 164 public void setExpression(java.lang.String expression) 165 { 166 this._expression = expression; 167 } 169 174 public void setMetric(java.lang.String metric) 175 { 176 this._metric = metric; 177 } 179 184 public void setName(java.lang.String name) 185 { 186 this._name = name; 187 } 189 194 public static com.calipso.reportgenerator.reportdefinitions.ActionDefinition unmarshal(java.io.Reader reader) 195 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 196 { 197 return (com.calipso.reportgenerator.reportdefinitions.ActionDefinition) Unmarshaller.unmarshal(com.calipso.reportgenerator.reportdefinitions.ActionDefinition.class, reader); 198 } 200 203 public void validate() 204 throws org.exolab.castor.xml.ValidationException 205 { 206 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); 207 validator.validate(this); 208 } 210 } 211 | Popular Tags |