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