1
2
3
4
5
6
7
8 package org.astrogrid.registry.beans.v10.cea;
9
10
11
12
13
14 import java.io.IOException;
15 import java.io.Reader;
16 import java.io.Serializable;
17 import java.io.Writer;
18 import org.astrogrid.applications.beans.v1.WebHttpApplicationSetup;
19 import org.exolab.castor.xml.MarshalException;
20 import org.exolab.castor.xml.Marshaller;
21 import org.exolab.castor.xml.Unmarshaller;
22 import org.exolab.castor.xml.ValidationException;
23 import org.xml.sax.ContentHandler;
24
25 /***
26 * The definition of a CEA Http application
27 *
28 * @version $Revision: 1.2 $ $Date: 2007/01/04 16:26:31 $
29 */
30 public class CeaHttpApplicationType extends org.astrogrid.registry.beans.v10.cea.CeaApplicationType
31 implements java.io.Serializable
32 {
33
34
35
36
37
38
39 /***
40 * Field _ceaHttpAdapterSetup
41 */
42 private org.astrogrid.applications.beans.v1.WebHttpApplicationSetup _ceaHttpAdapterSetup;
43
44
45
46
47
48
49 public CeaHttpApplicationType() {
50 super();
51 }
52
53
54
55
56
57
58 /***
59 * Note: hashCode() has not been overriden
60 *
61 * @param obj
62 */
63 public boolean equals(java.lang.Object obj)
64 {
65 if ( this == obj )
66 return true;
67
68 if (super.equals(obj)==false)
69 return false;
70
71 if (obj instanceof CeaHttpApplicationType) {
72
73 CeaHttpApplicationType temp = (CeaHttpApplicationType)obj;
74 if (this._ceaHttpAdapterSetup != null) {
75 if (temp._ceaHttpAdapterSetup == null) return false;
76 else if (!(this._ceaHttpAdapterSetup.equals(temp._ceaHttpAdapterSetup)))
77 return false;
78 }
79 else if (temp._ceaHttpAdapterSetup != null)
80 return false;
81 return true;
82 }
83 return false;
84 }
85
86 /***
87 * Returns the value of field 'ceaHttpAdapterSetup'.
88 *
89 * @return the value of field 'ceaHttpAdapterSetup'.
90 */
91 public org.astrogrid.applications.beans.v1.WebHttpApplicationSetup getCeaHttpAdapterSetup()
92 {
93 return this._ceaHttpAdapterSetup;
94 }
95
96 /***
97 * Method isValid
98 */
99 public boolean isValid()
100 {
101 try {
102 validate();
103 }
104 catch (org.exolab.castor.xml.ValidationException vex) {
105 return false;
106 }
107 return true;
108 }
109
110 /***
111 * Method marshal
112 *
113 * @param out
114 */
115 public void marshal(java.io.Writer out)
116 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
117 {
118
119 Marshaller.marshal(this, out);
120 }
121
122 /***
123 * Method marshal
124 *
125 * @param handler
126 */
127 public void marshal(org.xml.sax.ContentHandler handler)
128 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
129 {
130
131 Marshaller.marshal(this, handler);
132 }
133
134 /***
135 * Sets the value of field 'ceaHttpAdapterSetup'.
136 *
137 * @param ceaHttpAdapterSetup the value of field
138 * 'ceaHttpAdapterSetup'.
139 */
140 public void setCeaHttpAdapterSetup(org.astrogrid.applications.beans.v1.WebHttpApplicationSetup ceaHttpAdapterSetup)
141 {
142 this._ceaHttpAdapterSetup = ceaHttpAdapterSetup;
143 }
144
145 /***
146 * Method unmarshalCeaHttpApplicationType
147 *
148 * @param reader
149 */
150 public static org.astrogrid.registry.beans.v10.cea.CeaHttpApplicationType unmarshalCeaHttpApplicationType(java.io.Reader reader)
151 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
152 {
153 return (org.astrogrid.registry.beans.v10.cea.CeaHttpApplicationType) Unmarshaller.unmarshal(org.astrogrid.registry.beans.v10.cea.CeaHttpApplicationType.class, reader);
154 }
155
156 /***
157 * Method validate
158 */
159 public void validate()
160 throws org.exolab.castor.xml.ValidationException
161 {
162 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
163 validator.validate(this);
164 }
165
166 }