1
2
3
4
5
6
7
8 package org.exolab.castor.builder.binding.xml;
9
10
11
12
13
14
15 public class EnumClassName implements java.io.Serializable {
16
17
18
19
20
21
22
23
24
25 private java.lang.String _content = "";
26
27
28
29
30 private java.lang.String _package;
31
32
33
34
35
36
37 public EnumClassName() {
38 super();
39 setContent("");
40 }
41
42 public EnumClassName(final java.lang.String defaultValue) {
43 try {
44 setContent( new java.lang.String(defaultValue));
45 } catch(Exception e) {
46 throw new RuntimeException("Unable to cast default value for simple content!");
47 }
48 }
49
50
51
52
53
54
55
56
57
58
59
60
61 public java.lang.String getContent(
62 ) {
63 return this._content;
64 }
65
66
67
68
69
70
71 public java.lang.String getPackage(
72 ) {
73 return this._package;
74 }
75
76
77
78
79
80
81 public boolean isValid(
82 ) {
83 try {
84 validate();
85 } catch (org.exolab.castor.xml.ValidationException vex) {
86 return false;
87 }
88 return true;
89 }
90
91
92
93
94
95
96
97
98
99
100 public void marshal(
101 final java.io.Writer out)
102 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
103 org.exolab.castor.xml.Marshaller.marshal(this, out);
104 }
105
106
107
108
109
110
111
112
113
114
115
116
117 public void marshal(
118 final org.xml.sax.ContentHandler handler)
119 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
120 org.exolab.castor.xml.Marshaller.marshal(this, handler);
121 }
122
123
124
125
126
127
128
129 public void setContent(
130 final java.lang.String content) {
131 this._content = content;
132 }
133
134
135
136
137
138
139
140 public void setPackage(
141 final java.lang.String _package) {
142 this._package = _package;
143 }
144
145
146
147
148
149
150
151
152
153
154
155
156 public static org.exolab.castor.builder.binding.xml.EnumClassName unmarshalEnumClassName(
157 final java.io.Reader reader)
158 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
159 return (org.exolab.castor.builder.binding.xml.EnumClassName) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.builder.binding.xml.EnumClassName.class, reader);
160 }
161
162
163
164
165
166
167
168 public void validate(
169 )
170 throws org.exolab.castor.xml.ValidationException {
171 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
172 validator.validate(this);
173 }
174
175 }