1 /***
2 * JFoxSOAF, Service-Oriented Application Framework
3 *
4 * Copyright (C) www.huihoo.org
5 *
6 * Distributable under GNU LGPL For more information, please visit:
7 * http://www.huihoo.org/jfox/jfoxsoaf
8 */
9
10 package org.huihoo.jfox.soaf.schema.service;
11
12 import org.exolab.castor.xml.Marshaller;
13 import org.exolab.castor.xml.Unmarshaller;
14
15 /***
16 * <p>
17 * Class Parameter.
18 * </p>
19 *
20 * @author <a href="mailto:founder_chen@yahoo.com.cn">Peter Cheng </a>
21 * @version $Revision: 1.4 $ $Date: 2004/10/18 10:03:10 $
22 * @version Revision: 1.0
23 */
24
25 public class Parameter implements java.io.Serializable {
26
27 /***
28 * Field _name
29 */
30 private java.lang.String _name;
31
32 /***
33 * Field _value
34 */
35 private java.lang.String _value;
36
37 public Parameter() {
38 super();
39 }
40
41 /***
42 * Method getNameReturns the value of field 'name'.
43 *
44 * @return the value of field 'name'.
45 */
46 public java.lang.String getName() {
47 return this._name;
48 }
49
50 /***
51 * Method getValueReturns the value of field 'value'.
52 *
53 * @return the value of field 'value'.
54 */
55 public java.lang.String getValue() {
56 return this._value;
57 }
58
59 /***
60 * Method isValid
61 */
62 public boolean isValid() {
63 try {
64 validate();
65 } catch (org.exolab.castor.xml.ValidationException vex) {
66 return false;
67 }
68 return true;
69 }
70
71 /***
72 * Method marshal
73 *
74 * @param out
75 */
76 public void marshal(java.io.Writer out)
77 throws org.exolab.castor.xml.MarshalException,
78 org.exolab.castor.xml.ValidationException {
79
80 Marshaller.marshal(this, out);
81 }
82
83 /***
84 * Method marshal
85 *
86 * @param handler
87 */
88 public void marshal(org.xml.sax.ContentHandler handler)
89 throws java.io.IOException, org.exolab.castor.xml.MarshalException,
90 org.exolab.castor.xml.ValidationException {
91
92 Marshaller.marshal(this, handler);
93 }
94
95 /***
96 * Method setNameSets the value of field 'name'.
97 *
98 * @param name
99 * the value of field 'name'.
100 */
101 public void setName(java.lang.String name) {
102 this._name = name;
103 }
104
105 /***
106 * Method setValueSets the value of field 'value'.
107 *
108 * @param value
109 * the value of field 'value'.
110 */
111 public void setValue(java.lang.String value) {
112 this._value = value;
113 }
114
115 /***
116 * Method unmarshal
117 *
118 * @param reader
119 */
120 public static org.huihoo.jfox.soaf.schema.service.Parameter unmarshal(
121 java.io.Reader reader)
122 throws org.exolab.castor.xml.MarshalException,
123 org.exolab.castor.xml.ValidationException {
124 return (org.huihoo.jfox.soaf.schema.service.Parameter) Unmarshaller
125 .unmarshal(org.huihoo.jfox.soaf.schema.service.Parameter.class,
126 reader);
127 }
128
129 /***
130 * Method validate
131 */
132 public void validate() throws org.exolab.castor.xml.ValidationException {
133 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
134 validator.validate(this);
135 }
136
137 }