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 * Class Ldap.
12 *
13 * @version $Revision$ $Date$
14 */
15 @SuppressWarnings("serial")
16 public class Ldap implements java.io.Serializable {
17
18
19 //--------------------------/
20 //- Class/Member Variables -/
21 //--------------------------/
22
23 /**
24 * Field _name.
25 */
26 private java.lang.String _name;
27
28
29 //----------------/
30 //- Constructors -/
31 //----------------/
32
33 public Ldap() {
34 super();
35 }
36
37
38 //-----------/
39 //- Methods -/
40 //-----------/
41
42 /**
43 * Returns the value of field 'name'.
44 *
45 * @return the value of field 'Name'.
46 */
47 public java.lang.String getName(
48 ) {
49 return this._name;
50 }
51
52 /**
53 * Method isValid.
54 *
55 * @return true if this object is valid according to the schema
56 */
57 public boolean isValid(
58 ) {
59 try {
60 validate();
61 } catch (org.exolab.castor.xml.ValidationException vex) {
62 return false;
63 }
64 return true;
65 }
66
67 /**
68 *
69 *
70 * @param out
71 * @throws org.exolab.castor.xml.MarshalException if object is
72 * null or if any SAXException is thrown during marshaling
73 * @throws org.exolab.castor.xml.ValidationException if this
74 * object is an invalid instance according to the schema
75 */
76 public void marshal(
77 final java.io.Writer out)
78 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
79 org.exolab.castor.xml.Marshaller.marshal(this, out);
80 }
81
82 /**
83 *
84 *
85 * @param handler
86 * @throws java.io.IOException if an IOException occurs during
87 * marshaling
88 * @throws org.exolab.castor.xml.ValidationException if this
89 * object is an invalid instance according to the schema
90 * @throws org.exolab.castor.xml.MarshalException if object is
91 * null or if any SAXException is thrown during marshaling
92 */
93 public void marshal(
94 final org.xml.sax.ContentHandler handler)
95 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
96 org.exolab.castor.xml.Marshaller.marshal(this, handler);
97 }
98
99 /**
100 * Sets the value of field 'name'.
101 *
102 * @param name the value of field 'name'.
103 */
104 public void setName(
105 final java.lang.String name) {
106 this._name = name;
107 }
108
109 /**
110 * Method unmarshal.
111 *
112 * @param reader
113 * @throws org.exolab.castor.xml.MarshalException if object is
114 * null or if any SAXException is thrown during marshaling
115 * @throws org.exolab.castor.xml.ValidationException if this
116 * object is an invalid instance according to the schema
117 * @return the unmarshaled org.exolab.castor.mapping.xml.Ldap
118 */
119 public static org.exolab.castor.mapping.xml.Ldap unmarshal(
120 final java.io.Reader reader)
121 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
122 return (org.exolab.castor.mapping.xml.Ldap) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.mapping.xml.Ldap.class, reader);
123 }
124
125 /**
126 *
127 *
128 * @throws org.exolab.castor.xml.ValidationException if this
129 * object is an invalid instance according to the schema
130 */
131 public void validate(
132 )
133 throws org.exolab.castor.xml.ValidationException {
134 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
135 validator.validate(this);
136 }
137
138 }