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