001: /*
002: * This class was automatically generated with
003: * <a href="http://www.castor.org">Castor 1.1-M2</a>, using an XML
004: * Schema.
005: * $Id: ComponentBindingTypeChoice.java 6918 2007-04-01 17:46:35Z wguttmn $
006: */
007:
008: package org.exolab.castor.builder.binding.xml;
009:
010: //---------------------------------/
011: //- Imported classes and packages -/
012: //---------------------------------/
013:
014: import org.exolab.castor.xml.Marshaller;
015: import org.exolab.castor.xml.Unmarshaller;
016:
017: /**
018: * Class ComponentBindingTypeChoice.
019: *
020: * @version $Revision: 6918 $ $Date$
021: */
022: public class ComponentBindingTypeChoice implements java.io.Serializable {
023:
024: //--------------------------/
025: //- Class/Member Variables -/
026: //--------------------------/
027:
028: /**
029: * Field _javaClass.
030: */
031: private org.exolab.castor.builder.binding.xml.ClassType _javaClass;
032:
033: /**
034: * Field _interface.
035: */
036: private org.exolab.castor.builder.binding.xml.Interface _interface;
037:
038: /**
039: * Field _member.
040: */
041: private org.exolab.castor.builder.binding.xml.FieldType _member;
042:
043: /**
044: * Field _enumDef.
045: */
046: private org.exolab.castor.builder.binding.xml.EnumBindingType _enumDef;
047:
048: /**
049: * Field _contentMember.
050: */
051: private org.exolab.castor.builder.binding.xml.ContentMemberType _contentMember;
052:
053: //----------------/
054: //- Constructors -/
055: //----------------/
056:
057: public ComponentBindingTypeChoice() {
058: super ();
059: }
060:
061: //-----------/
062: //- Methods -/
063: //-----------/
064:
065: /**
066: * Returns the value of field 'contentMember'.
067: *
068: * @return the value of field 'ContentMember'.
069: */
070: public org.exolab.castor.builder.binding.xml.ContentMemberType getContentMember() {
071: return this ._contentMember;
072: }
073:
074: /**
075: * Returns the value of field 'enumDef'.
076: *
077: * @return the value of field 'EnumDef'.
078: */
079: public org.exolab.castor.builder.binding.xml.EnumBindingType getEnumDef() {
080: return this ._enumDef;
081: }
082:
083: /**
084: * Returns the value of field 'interface'.
085: *
086: * @return the value of field 'Interface'.
087: */
088: public org.exolab.castor.builder.binding.xml.Interface getInterface() {
089: return this ._interface;
090: }
091:
092: /**
093: * Returns the value of field 'javaClass'.
094: *
095: * @return the value of field 'JavaClass'.
096: */
097: public org.exolab.castor.builder.binding.xml.ClassType getJavaClass() {
098: return this ._javaClass;
099: }
100:
101: /**
102: * Returns the value of field 'member'.
103: *
104: * @return the value of field 'Member'.
105: */
106: public org.exolab.castor.builder.binding.xml.FieldType getMember() {
107: return this ._member;
108: }
109:
110: /**
111: * Method isValid.
112: *
113: * @return true if this object is valid according to the schema
114: */
115: public boolean isValid() {
116: try {
117: validate();
118: } catch (org.exolab.castor.xml.ValidationException vex) {
119: return false;
120: }
121: return true;
122: }
123:
124: /**
125: *
126: *
127: * @param out
128: * @throws org.exolab.castor.xml.MarshalException if object is
129: * null or if any SAXException is thrown during marshaling
130: * @throws org.exolab.castor.xml.ValidationException if this
131: * object is an invalid instance according to the schema
132: */
133: public void marshal(final java.io.Writer out)
134: throws org.exolab.castor.xml.MarshalException,
135: org.exolab.castor.xml.ValidationException {
136: Marshaller.marshal(this , out);
137: }
138:
139: /**
140: *
141: *
142: * @param handler
143: * @throws java.io.IOException if an IOException occurs during
144: * marshaling
145: * @throws org.exolab.castor.xml.ValidationException if this
146: * object is an invalid instance according to the schema
147: * @throws org.exolab.castor.xml.MarshalException if object is
148: * null or if any SAXException is thrown during marshaling
149: */
150: public void marshal(final org.xml.sax.ContentHandler handler)
151: throws java.io.IOException,
152: org.exolab.castor.xml.MarshalException,
153: org.exolab.castor.xml.ValidationException {
154: Marshaller.marshal(this , handler);
155: }
156:
157: /**
158: * Sets the value of field 'contentMember'.
159: *
160: * @param contentMember the value of field 'contentMember'.
161: */
162: public void setContentMember(
163: final org.exolab.castor.builder.binding.xml.ContentMemberType contentMember) {
164: this ._contentMember = contentMember;
165: }
166:
167: /**
168: * Sets the value of field 'enumDef'.
169: *
170: * @param enumDef the value of field 'enumDef'.
171: */
172: public void setEnumDef(
173: final org.exolab.castor.builder.binding.xml.EnumBindingType enumDef) {
174: this ._enumDef = enumDef;
175: }
176:
177: /**
178: * Sets the value of field 'interface'.
179: *
180: * @param _interface
181: * @param interface the value of field 'interface'.
182: */
183: public void setInterface(
184: final org.exolab.castor.builder.binding.xml.Interface _interface) {
185: this ._interface = _interface;
186: }
187:
188: /**
189: * Sets the value of field 'javaClass'.
190: *
191: * @param javaClass the value of field 'javaClass'.
192: */
193: public void setJavaClass(
194: final org.exolab.castor.builder.binding.xml.ClassType javaClass) {
195: this ._javaClass = javaClass;
196: }
197:
198: /**
199: * Sets the value of field 'member'.
200: *
201: * @param member the value of field 'member'.
202: */
203: public void setMember(
204: final org.exolab.castor.builder.binding.xml.FieldType member) {
205: this ._member = member;
206: }
207:
208: /**
209: * Method unmarshalComponentBindingTypeChoice.
210: *
211: * @param reader
212: * @throws org.exolab.castor.xml.MarshalException if object is
213: * null or if any SAXException is thrown during marshaling
214: * @throws org.exolab.castor.xml.ValidationException if this
215: * object is an invalid instance according to the schema
216: * @return the unmarshaled
217: * org.exolab.castor.builder.binding.xml.ComponentBindingTypeChoice
218: */
219: public static org.exolab.castor.builder.binding.xml.ComponentBindingTypeChoice unmarshalComponentBindingTypeChoice(
220: final java.io.Reader reader)
221: throws org.exolab.castor.xml.MarshalException,
222: org.exolab.castor.xml.ValidationException {
223: return (org.exolab.castor.builder.binding.xml.ComponentBindingTypeChoice) Unmarshaller
224: .unmarshal(
225: org.exolab.castor.builder.binding.xml.ComponentBindingTypeChoice.class,
226: reader);
227: }
228:
229: /**
230: *
231: *
232: * @throws org.exolab.castor.xml.ValidationException if this
233: * object is an invalid instance according to the schema
234: */
235: public void validate()
236: throws org.exolab.castor.xml.ValidationException {
237: org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
238: validator.validate(this);
239: }
240:
241: }
|