001: /*
002: * This class was automatically generated with
003: * <a href="http://www.castor.org">Castor 1.0.2</a>, using an XML
004: * Schema.
005: * $Id: Param.java 6104 2006-08-23 06:32:44Z wguttmn $
006: */
007:
008: package org.exolab.castor.mapping.xml;
009:
010: import org.exolab.castor.xml.Marshaller;
011: import org.exolab.castor.xml.Unmarshaller;
012:
013: /**
014: * Class Param.
015: *
016: * @version $Revision: 6104 $ $Date: 2006-01-07 15:48:31 -0700 (Sat, 07 Jan 2006) $
017: */
018: public class Param implements java.io.Serializable {
019:
020: //--------------------------/
021: //- Class/Member Variables -/
022: //--------------------------/
023:
024: /**
025: * Field _name
026: */
027: private java.lang.String _name;
028:
029: /**
030: * Field _value
031: */
032: private java.lang.String _value;
033:
034: //----------------/
035: //- Constructors -/
036: //----------------/
037:
038: public Param() {
039: super ();
040: } //-- org.exolab.castor.mapping.xml.Param()
041:
042: //-----------/
043: //- Methods -/
044: //-----------/
045:
046: /**
047: * Returns the value of field 'name'.
048: *
049: * @return String
050: * @return the value of field 'name'.
051: */
052: public java.lang.String getName() {
053: return this ._name;
054: } //-- java.lang.String getName()
055:
056: /**
057: * Returns the value of field 'value'.
058: *
059: * @return String
060: * @return the value of field 'value'.
061: */
062: public java.lang.String getValue() {
063: return this ._value;
064: } //-- java.lang.String getValue()
065:
066: /**
067: * Method isValid
068: *
069: *
070: *
071: * @return boolean
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: } //-- boolean isValid()
081:
082: /**
083: * Method marshal
084: *
085: *
086: *
087: * @param out
088: */
089: public void marshal(java.io.Writer out)
090: throws org.exolab.castor.xml.MarshalException,
091: org.exolab.castor.xml.ValidationException {
092:
093: Marshaller.marshal(this , out);
094: } //-- void marshal(java.io.Writer)
095:
096: /**
097: * Method marshal
098: *
099: *
100: *
101: * @param handler
102: */
103: public void marshal(org.xml.sax.ContentHandler handler)
104: throws java.io.IOException,
105: org.exolab.castor.xml.MarshalException,
106: org.exolab.castor.xml.ValidationException {
107:
108: Marshaller.marshal(this , handler);
109: } //-- void marshal(org.xml.sax.ContentHandler)
110:
111: /**
112: * Sets the value of field 'name'.
113: *
114: * @param name the value of field 'name'.
115: */
116: public void setName(java.lang.String name) {
117: this ._name = name;
118: } //-- void setName(java.lang.String)
119:
120: /**
121: * Sets the value of field 'value'.
122: *
123: * @param value the value of field 'value'.
124: */
125: public void setValue(java.lang.String value) {
126: this ._value = value;
127: } //-- void setValue(java.lang.String)
128:
129: /**
130: * Method unmarshal
131: *
132: *
133: *
134: * @param reader
135: * @return Param
136: */
137: public static org.exolab.castor.mapping.xml.Param unmarshal(
138: java.io.Reader reader)
139: throws org.exolab.castor.xml.MarshalException,
140: org.exolab.castor.xml.ValidationException {
141: return (org.exolab.castor.mapping.xml.Param) Unmarshaller
142: .unmarshal(org.exolab.castor.mapping.xml.Param.class,
143: reader);
144: } //-- org.exolab.castor.mapping.xml.Param unmarshal(java.io.Reader)
145:
146: /**
147: * Method validate
148: *
149: */
150: public void validate()
151: throws org.exolab.castor.xml.ValidationException {
152: org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
153: validator.validate(this );
154: } //-- void validate()
155:
156: }
|