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 TestDescriptorChoice.
12   * 
13   * @version $Revision$ $Date$
14   */
15  public class TestDescriptorChoice implements java.io.Serializable {
16  
17  
18        //--------------------------/
19       //- Class/Member Variables -/
20      //--------------------------/
21  
22      /**
23       * Tests source generation and then tests the generated source,
24       * testing
25       *  both marshaling and unmarshaling.
26       *  
27       */
28      private org.exolab.castor.tests.framework.testDescriptor.SourceGeneratorTest _sourceGeneratorTest;
29  
30      /**
31       * Test marshaling.
32       *  
33       */
34      private org.exolab.castor.tests.framework.testDescriptor.MarshallingTest _marshallingTest;
35  
36      /**
37       * Tests a schema.
38       *  
39       */
40      private org.exolab.castor.tests.framework.testDescriptor.SchemaTest _schemaTest;
41  
42      /**
43       * Tests source generation only, and does not attempt to use
44       * the generated code. While
45       *  a SourceGeneratorTest is better because it is more
46       * thorough, sometimes
47       *  the only thing that requires testing is the code
48       * generation.
49       *  
50       */
51      private org.exolab.castor.tests.framework.testDescriptor.OnlySourceGenerationTest _onlySourceGenerationTest;
52  
53  
54        //----------------/
55       //- Constructors -/
56      //----------------/
57  
58      public TestDescriptorChoice() {
59          super();
60      }
61  
62  
63        //-----------/
64       //- Methods -/
65      //-----------/
66  
67      /**
68       * Returns the value of field 'marshallingTest'. The field
69       * 'marshallingTest' has the following description: Test
70       * marshaling.
71       *  
72       * 
73       * @return the value of field 'MarshallingTest'.
74       */
75      public org.exolab.castor.tests.framework.testDescriptor.MarshallingTest getMarshallingTest(
76      ) {
77          return this._marshallingTest;
78      }
79  
80      /**
81       * Returns the value of field 'onlySourceGenerationTest'. The
82       * field 'onlySourceGenerationTest' has the following
83       * description: Tests source generation only, and does not
84       * attempt to use the generated code. While
85       *  a SourceGeneratorTest is better because it is more
86       * thorough, sometimes
87       *  the only thing that requires testing is the code
88       * generation.
89       *  
90       * 
91       * @return the value of field 'OnlySourceGenerationTest'.
92       */
93      public org.exolab.castor.tests.framework.testDescriptor.OnlySourceGenerationTest getOnlySourceGenerationTest(
94      ) {
95          return this._onlySourceGenerationTest;
96      }
97  
98      /**
99       * Returns the value of field 'schemaTest'. The field
100      * 'schemaTest' has the following description: Tests a schema.
101      *  
102      * 
103      * @return the value of field 'SchemaTest'.
104      */
105     public org.exolab.castor.tests.framework.testDescriptor.SchemaTest getSchemaTest(
106     ) {
107         return this._schemaTest;
108     }
109 
110     /**
111      * Returns the value of field 'sourceGeneratorTest'. The field
112      * 'sourceGeneratorTest' has the following description: Tests
113      * source generation and then tests the generated source,
114      * testing
115      *  both marshaling and unmarshaling.
116      *  
117      * 
118      * @return the value of field 'SourceGeneratorTest'.
119      */
120     public org.exolab.castor.tests.framework.testDescriptor.SourceGeneratorTest getSourceGeneratorTest(
121     ) {
122         return this._sourceGeneratorTest;
123     }
124 
125     /**
126      * Method isValid.
127      * 
128      * @return true if this object is valid according to the schema
129      */
130     public boolean isValid(
131     ) {
132         try {
133             validate();
134         } catch (org.exolab.castor.xml.ValidationException vex) {
135             return false;
136         }
137         return true;
138     }
139 
140     /**
141      * 
142      * 
143      * @param out
144      * @throws org.exolab.castor.xml.MarshalException if object is
145      * null or if any SAXException is thrown during marshaling
146      * @throws org.exolab.castor.xml.ValidationException if this
147      * object is an invalid instance according to the schema
148      */
149     public void marshal(
150             final java.io.Writer out)
151     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
152         org.exolab.castor.xml.Marshaller.marshal(this, out);
153     }
154 
155     /**
156      * 
157      * 
158      * @param handler
159      * @throws java.io.IOException if an IOException occurs during
160      * marshaling
161      * @throws org.exolab.castor.xml.ValidationException if this
162      * object is an invalid instance according to the schema
163      * @throws org.exolab.castor.xml.MarshalException if object is
164      * null or if any SAXException is thrown during marshaling
165      */
166     public void marshal(
167             final org.xml.sax.ContentHandler handler)
168     throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
169         org.exolab.castor.xml.Marshaller.marshal(this, handler);
170     }
171 
172     /**
173      * Sets the value of field 'marshallingTest'. The field
174      * 'marshallingTest' has the following description: Test
175      * marshaling.
176      *  
177      * 
178      * @param marshallingTest the value of field 'marshallingTest'.
179      */
180     public void setMarshallingTest(
181             final org.exolab.castor.tests.framework.testDescriptor.MarshallingTest marshallingTest) {
182         this._marshallingTest = marshallingTest;
183     }
184 
185     /**
186      * Sets the value of field 'onlySourceGenerationTest'. The
187      * field 'onlySourceGenerationTest' has the following
188      * description: Tests source generation only, and does not
189      * attempt to use the generated code. While
190      *  a SourceGeneratorTest is better because it is more
191      * thorough, sometimes
192      *  the only thing that requires testing is the code
193      * generation.
194      *  
195      * 
196      * @param onlySourceGenerationTest the value of field
197      * 'onlySourceGenerationTest'.
198      */
199     public void setOnlySourceGenerationTest(
200             final org.exolab.castor.tests.framework.testDescriptor.OnlySourceGenerationTest onlySourceGenerationTest) {
201         this._onlySourceGenerationTest = onlySourceGenerationTest;
202     }
203 
204     /**
205      * Sets the value of field 'schemaTest'. The field 'schemaTest'
206      * has the following description: Tests a schema.
207      *  
208      * 
209      * @param schemaTest the value of field 'schemaTest'.
210      */
211     public void setSchemaTest(
212             final org.exolab.castor.tests.framework.testDescriptor.SchemaTest schemaTest) {
213         this._schemaTest = schemaTest;
214     }
215 
216     /**
217      * Sets the value of field 'sourceGeneratorTest'. The field
218      * 'sourceGeneratorTest' has the following description: Tests
219      * source generation and then tests the generated source,
220      * testing
221      *  both marshaling and unmarshaling.
222      *  
223      * 
224      * @param sourceGeneratorTest the value of field
225      * 'sourceGeneratorTest'.
226      */
227     public void setSourceGeneratorTest(
228             final org.exolab.castor.tests.framework.testDescriptor.SourceGeneratorTest sourceGeneratorTest) {
229         this._sourceGeneratorTest = sourceGeneratorTest;
230     }
231 
232     /**
233      * Method unmarshal.
234      * 
235      * @param reader
236      * @throws org.exolab.castor.xml.MarshalException if object is
237      * null or if any SAXException is thrown during marshaling
238      * @throws org.exolab.castor.xml.ValidationException if this
239      * object is an invalid instance according to the schema
240      * @return the unmarshaled
241      * org.exolab.castor.tests.framework.testDescriptor.TestDescriptorChoice
242      */
243     public static org.exolab.castor.tests.framework.testDescriptor.TestDescriptorChoice unmarshal(
244             final java.io.Reader reader)
245     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
246         return (org.exolab.castor.tests.framework.testDescriptor.TestDescriptorChoice) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.tests.framework.testDescriptor.TestDescriptorChoice.class, reader);
247     }
248 
249     /**
250      * 
251      * 
252      * @throws org.exolab.castor.xml.ValidationException if this
253      * object is an invalid instance according to the schema
254      */
255     public void validate(
256     )
257     throws org.exolab.castor.xml.ValidationException {
258         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
259         validator.validate(this);
260     }
261 
262 }