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 Quote implements java.io.Serializable { 27 28 29 33 private java.lang.String _author; 34 35 private java.lang.String _link; 36 37 private java.lang.String _p; 38 39 40 44 public Quote() { 45 super(); 46 } 48 49 53 55 public java.lang.String getAuthor() 56 { 57 return this._author; 58 } 60 62 public java.lang.String getLink() 63 { 64 return this._link; 65 } 67 69 public java.lang.String getP() 70 { 71 return this._p; 72 } 74 76 public boolean isValid() 77 { 78 try { 79 validate(); 80 } 81 catch (org.exolab.castor.xml.ValidationException vex) { 82 return false; 83 } 84 return true; 85 } 87 91 public void marshal(java.io.Writer out) 92 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 93 { 94 95 Marshaller.marshal(this, out); 96 } 98 102 public void marshal(org.xml.sax.DocumentHandler handler) 103 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 104 { 105 106 Marshaller.marshal(this, handler); 107 } 109 113 public void setAuthor(java.lang.String author) 114 { 115 this._author = author; 116 } 118 122 public void setLink(java.lang.String link) 123 { 124 this._link = link; 125 } 127 131 public void setP(java.lang.String p) 132 { 133 this._p = p; 134 } 136 140 public static org.apache.jetspeed.xml.api.jcm.Quote unmarshal(java.io.Reader reader) 141 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException 142 { 143 return (org.apache.jetspeed.xml.api.jcm.Quote) Unmarshaller.unmarshal(org.apache.jetspeed.xml.api.jcm.Quote.class, reader); 144 } 146 148 public void validate() 149 throws org.exolab.castor.xml.ValidationException 150 { 151 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); 152 validator.validate(this); 153 } 155 } 156 | Popular Tags |