1
2
3
4
5
6
7
8 package fr.in2p3.jsaga.adaptor.schema.job.emulator.config;
9
10
11
12
13
14 import java.io.IOException;
15 import java.io.Reader;
16 import java.io.Serializable;
17 import java.io.Writer;
18 import org.exolab.castor.types.Duration;
19 import org.exolab.castor.xml.MarshalException;
20 import org.exolab.castor.xml.Marshaller;
21 import org.exolab.castor.xml.Unmarshaller;
22 import org.exolab.castor.xml.ValidationException;
23 import org.xml.sax.ContentHandler;
24
25
26
27
28
29
30 public class DelayType implements java.io.Serializable {
31
32
33
34
35
36
37
38
39
40 private org.exolab.castor.types.Duration _time;
41
42
43
44
45 private float _percent;
46
47
48
49
50 private boolean _has_percent;
51
52
53
54
55
56
57 public DelayType()
58 {
59 super();
60 }
61
62
63
64
65
66
67
68
69
70
71 public void deletePercent()
72 {
73 this._has_percent= false;
74 }
75
76
77
78
79
80
81
82 public float getPercent()
83 {
84 return this._percent;
85 }
86
87
88
89
90
91
92
93 public org.exolab.castor.types.Duration getTime()
94 {
95 return this._time;
96 }
97
98
99
100
101
102
103
104
105 public boolean hasPercent()
106 {
107 return this._has_percent;
108 }
109
110
111
112
113
114
115
116
117 public boolean isValid()
118 {
119 try {
120 validate();
121 }
122 catch (org.exolab.castor.xml.ValidationException vex) {
123 return false;
124 }
125 return true;
126 }
127
128
129
130
131
132
133
134
135 public void marshal(java.io.Writer out)
136 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
137 {
138
139 Marshaller.marshal(this, out);
140 }
141
142
143
144
145
146
147
148
149 public void marshal(org.xml.sax.ContentHandler handler)
150 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
151 {
152
153 Marshaller.marshal(this, handler);
154 }
155
156
157
158
159
160
161 public void setPercent(float percent)
162 {
163 this._percent = percent;
164 this._has_percent = true;
165 }
166
167
168
169
170
171
172 public void setTime(org.exolab.castor.types.Duration time)
173 {
174 this._time = time;
175 }
176
177
178
179
180
181
182
183
184
185 public static java.lang.Object unmarshal(java.io.Reader reader)
186 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
187 {
188 return (fr.in2p3.jsaga.adaptor.schema.job.emulator.config.DelayType) Unmarshaller.unmarshal(fr.in2p3.jsaga.adaptor.schema.job.emulator.config.DelayType.class, reader);
189 }
190
191
192
193
194
195 public void validate()
196 throws org.exolab.castor.xml.ValidationException
197 {
198 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
199 validator.validate(this);
200 }
201
202 }