1
2
3
4
5
6
7
8 package org.apache.jetspeed.xml.api.jcm;
9
10
11
12
13
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 /***
23 *
24 * @version $Revision$ $Date$
25 **/
26 public class Quote implements java.io.Serializable {
27
28
29
30
31
32
33 private java.lang.String _author;
34
35 private java.lang.String _link;
36
37 private java.lang.String _p;
38
39
40
41
42
43
44 public Quote() {
45 super();
46 }
47
48
49
50
51
52
53 /***
54 **/
55 public java.lang.String getAuthor()
56 {
57 return this._author;
58 }
59
60 /***
61 **/
62 public java.lang.String getLink()
63 {
64 return this._link;
65 }
66
67 /***
68 **/
69 public java.lang.String getP()
70 {
71 return this._p;
72 }
73
74 /***
75 **/
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 }
86
87 /***
88 *
89 * @param out
90 **/
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 }
97
98 /***
99 *
100 * @param handler
101 **/
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 }
108
109 /***
110 *
111 * @param author
112 **/
113 public void setAuthor(java.lang.String author)
114 {
115 this._author = author;
116 }
117
118 /***
119 *
120 * @param link
121 **/
122 public void setLink(java.lang.String link)
123 {
124 this._link = link;
125 }
126
127 /***
128 *
129 * @param p
130 **/
131 public void setP(java.lang.String p)
132 {
133 this._p = p;
134 }
135
136 /***
137 *
138 * @param reader
139 **/
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 }
145
146 /***
147 **/
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 }
154
155 }