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 Unmarshal.
12   * 
13   * @version $Revision$ $Date$
14   */
15  public class Unmarshal extends ConfigurationType 
16  implements java.io.Serializable
17  {
18  
19  
20        //----------------/
21       //- Constructors -/
22      //----------------/
23  
24      public Unmarshal() {
25          super();
26      }
27  
28  
29        //-----------/
30       //- Methods -/
31      //-----------/
32  
33      /**
34       * Method isValid.
35       * 
36       * @return true if this object is valid according to the schema
37       */
38      public boolean isValid(
39      ) {
40          try {
41              validate();
42          } catch (org.exolab.castor.xml.ValidationException vex) {
43              return false;
44          }
45          return true;
46      }
47  
48      /**
49       * 
50       * 
51       * @param out
52       * @throws org.exolab.castor.xml.MarshalException if object is
53       * null or if any SAXException is thrown during marshaling
54       * @throws org.exolab.castor.xml.ValidationException if this
55       * object is an invalid instance according to the schema
56       */
57      public void marshal(
58              final java.io.Writer out)
59      throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
60          org.exolab.castor.xml.Marshaller.marshal(this, out);
61      }
62  
63      /**
64       * 
65       * 
66       * @param handler
67       * @throws java.io.IOException if an IOException occurs during
68       * marshaling
69       * @throws org.exolab.castor.xml.ValidationException if this
70       * object is an invalid instance according to the schema
71       * @throws org.exolab.castor.xml.MarshalException if object is
72       * null or if any SAXException is thrown during marshaling
73       */
74      public void marshal(
75              final org.xml.sax.ContentHandler handler)
76      throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
77          org.exolab.castor.xml.Marshaller.marshal(this, handler);
78      }
79  
80      /**
81       * Method unmarshal.
82       * 
83       * @param reader
84       * @throws org.exolab.castor.xml.MarshalException if object is
85       * null or if any SAXException is thrown during marshaling
86       * @throws org.exolab.castor.xml.ValidationException if this
87       * object is an invalid instance according to the schema
88       * @return the unmarshaled
89       * org.exolab.castor.tests.framework.testDescriptor.ConfigurationType
90       */
91      public static org.exolab.castor.tests.framework.testDescriptor.ConfigurationType unmarshal(
92              final java.io.Reader reader)
93      throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
94          return (org.exolab.castor.tests.framework.testDescriptor.ConfigurationType) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.tests.framework.testDescriptor.Unmarshal.class, reader);
95      }
96  
97      /**
98       * 
99       * 
100      * @throws org.exolab.castor.xml.ValidationException if this
101      * object is an invalid instance according to the schema
102      */
103     public void validate(
104     )
105     throws org.exolab.castor.xml.ValidationException {
106         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
107         validator.validate(this);
108     }
109 
110 }