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