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