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: NamingType.java 6766 2007-01-18 21:12:08Z 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 NamingType.
019: *
020: * @version $Revision: 6766 $ $Date$
021: */
022: public class NamingType implements java.io.Serializable {
023:
024: //--------------------------/
025: //- Class/Member Variables -/
026: //--------------------------/
027:
028: /**
029: * Field _prefix.
030: */
031: private java.lang.String _prefix;
032:
033: /**
034: * Field _suffix.
035: */
036: private java.lang.String _suffix;
037:
038: //----------------/
039: //- Constructors -/
040: //----------------/
041:
042: public NamingType() {
043: super ();
044: }
045:
046: //-----------/
047: //- Methods -/
048: //-----------/
049:
050: /**
051: * Returns the value of field 'prefix'.
052: *
053: * @return the value of field 'Prefix'.
054: */
055: public java.lang.String getPrefix() {
056: return this ._prefix;
057: }
058:
059: /**
060: * Returns the value of field 'suffix'.
061: *
062: * @return the value of field 'Suffix'.
063: */
064: public java.lang.String getSuffix() {
065: return this ._suffix;
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 'prefix'.
117: *
118: * @param prefix the value of field 'prefix'.
119: */
120: public void setPrefix(final java.lang.String prefix) {
121: this ._prefix = prefix;
122: }
123:
124: /**
125: * Sets the value of field 'suffix'.
126: *
127: * @param suffix the value of field 'suffix'.
128: */
129: public void setSuffix(final java.lang.String suffix) {
130: this ._suffix = suffix;
131: }
132:
133: /**
134: * Method unmarshalNamingType.
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.NamingType
143: */
144: public static org.exolab.castor.builder.binding.xml.NamingType unmarshalNamingType(
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.NamingType) Unmarshaller
149: .unmarshal(
150: org.exolab.castor.builder.binding.xml.NamingType.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: }
|