1 7 8 package org.apache.jetspeed.xml.api.jcm; 9 10 14 import java.io.Reader ; 15 import java.io.Serializable ; 16 import java.io.Writer ; 17 import org.exolab.castor.xml.*; 18 import org.exolab.castor.xml.MarshalException; 19 import org.exolab.castor.xml.ValidationException; 20 import org.xml.sax.DocumentHandler ; 21 22 26 public class Item implements java.io.Serializable { 27 28 29 33 private java.lang.String _topic; 34 35 private java.lang.String _pubDate; 36 37 private java.lang.String _title; 38 39 private java.lang.String _link; 40 41 private java.lang.String _description; 42 43 private Quote _quote; 44 45 46 50 public Item() { 51 super(); 52 } 54 55 59 61 public java.lang.String getDescription() 62 { 63 return this._description; 64 } 66 68 public java.lang.String getLink() 69 { 70 return this._link; 71 } 73 75 public java.lang.String getPubDate() 76 { 77 return this._pubDate; 78 } 80 82 public Quote getQuote() 83 { 84 return this._quote; 85 } 87 89 public java.lang.String getTitle() 90 { 91 return this._title; 92 } 94 96 public java.lang.String getTopic() 97 { 98 return this._topic; 99 } 101 103 public boolean isValid() 104 { 105 try { 106 validate(); 107 } 108 catch (org.exolab.castor.xml.ValidationException vex) { 109 return false; 110 } 111 return true; 112 } 114 118 public void marshal(java.io.Writer out) 119 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 120 { 121 122 Marshaller.marshal(this, out); 123 } 125 129 public void marshal(org.xml.sax.DocumentHandler handler) 130 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 131 { 132 133 Marshaller.marshal(this, handler); 134 } 136 140 public void setDescription(java.lang.String description) 141 { 142 this._description = description; 143 } 145 149 public void setLink(java.lang.String link) 150 { 151 this._link = link; 152 } 154 158 public void setPubDate(java.lang.String pubDate) 159 { 160 this._pubDate = pubDate; 161 } 163 167 public void setQuote(Quote quote) 168 { 169 this._quote = quote; 170 } 172 176 public void setTitle(java.lang.String title) 177 { 178 this._title = title; 179 } 181 185 public void setTopic(java.lang.String topic) 186 { 187 this._topic = topic; 188 } 190 194 public static org.apache.jetspeed.xml.api.jcm.Item unmarshal(java.io.Reader reader) 195 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 196 { 197 return (org.apache.jetspeed.xml.api.jcm.Item) Unmarshaller.unmarshal(org.apache.jetspeed.xml.api.jcm.Item.class, reader); 198 } 200 202 public void validate() 203 throws org.exolab.castor.xml.ValidationException 204 { 205 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); 206 validator.validate(this); 207 } 209 } 210 | Popular Tags |