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.builder.binding.xml;
9   
10  /**
11   * This element allows to define naming convention when naming a
12   * complexType, element or
13   *  modelGroup. Indeed the user can decide of a prefix to add to
14   * each class name as well
15   *  as a suffix. This naming style won't affect the names entered
16   * in the binding file but only 
17   *  the XML Names.
18   *  
19   * 
20   * @version $Revision$ $Date$
21   */
22  public class NamingXMLType implements java.io.Serializable {
23  
24  
25        //--------------------------/
26       //- Class/Member Variables -/
27      //--------------------------/
28  
29      /**
30       * Field _elementName.
31       */
32      private org.exolab.castor.builder.binding.xml.NamingType _elementName;
33  
34      /**
35       * Field _complexTypeName.
36       */
37      private org.exolab.castor.builder.binding.xml.NamingType _complexTypeName;
38  
39      /**
40       * Field _modelGroupName.
41       */
42      private org.exolab.castor.builder.binding.xml.NamingType _modelGroupName;
43  
44  
45        //----------------/
46       //- Constructors -/
47      //----------------/
48  
49      public NamingXMLType() {
50          super();
51      }
52  
53  
54        //-----------/
55       //- Methods -/
56      //-----------/
57  
58      /**
59       * Returns the value of field 'complexTypeName'.
60       * 
61       * @return the value of field 'ComplexTypeName'.
62       */
63      public org.exolab.castor.builder.binding.xml.NamingType getComplexTypeName(
64      ) {
65          return this._complexTypeName;
66      }
67  
68      /**
69       * Returns the value of field 'elementName'.
70       * 
71       * @return the value of field 'ElementName'.
72       */
73      public org.exolab.castor.builder.binding.xml.NamingType getElementName(
74      ) {
75          return this._elementName;
76      }
77  
78      /**
79       * Returns the value of field 'modelGroupName'.
80       * 
81       * @return the value of field 'ModelGroupName'.
82       */
83      public org.exolab.castor.builder.binding.xml.NamingType getModelGroupName(
84      ) {
85          return this._modelGroupName;
86      }
87  
88      /**
89       * Method isValid.
90       * 
91       * @return true if this object is valid according to the schema
92       */
93      public boolean isValid(
94      ) {
95          try {
96              validate();
97          } catch (org.exolab.castor.xml.ValidationException vex) {
98              return false;
99          }
100         return true;
101     }
102 
103     /**
104      * 
105      * 
106      * @param out
107      * @throws org.exolab.castor.xml.MarshalException if object is
108      * null or if any SAXException is thrown during marshaling
109      * @throws org.exolab.castor.xml.ValidationException if this
110      * object is an invalid instance according to the schema
111      */
112     public void marshal(
113             final java.io.Writer out)
114     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
115         org.exolab.castor.xml.Marshaller.marshal(this, out);
116     }
117 
118     /**
119      * 
120      * 
121      * @param handler
122      * @throws java.io.IOException if an IOException occurs during
123      * marshaling
124      * @throws org.exolab.castor.xml.ValidationException if this
125      * object is an invalid instance according to the schema
126      * @throws org.exolab.castor.xml.MarshalException if object is
127      * null or if any SAXException is thrown during marshaling
128      */
129     public void marshal(
130             final org.xml.sax.ContentHandler handler)
131     throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
132         org.exolab.castor.xml.Marshaller.marshal(this, handler);
133     }
134 
135     /**
136      * Sets the value of field 'complexTypeName'.
137      * 
138      * @param complexTypeName the value of field 'complexTypeName'.
139      */
140     public void setComplexTypeName(
141             final org.exolab.castor.builder.binding.xml.NamingType complexTypeName) {
142         this._complexTypeName = complexTypeName;
143     }
144 
145     /**
146      * Sets the value of field 'elementName'.
147      * 
148      * @param elementName the value of field 'elementName'.
149      */
150     public void setElementName(
151             final org.exolab.castor.builder.binding.xml.NamingType elementName) {
152         this._elementName = elementName;
153     }
154 
155     /**
156      * Sets the value of field 'modelGroupName'.
157      * 
158      * @param modelGroupName the value of field 'modelGroupName'.
159      */
160     public void setModelGroupName(
161             final org.exolab.castor.builder.binding.xml.NamingType modelGroupName) {
162         this._modelGroupName = modelGroupName;
163     }
164 
165     /**
166      * Method unmarshalNamingXMLType.
167      * 
168      * @param reader
169      * @throws org.exolab.castor.xml.MarshalException if object is
170      * null or if any SAXException is thrown during marshaling
171      * @throws org.exolab.castor.xml.ValidationException if this
172      * object is an invalid instance according to the schema
173      * @return the unmarshaled
174      * org.exolab.castor.builder.binding.xml.NamingXMLType
175      */
176     public static org.exolab.castor.builder.binding.xml.NamingXMLType unmarshalNamingXMLType(
177             final java.io.Reader reader)
178     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
179         return (org.exolab.castor.builder.binding.xml.NamingXMLType) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.builder.binding.xml.NamingXMLType.class, reader);
180     }
181 
182     /**
183      * 
184      * 
185      * @throws org.exolab.castor.xml.ValidationException if this
186      * object is an invalid instance according to the schema
187      */
188     public void validate(
189     )
190     throws org.exolab.castor.xml.ValidationException {
191         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
192         validator.validate(this);
193     }
194 
195 }