1
2
3
4
5
6
7
8 package org.exolab.castor.tests.framework.testDescriptor;
9
10
11
12
13
14
15 public class Failure extends FailureType
16 implements java.io.Serializable
17 {
18
19
20
21
22
23
24 public Failure() {
25 super();
26 }
27
28 public Failure(final java.lang.String defaultValue) {
29 super(defaultValue);
30 }
31
32
33
34
35
36
37
38
39
40
41
42 public boolean isValid(
43 ) {
44 try {
45 validate();
46 } catch (org.exolab.castor.xml.ValidationException vex) {
47 return false;
48 }
49 return true;
50 }
51
52
53
54
55
56
57
58
59
60
61 public void marshal(
62 final java.io.Writer out)
63 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
64 org.exolab.castor.xml.Marshaller.marshal(this, out);
65 }
66
67
68
69
70
71
72
73
74
75
76
77
78 public void marshal(
79 final org.xml.sax.ContentHandler handler)
80 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
81 org.exolab.castor.xml.Marshaller.marshal(this, handler);
82 }
83
84
85
86
87
88
89
90
91
92
93
94
95 public static org.exolab.castor.tests.framework.testDescriptor.FailureType unmarshal(
96 final java.io.Reader reader)
97 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
98 return (org.exolab.castor.tests.framework.testDescriptor.FailureType) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.tests.framework.testDescriptor.Failure.class, reader);
99 }
100
101
102
103
104
105
106
107 public void validate(
108 )
109 throws org.exolab.castor.xml.ValidationException {
110 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
111 validator.validate(this);
112 }
113
114 }