1
2
3
4
5
6
7
8 package org.sourceforge.mbeanmonitoring.report.castor;
9
10
11
12
13
14 import org.exolab.castor.xml.Marshaller;
15 import org.exolab.castor.xml.Unmarshaller;
16
17
18
19
20
21
22 public class Element implements java.io.Serializable {
23
24
25
26
27
28
29
30
31
32 private java.lang.String _name;
33
34
35
36
37
38
39 public Element() {
40 super();
41 }
42
43
44
45
46
47
48
49
50
51
52
53 public java.lang.String getName(
54 ) {
55 return this._name;
56 }
57
58
59
60
61
62
63 public boolean isValid(
64 ) {
65 try {
66 validate();
67 } catch (org.exolab.castor.xml.ValidationException vex) {
68 return false;
69 }
70 return true;
71 }
72
73
74
75
76
77
78
79
80
81
82 public void marshal(
83 final java.io.Writer out)
84 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
85 Marshaller.marshal(this, out);
86 }
87
88
89
90
91
92
93
94
95
96
97
98
99 public void marshal(
100 final org.xml.sax.ContentHandler handler)
101 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
102 Marshaller.marshal(this, handler);
103 }
104
105
106
107
108
109
110 public void setName(
111 final java.lang.String name) {
112 this._name = name;
113 }
114
115
116
117
118
119
120
121
122
123
124
125
126 public static org.sourceforge.mbeanmonitoring.report.castor.Element unmarshal(
127 final java.io.Reader reader)
128 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
129 return (org.sourceforge.mbeanmonitoring.report.castor.Element) Unmarshaller.unmarshal(org.sourceforge.mbeanmonitoring.report.castor.Element.class, reader);
130 }
131
132
133
134
135
136
137
138 public void validate(
139 )
140 throws org.exolab.castor.xml.ValidationException {
141 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
142 validator.validate(this);
143 }
144
145 }