View Javadoc
1   /*
2    * This class was automatically generated with 
3    * <a href="http://www.castor.org">Castor 1.3.1</a>, using an XML
4    * Schema.
5    * $Id$
6    */
7   
8   package org.exolab.castor.tests.framework.testDescriptor;
9   
10  /**
11   * Class Failure.
12   * 
13   * @version $Revision$ $Date$
14   */
15  public class Failure extends FailureType 
16  implements java.io.Serializable
17  {
18  
19  
20        //----------------/
21       //- Constructors -/
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       //- Methods -/
35      //-----------/
36  
37      /**
38       * Method isValid.
39       * 
40       * @return true if this object is valid according to the schema
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       * @param out
56       * @throws org.exolab.castor.xml.MarshalException if object is
57       * null or if any SAXException is thrown during marshaling
58       * @throws org.exolab.castor.xml.ValidationException if this
59       * object is an invalid instance according to the schema
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       * @param handler
71       * @throws java.io.IOException if an IOException occurs during
72       * marshaling
73       * @throws org.exolab.castor.xml.ValidationException if this
74       * object is an invalid instance according to the schema
75       * @throws org.exolab.castor.xml.MarshalException if object is
76       * null or if any SAXException is thrown during marshaling
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       * Method unmarshal.
86       * 
87       * @param reader
88       * @throws org.exolab.castor.xml.MarshalException if object is
89       * null or if any SAXException is thrown during marshaling
90       * @throws org.exolab.castor.xml.ValidationException if this
91       * object is an invalid instance according to the schema
92       * @return the unmarshaled
93       * org.exolab.castor.tests.framework.testDescriptor.FailureType
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      * @throws org.exolab.castor.xml.ValidationException if this
105      * object is an invalid instance according to the schema
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 }