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   * 
12   * 
13   * @version $Revision$ $Date$
14   */
15  public class Configuration implements java.io.Serializable {
16  
17  
18        //--------------------------/
19       //- Class/Member Variables -/
20      //--------------------------/
21  
22      /**
23       * Internal choice value storage
24       */
25      private java.lang.Object _choiceValue;
26  
27      /**
28       * Field _marshal.
29       */
30      private org.exolab.castor.tests.framework.testDescriptor.Marshal _marshal;
31  
32      /**
33       * Field _unmarshal.
34       */
35      private org.exolab.castor.tests.framework.testDescriptor.Unmarshal _unmarshal;
36  
37  
38        //----------------/
39       //- Constructors -/
40      //----------------/
41  
42      public Configuration() {
43          super();
44      }
45  
46  
47        //-----------/
48       //- Methods -/
49      //-----------/
50  
51      /**
52       * Returns the value of field 'choiceValue'. The field
53       * 'choiceValue' has the following description: Internal choice
54       * value storage
55       * 
56       * @return the value of field 'ChoiceValue'.
57       */
58      public java.lang.Object getChoiceValue(
59      ) {
60          return this._choiceValue;
61      }
62  
63      /**
64       * Returns the value of field 'marshal'.
65       * 
66       * @return the value of field 'Marshal'.
67       */
68      public org.exolab.castor.tests.framework.testDescriptor.Marshal getMarshal(
69      ) {
70          return this._marshal;
71      }
72  
73      /**
74       * Returns the value of field 'unmarshal'.
75       * 
76       * @return the value of field 'Unmarshal'.
77       */
78      public org.exolab.castor.tests.framework.testDescriptor.Unmarshal getUnmarshal(
79      ) {
80          return this._unmarshal;
81      }
82  
83      /**
84       * Method isValid.
85       * 
86       * @return true if this object is valid according to the schema
87       */
88      public boolean isValid(
89      ) {
90          try {
91              validate();
92          } catch (org.exolab.castor.xml.ValidationException vex) {
93              return false;
94          }
95          return true;
96      }
97  
98      /**
99       * 
100      * 
101      * @param out
102      * @throws org.exolab.castor.xml.MarshalException if object is
103      * null or if any SAXException is thrown during marshaling
104      * @throws org.exolab.castor.xml.ValidationException if this
105      * object is an invalid instance according to the schema
106      */
107     public void marshal(
108             final java.io.Writer out)
109     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
110         org.exolab.castor.xml.Marshaller.marshal(this, out);
111     }
112 
113     /**
114      * 
115      * 
116      * @param handler
117      * @throws java.io.IOException if an IOException occurs during
118      * marshaling
119      * @throws org.exolab.castor.xml.ValidationException if this
120      * object is an invalid instance according to the schema
121      * @throws org.exolab.castor.xml.MarshalException if object is
122      * null or if any SAXException is thrown during marshaling
123      */
124     public void marshal(
125             final org.xml.sax.ContentHandler handler)
126     throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
127         org.exolab.castor.xml.Marshaller.marshal(this, handler);
128     }
129 
130     /**
131      * Sets the value of field 'marshal'.
132      * 
133      * @param marshal the value of field 'marshal'.
134      */
135     public void setMarshal(
136             final org.exolab.castor.tests.framework.testDescriptor.Marshal marshal) {
137         this._marshal = marshal;
138         this._choiceValue = marshal;
139     }
140 
141     /**
142      * Sets the value of field 'unmarshal'.
143      * 
144      * @param unmarshal the value of field 'unmarshal'.
145      */
146     public void setUnmarshal(
147             final org.exolab.castor.tests.framework.testDescriptor.Unmarshal unmarshal) {
148         this._unmarshal = unmarshal;
149         this._choiceValue = unmarshal;
150     }
151 
152     /**
153      * Method unmarshal.
154      * 
155      * @param reader
156      * @throws org.exolab.castor.xml.MarshalException if object is
157      * null or if any SAXException is thrown during marshaling
158      * @throws org.exolab.castor.xml.ValidationException if this
159      * object is an invalid instance according to the schema
160      * @return the unmarshaled
161      * org.exolab.castor.tests.framework.testDescriptor.Configuratio
162      */
163     public static org.exolab.castor.tests.framework.testDescriptor.Configuration unmarshal(
164             final java.io.Reader reader)
165     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
166         return (org.exolab.castor.tests.framework.testDescriptor.Configuration) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.tests.framework.testDescriptor.Configuration.class, reader);
167     }
168 
169     /**
170      * 
171      * 
172      * @throws org.exolab.castor.xml.ValidationException if this
173      * object is an invalid instance according to the schema
174      */
175     public void validate(
176     )
177     throws org.exolab.castor.xml.ValidationException {
178         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
179         validator.validate(this);
180     }
181 
182 }