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 type represents the binding for the 'content' member
12   * generated
13   *  as part of a 'mixed' complex type definition. It allows the
14   * definition
15   *  of its name.
16   *  
17   * 
18   * @version $Revision$ $Date$
19   */
20  public class ContentMemberType implements java.io.Serializable {
21  
22  
23        //--------------------------/
24       //- Class/Member Variables -/
25      //--------------------------/
26  
27      /**
28       * Field _name.
29       */
30      private java.lang.String _name;
31  
32      /**
33       * Field _visibility.
34       */
35      private org.exolab.castor.builder.binding.xml.types.VisibilityType _visibility;
36  
37  
38        //----------------/
39       //- Constructors -/
40      //----------------/
41  
42      public ContentMemberType() {
43          super();
44      }
45  
46  
47        //-----------/
48       //- Methods -/
49      //-----------/
50  
51      /**
52       * Returns the value of field 'name'.
53       * 
54       * @return the value of field 'Name'.
55       */
56      public java.lang.String getName(
57      ) {
58          return this._name;
59      }
60  
61      /**
62       * Returns the value of field 'visibility'.
63       * 
64       * @return the value of field 'Visibility'.
65       */
66      public org.exolab.castor.builder.binding.xml.types.VisibilityType getVisibility(
67      ) {
68          return this._visibility;
69      }
70  
71      /**
72       * Method isValid.
73       * 
74       * @return true if this object is valid according to the schema
75       */
76      public boolean isValid(
77      ) {
78          try {
79              validate();
80          } catch (org.exolab.castor.xml.ValidationException vex) {
81              return false;
82          }
83          return true;
84      }
85  
86      /**
87       * 
88       * 
89       * @param out
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       */
95      public void marshal(
96              final java.io.Writer out)
97      throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
98          org.exolab.castor.xml.Marshaller.marshal(this, out);
99      }
100 
101     /**
102      * 
103      * 
104      * @param handler
105      * @throws java.io.IOException if an IOException occurs during
106      * marshaling
107      * @throws org.exolab.castor.xml.ValidationException if this
108      * object is an invalid instance according to the schema
109      * @throws org.exolab.castor.xml.MarshalException if object is
110      * null or if any SAXException is thrown during marshaling
111      */
112     public void marshal(
113             final org.xml.sax.ContentHandler handler)
114     throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
115         org.exolab.castor.xml.Marshaller.marshal(this, handler);
116     }
117 
118     /**
119      * Sets the value of field 'name'.
120      * 
121      * @param name the value of field 'name'.
122      */
123     public void setName(
124             final java.lang.String name) {
125         this._name = name;
126     }
127 
128     /**
129      * Sets the value of field 'visibility'.
130      * 
131      * @param visibility the value of field 'visibility'.
132      */
133     public void setVisibility(
134             final org.exolab.castor.builder.binding.xml.types.VisibilityType visibility) {
135         this._visibility = visibility;
136     }
137 
138     /**
139      * Method unmarshalContentMemberType.
140      * 
141      * @param reader
142      * @throws org.exolab.castor.xml.MarshalException if object is
143      * null or if any SAXException is thrown during marshaling
144      * @throws org.exolab.castor.xml.ValidationException if this
145      * object is an invalid instance according to the schema
146      * @return the unmarshaled
147      * org.exolab.castor.builder.binding.xml.ContentMemberType
148      */
149     public static org.exolab.castor.builder.binding.xml.ContentMemberType unmarshalContentMemberType(
150             final java.io.Reader reader)
151     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
152         return (org.exolab.castor.builder.binding.xml.ContentMemberType) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.builder.binding.xml.ContentMemberType.class, reader);
153     }
154 
155     /**
156      * 
157      * 
158      * @throws org.exolab.castor.xml.ValidationException if this
159      * object is an invalid instance according to the schema
160      */
161     public void validate(
162     )
163     throws org.exolab.castor.xml.ValidationException {
164         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
165         validator.validate(this);
166     }
167 
168 }