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