1 /* |
1 /* |
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
131 |
132 |
132 public void setDocumentation(Documentation d) { |
133 public void setDocumentation(Documentation d) { |
133 _documentation = d; |
134 _documentation = d; |
134 } |
135 } |
135 |
136 |
|
137 @Override |
136 public String getNameValue() { |
138 public String getNameValue() { |
137 return getName(); |
139 return getName(); |
138 } |
140 } |
139 |
141 |
|
142 @Override |
140 public String getNamespaceURI() { |
143 public String getNamespaceURI() { |
141 return parent.getNamespaceURI(); |
144 return (parent == null) ? null : parent.getNamespaceURI(); |
142 } |
145 } |
143 |
146 |
|
147 @Override |
144 public QName getWSDLElementName() { |
148 public QName getWSDLElementName() { |
145 return getElementName(); |
149 return getElementName(); |
146 } |
150 } |
147 |
151 |
|
152 @Override |
148 public void addExtension(TWSDLExtension e) { |
153 public void addExtension(TWSDLExtension e) { |
149 _helper.addExtension(e); |
154 _helper.addExtension(e); |
150 } |
155 } |
151 |
156 |
|
157 @Override |
152 public Iterable<TWSDLExtension> extensions() { |
158 public Iterable<TWSDLExtension> extensions() { |
153 return _helper.extensions(); |
159 return _helper.extensions(); |
154 } |
160 } |
155 |
161 |
|
162 @Override |
156 public TWSDLExtensible getParent() { |
163 public TWSDLExtensible getParent() { |
157 return parent; |
164 return parent; |
158 } |
165 } |
159 |
166 |
|
167 @Override |
160 public void withAllSubEntitiesDo(EntityAction action) { |
168 public void withAllSubEntitiesDo(EntityAction action) { |
161 if (_input != null) { |
169 if (_input != null) { |
162 action.perform(_input); |
170 action.perform(_input); |
163 } |
171 } |
164 if (_output != null) { |
172 if (_output != null) { |
184 _fault.accept(visitor); |
192 _fault.accept(visitor); |
185 } |
193 } |
186 visitor.postVisit(this); |
194 visitor.postVisit(this); |
187 } |
195 } |
188 |
196 |
|
197 @Override |
189 public void validateThis() { |
198 public void validateThis() { |
190 if (_name == null) { |
199 if (_name == null) { |
191 failValidation("validation.missingRequiredAttribute", "name"); |
200 failValidation("validation.missingRequiredAttribute", "name"); |
192 } |
201 } |
193 if (_style == null) { |
202 if (_style == null) { |
200 failValidation("validation.missingRequiredSubEntity", "input"); |
209 failValidation("validation.missingRequiredSubEntity", "input"); |
201 } |
210 } |
202 if (_output != null) { |
211 if (_output != null) { |
203 failValidation("validation.invalidSubEntity", "output"); |
212 failValidation("validation.invalidSubEntity", "output"); |
204 } |
213 } |
205 if (_faults != null && _faults.size() != 0) { |
214 if (_faults != null && !_faults.isEmpty()) { |
206 failValidation("validation.invalidSubEntity", "fault"); |
215 failValidation("validation.invalidSubEntity", "fault"); |
207 } |
216 } |
208 } |
217 } |
209 } |
218 } |
210 |
219 |