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 Entry implements java.io.Serializable {
27
28
29
30
31
32
33 private java.lang.String _name;
34
35 private Image _image;
36
37
38
39
40
41
42 public Entry() {
43 super();
44 }
45
46
47
48
49
50
51 /***
52 **/
53 public Image getImage()
54 {
55 return this._image;
56 }
57
58 /***
59 **/
60 public java.lang.String getName()
61 {
62 return this._name;
63 }
64
65 /***
66 **/
67 public boolean isValid()
68 {
69 try {
70 validate();
71 }
72 catch (org.exolab.castor.xml.ValidationException vex) {
73 return false;
74 }
75 return true;
76 }
77
78 /***
79 *
80 * @param out
81 **/
82 public void marshal(java.io.Writer out)
83 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
84 {
85
86 Marshaller.marshal(this, out);
87 }
88
89 /***
90 *
91 * @param handler
92 **/
93 public void marshal(org.xml.sax.DocumentHandler handler)
94 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
95 {
96
97 Marshaller.marshal(this, handler);
98 }
99
100 /***
101 *
102 * @param image
103 **/
104 public void setImage(Image image)
105 {
106 this._image = image;
107 }
108
109 /***
110 *
111 * @param name
112 **/
113 public void setName(java.lang.String name)
114 {
115 this._name = name;
116 }
117
118 /***
119 *
120 * @param reader
121 **/
122 public static org.apache.jetspeed.xml.api.jcm.Entry unmarshal(java.io.Reader reader)
123 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
124 {
125 return (org.apache.jetspeed.xml.api.jcm.Entry) Unmarshaller.unmarshal(org.apache.jetspeed.xml.api.jcm.Entry.class, reader);
126 }
127
128 /***
129 **/
130 public void validate()
131 throws org.exolab.castor.xml.ValidationException
132 {
133 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
134 validator.validate(this);
135 }
136
137 }