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$
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 EnumClassName.
019: *
020: * @version $Revision$ $Date$
021: */
022: public class EnumClassName implements java.io.Serializable {
023:
024: //--------------------------/
025: //- Class/Member Variables -/
026: //--------------------------/
027:
028: /**
029: * internal content storage
030: */
031: private java.lang.String _content = "";
032:
033: /**
034: * Field _package.
035: */
036: private java.lang.String _package;
037:
038: //----------------/
039: //- Constructors -/
040: //----------------/
041:
042: public EnumClassName() {
043: super ();
044: setContent("");
045: }
046:
047: //-----------/
048: //- Methods -/
049: //-----------/
050:
051: /**
052: * Returns the value of field 'content'. The field 'content'
053: * has the following description: internal content storage
054: *
055: * @return the value of field 'Content'.
056: */
057: public java.lang.String getContent() {
058: return this ._content;
059: }
060:
061: /**
062: * Returns the value of field 'package'.
063: *
064: * @return the value of field 'Package'.
065: */
066: public java.lang.String getPackage() {
067: return this ._package;
068: }
069:
070: /**
071: * Method isValid.
072: *
073: * @return true if this object is valid according to the schema
074: */
075: public boolean isValid() {
076: try {
077: validate();
078: } catch (org.exolab.castor.xml.ValidationException vex) {
079: return false;
080: }
081: return true;
082: }
083:
084: /**
085: *
086: *
087: * @param out
088: * @throws org.exolab.castor.xml.MarshalException if object is
089: * null or if any SAXException is thrown during marshaling
090: * @throws org.exolab.castor.xml.ValidationException if this
091: * object is an invalid instance according to the schema
092: */
093: public void marshal(final java.io.Writer out)
094: throws org.exolab.castor.xml.MarshalException,
095: org.exolab.castor.xml.ValidationException {
096: Marshaller.marshal(this , out);
097: }
098:
099: /**
100: *
101: *
102: * @param handler
103: * @throws java.io.IOException if an IOException occurs during
104: * marshaling
105: * @throws org.exolab.castor.xml.ValidationException if this
106: * object is an invalid instance according to the schema
107: * @throws org.exolab.castor.xml.MarshalException if object is
108: * null or if any SAXException is thrown during marshaling
109: */
110: public void marshal(final org.xml.sax.ContentHandler handler)
111: throws java.io.IOException,
112: org.exolab.castor.xml.MarshalException,
113: org.exolab.castor.xml.ValidationException {
114: Marshaller.marshal(this , handler);
115: }
116:
117: /**
118: * Sets the value of field 'content'. The field 'content' has
119: * the following description: internal content storage
120: *
121: * @param content the value of field 'content'.
122: */
123: public void setContent(final java.lang.String content) {
124: this ._content = content;
125: }
126:
127: /**
128: * Sets the value of field 'package'.
129: *
130: * @param _package
131: * @param package the value of field 'package'.
132: */
133: public void setPackage(final java.lang.String _package) {
134: this ._package = _package;
135: }
136:
137: /**
138: * Method unmarshalEnumClassName.
139: *
140: * @param reader
141: * @throws org.exolab.castor.xml.MarshalException if object is
142: * null or if any SAXException is thrown during marshaling
143: * @throws org.exolab.castor.xml.ValidationException if this
144: * object is an invalid instance according to the schema
145: * @return the unmarshaled
146: * org.exolab.castor.builder.binding.EnumClassName
147: */
148: public static org.exolab.castor.builder.binding.xml.EnumClassName unmarshalEnumClassName(
149: final java.io.Reader reader)
150: throws org.exolab.castor.xml.MarshalException,
151: org.exolab.castor.xml.ValidationException {
152: return (org.exolab.castor.builder.binding.xml.EnumClassName) Unmarshaller
153: .unmarshal(
154: org.exolab.castor.builder.binding.xml.EnumClassName.class,
155: reader);
156: }
157:
158: /**
159: *
160: *
161: * @throws org.exolab.castor.xml.ValidationException if this
162: * object is an invalid instance according to the schema
163: */
164: public void validate()
165: throws org.exolab.castor.xml.ValidationException {
166: org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
167: validator.validate(this);
168: }
169:
170: }
|