1 /*
2 * This class was automatically generated with
3 * <a href="http://www.castor.org">Castor 1.3.1</a>, using an XML
4 * Schema.
5 * $Id$
6 */
7
8 package org.exolab.castor.mapping.xml;
9
10 /**
11 * The 'map-to' element is used for specifying the name of the item
12 *
13 * that should be associated with the given Java object.
14 *
15 *
16 * @version $Revision$ $Date$
17 */
18 @SuppressWarnings("serial")
19 public class MapTo implements java.io.Serializable {
20
21
22 //--------------------------/
23 //- Class/Member Variables -/
24 //--------------------------/
25
26 /**
27 * An optional attribute used to specify the name of the table
28 * to which the given Java object is associated.
29 *
30 */
31 private java.lang.String _table;
32
33 /**
34 * Field _xml.
35 */
36 private java.lang.String _xml;
37
38 /**
39 * Field _nsUri.
40 */
41 private java.lang.String _nsUri;
42
43 /**
44 * Field _nsPrefix.
45 */
46 private java.lang.String _nsPrefix;
47
48 /**
49 * Field _elementDefinition.
50 */
51 private boolean _elementDefinition = false;
52
53 /**
54 * keeps track of state for field: _elementDefinition
55 */
56 private boolean _has_elementDefinition;
57
58 /**
59 * Field _ldapDn.
60 */
61 private java.lang.String _ldapDn;
62
63 /**
64 * Field _ldapOc.
65 */
66 private java.lang.String _ldapOc;
67
68
69 //----------------/
70 //- Constructors -/
71 //----------------/
72
73 public MapTo() {
74 super();
75 }
76
77
78 //-----------/
79 //- Methods -/
80 //-----------/
81
82 /**
83 */
84 public void deleteElementDefinition(
85 ) {
86 this._has_elementDefinition= false;
87 }
88
89 /**
90 * Returns the value of field 'elementDefinition'.
91 *
92 * @return the value of field 'ElementDefinition'.
93 */
94 public boolean getElementDefinition(
95 ) {
96 return this._elementDefinition;
97 }
98
99 /**
100 * Returns the value of field 'ldapDn'.
101 *
102 * @return the value of field 'LdapDn'.
103 */
104 public java.lang.String getLdapDn(
105 ) {
106 return this._ldapDn;
107 }
108
109 /**
110 * Returns the value of field 'ldapOc'.
111 *
112 * @return the value of field 'LdapOc'.
113 */
114 public java.lang.String getLdapOc(
115 ) {
116 return this._ldapOc;
117 }
118
119 /**
120 * Returns the value of field 'nsPrefix'.
121 *
122 * @return the value of field 'NsPrefix'.
123 */
124 public java.lang.String getNsPrefix(
125 ) {
126 return this._nsPrefix;
127 }
128
129 /**
130 * Returns the value of field 'nsUri'.
131 *
132 * @return the value of field 'NsUri'.
133 */
134 public java.lang.String getNsUri(
135 ) {
136 return this._nsUri;
137 }
138
139 /**
140 * Returns the value of field 'table'. The field 'table' has
141 * the following description: An optional attribute used to
142 * specify the name of the table
143 * to which the given Java object is associated.
144 *
145 *
146 * @return the value of field 'Table'.
147 */
148 public java.lang.String getTable(
149 ) {
150 return this._table;
151 }
152
153 /**
154 * Returns the value of field 'xml'.
155 *
156 * @return the value of field 'Xml'.
157 */
158 public java.lang.String getXml(
159 ) {
160 return this._xml;
161 }
162
163 /**
164 * Method hasElementDefinition.
165 *
166 * @return true if at least one ElementDefinition has been added
167 */
168 public boolean hasElementDefinition(
169 ) {
170 return this._has_elementDefinition;
171 }
172
173 /**
174 * Returns the value of field 'elementDefinition'.
175 *
176 * @return the value of field 'ElementDefinition'.
177 */
178 public boolean isElementDefinition(
179 ) {
180 return this._elementDefinition;
181 }
182
183 /**
184 * Method isValid.
185 *
186 * @return true if this object is valid according to the schema
187 */
188 public boolean isValid(
189 ) {
190 try {
191 validate();
192 } catch (org.exolab.castor.xml.ValidationException vex) {
193 return false;
194 }
195 return true;
196 }
197
198 /**
199 *
200 *
201 * @param out
202 * @throws org.exolab.castor.xml.MarshalException if object is
203 * null or if any SAXException is thrown during marshaling
204 * @throws org.exolab.castor.xml.ValidationException if this
205 * object is an invalid instance according to the schema
206 */
207 public void marshal(
208 final java.io.Writer out)
209 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
210 org.exolab.castor.xml.Marshaller.marshal(this, out);
211 }
212
213 /**
214 *
215 *
216 * @param handler
217 * @throws java.io.IOException if an IOException occurs during
218 * marshaling
219 * @throws org.exolab.castor.xml.ValidationException if this
220 * object is an invalid instance according to the schema
221 * @throws org.exolab.castor.xml.MarshalException if object is
222 * null or if any SAXException is thrown during marshaling
223 */
224 public void marshal(
225 final org.xml.sax.ContentHandler handler)
226 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
227 org.exolab.castor.xml.Marshaller.marshal(this, handler);
228 }
229
230 /**
231 * Sets the value of field 'elementDefinition'.
232 *
233 * @param elementDefinition the value of field
234 * 'elementDefinition'.
235 */
236 public void setElementDefinition(
237 final boolean elementDefinition) {
238 this._elementDefinition = elementDefinition;
239 this._has_elementDefinition = true;
240 }
241
242 /**
243 * Sets the value of field 'ldapDn'.
244 *
245 * @param ldapDn the value of field 'ldapDn'.
246 */
247 public void setLdapDn(
248 final java.lang.String ldapDn) {
249 this._ldapDn = ldapDn;
250 }
251
252 /**
253 * Sets the value of field 'ldapOc'.
254 *
255 * @param ldapOc the value of field 'ldapOc'.
256 */
257 public void setLdapOc(
258 final java.lang.String ldapOc) {
259 this._ldapOc = ldapOc;
260 }
261
262 /**
263 * Sets the value of field 'nsPrefix'.
264 *
265 * @param nsPrefix the value of field 'nsPrefix'.
266 */
267 public void setNsPrefix(
268 final java.lang.String nsPrefix) {
269 this._nsPrefix = nsPrefix;
270 }
271
272 /**
273 * Sets the value of field 'nsUri'.
274 *
275 * @param nsUri the value of field 'nsUri'.
276 */
277 public void setNsUri(
278 final java.lang.String nsUri) {
279 this._nsUri = nsUri;
280 }
281
282 /**
283 * Sets the value of field 'table'. The field 'table' has the
284 * following description: An optional attribute used to specify
285 * the name of the table
286 * to which the given Java object is associated.
287 *
288 *
289 * @param table the value of field 'table'.
290 */
291 public void setTable(
292 final java.lang.String table) {
293 this._table = table;
294 }
295
296 /**
297 * Sets the value of field 'xml'.
298 *
299 * @param xml the value of field 'xml'.
300 */
301 public void setXml(
302 final java.lang.String xml) {
303 this._xml = xml;
304 }
305
306 /**
307 * Method unmarshal.
308 *
309 * @param reader
310 * @throws org.exolab.castor.xml.MarshalException if object is
311 * null or if any SAXException is thrown during marshaling
312 * @throws org.exolab.castor.xml.ValidationException if this
313 * object is an invalid instance according to the schema
314 * @return the unmarshaled org.exolab.castor.mapping.xml.MapTo
315 */
316 public static org.exolab.castor.mapping.xml.MapTo unmarshal(
317 final java.io.Reader reader)
318 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
319 return (org.exolab.castor.mapping.xml.MapTo) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.mapping.xml.MapTo.class, reader);
320 }
321
322 /**
323 *
324 *
325 * @throws org.exolab.castor.xml.ValidationException if this
326 * object is an invalid instance according to the schema
327 */
328 public void validate(
329 )
330 throws org.exolab.castor.xml.ValidationException {
331 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
332 validator.validate(this);
333 }
334
335 }