Tue, 06 Mar 2012 16:09:35 -0800
7150322: Stop using drop source bundles in jaxws
Reviewed-by: darcy, ohrstrom
1 /*
2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
26 /* this file is generated by RelaxNGCC */
27 package com.sun.xml.internal.xsom.impl.parser.state;
28 import org.xml.sax.SAXException;
29 import org.xml.sax.XMLReader;
30 import org.xml.sax.Attributes;
31 import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
33 import com.sun.xml.internal.xsom.*;
34 import com.sun.xml.internal.xsom.parser.*;
35 import com.sun.xml.internal.xsom.impl.*;
36 import com.sun.xml.internal.xsom.impl.parser.*;
37 import org.xml.sax.Locator;
38 import org.xml.sax.ContentHandler;
39 import org.xml.sax.helpers.*;
40 import java.util.*;
41 import java.math.BigInteger;
45 class notation extends NGCCHandler {
46 private String name;
47 private String pub;
48 private ForeignAttributesImpl fa;
49 private String sys;
50 private AnnotationImpl ann;
51 protected final NGCCRuntimeEx $runtime;
52 private int $_ngcc_current_state;
53 protected String $uri;
54 protected String $localName;
55 protected String $qname;
57 public final NGCCRuntime getRuntime() {
58 return($runtime);
59 }
61 public notation(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie) {
62 super(source, parent, cookie);
63 $runtime = runtime;
64 $_ngcc_current_state = 16;
65 }
67 public notation(NGCCRuntimeEx runtime) {
68 this(null, runtime, runtime, -1);
69 }
71 private void action0()throws SAXException {
72 loc = $runtime.copyLocator();
73 }
75 public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
76 int $ai;
77 $uri = $__uri;
78 $localName = $__local;
79 $qname = $__qname;
80 switch($_ngcc_current_state) {
81 case 0:
82 {
83 revertToParentFromEnterElement(makeResult(), super._cookie, $__uri, $__local, $__qname, $attrs);
84 }
85 break;
86 case 15:
87 {
88 if((($ai = $runtime.getAttributeIndex("","name"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) {
89 NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 554, null);
90 spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
91 }
92 else {
93 unexpectedEnterElement($__qname);
94 }
95 }
96 break;
97 case 2:
98 {
99 if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
100 NGCCHandler h = new annotation(this, super._source, $runtime, 539, null,AnnotationContext.NOTATION);
101 spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
102 }
103 else {
104 $_ngcc_current_state = 1;
105 $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
106 }
107 }
108 break;
109 case 4:
110 {
111 if(($ai = $runtime.getAttributeIndex("","system"))>=0) {
112 $runtime.consumeAttribute($ai);
113 $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
114 }
115 else {
116 $_ngcc_current_state = 2;
117 $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
118 }
119 }
120 break;
121 case 14:
122 {
123 if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
124 $runtime.consumeAttribute($ai);
125 $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
126 }
127 else {
128 unexpectedEnterElement($__qname);
129 }
130 }
131 break;
132 case 8:
133 {
134 if(($ai = $runtime.getAttributeIndex("","public"))>=0) {
135 $runtime.consumeAttribute($ai);
136 $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
137 }
138 else {
139 $_ngcc_current_state = 4;
140 $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
141 }
142 }
143 break;
144 case 16:
145 {
146 if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("notation"))) {
147 $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
148 action0();
149 $_ngcc_current_state = 15;
150 }
151 else {
152 unexpectedEnterElement($__qname);
153 }
154 }
155 break;
156 default:
157 {
158 unexpectedEnterElement($__qname);
159 }
160 break;
161 }
162 }
164 public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
165 int $ai;
166 $uri = $__uri;
167 $localName = $__local;
168 $qname = $__qname;
169 switch($_ngcc_current_state) {
170 case 0:
171 {
172 revertToParentFromLeaveElement(makeResult(), super._cookie, $__uri, $__local, $__qname);
173 }
174 break;
175 case 1:
176 {
177 if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("notation"))) {
178 $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
179 $_ngcc_current_state = 0;
180 }
181 else {
182 unexpectedLeaveElement($__qname);
183 }
184 }
185 break;
186 case 15:
187 {
188 if((($ai = $runtime.getAttributeIndex("","name"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("notation")))) {
189 NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 554, null);
190 spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
191 }
192 else {
193 unexpectedLeaveElement($__qname);
194 }
195 }
196 break;
197 case 2:
198 {
199 $_ngcc_current_state = 1;
200 $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
201 }
202 break;
203 case 4:
204 {
205 if(($ai = $runtime.getAttributeIndex("","system"))>=0) {
206 $runtime.consumeAttribute($ai);
207 $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
208 }
209 else {
210 $_ngcc_current_state = 2;
211 $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
212 }
213 }
214 break;
215 case 14:
216 {
217 if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
218 $runtime.consumeAttribute($ai);
219 $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
220 }
221 else {
222 unexpectedLeaveElement($__qname);
223 }
224 }
225 break;
226 case 8:
227 {
228 if(($ai = $runtime.getAttributeIndex("","public"))>=0) {
229 $runtime.consumeAttribute($ai);
230 $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
231 }
232 else {
233 $_ngcc_current_state = 4;
234 $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
235 }
236 }
237 break;
238 default:
239 {
240 unexpectedLeaveElement($__qname);
241 }
242 break;
243 }
244 }
246 public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
247 int $ai;
248 $uri = $__uri;
249 $localName = $__local;
250 $qname = $__qname;
251 switch($_ngcc_current_state) {
252 case 0:
253 {
254 revertToParentFromEnterAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
255 }
256 break;
257 case 15:
258 {
259 if(($__uri.equals("") && $__local.equals("name"))) {
260 NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 554, null);
261 spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
262 }
263 else {
264 unexpectedEnterAttribute($__qname);
265 }
266 }
267 break;
268 case 2:
269 {
270 $_ngcc_current_state = 1;
271 $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
272 }
273 break;
274 case 4:
275 {
276 if(($__uri.equals("") && $__local.equals("system"))) {
277 $_ngcc_current_state = 6;
278 }
279 else {
280 $_ngcc_current_state = 2;
281 $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
282 }
283 }
284 break;
285 case 14:
286 {
287 if(($__uri.equals("") && $__local.equals("name"))) {
288 $_ngcc_current_state = 13;
289 }
290 else {
291 unexpectedEnterAttribute($__qname);
292 }
293 }
294 break;
295 case 8:
296 {
297 if(($__uri.equals("") && $__local.equals("public"))) {
298 $_ngcc_current_state = 10;
299 }
300 else {
301 $_ngcc_current_state = 4;
302 $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
303 }
304 }
305 break;
306 default:
307 {
308 unexpectedEnterAttribute($__qname);
309 }
310 break;
311 }
312 }
314 public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
315 int $ai;
316 $uri = $__uri;
317 $localName = $__local;
318 $qname = $__qname;
319 switch($_ngcc_current_state) {
320 case 0:
321 {
322 revertToParentFromLeaveAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
323 }
324 break;
325 case 2:
326 {
327 $_ngcc_current_state = 1;
328 $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
329 }
330 break;
331 case 4:
332 {
333 $_ngcc_current_state = 2;
334 $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
335 }
336 break;
337 case 5:
338 {
339 if(($__uri.equals("") && $__local.equals("system"))) {
340 $_ngcc_current_state = 2;
341 }
342 else {
343 unexpectedLeaveAttribute($__qname);
344 }
345 }
346 break;
347 case 8:
348 {
349 $_ngcc_current_state = 4;
350 $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
351 }
352 break;
353 case 9:
354 {
355 if(($__uri.equals("") && $__local.equals("public"))) {
356 $_ngcc_current_state = 4;
357 }
358 else {
359 unexpectedLeaveAttribute($__qname);
360 }
361 }
362 break;
363 case 12:
364 {
365 if(($__uri.equals("") && $__local.equals("name"))) {
366 $_ngcc_current_state = 8;
367 }
368 else {
369 unexpectedLeaveAttribute($__qname);
370 }
371 }
372 break;
373 default:
374 {
375 unexpectedLeaveAttribute($__qname);
376 }
377 break;
378 }
379 }
381 public void text(String $value) throws SAXException {
382 int $ai;
383 switch($_ngcc_current_state) {
384 case 0:
385 {
386 revertToParentFromText(makeResult(), super._cookie, $value);
387 }
388 break;
389 case 10:
390 {
391 pub = $value;
392 $_ngcc_current_state = 9;
393 }
394 break;
395 case 15:
396 {
397 if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
398 NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 554, null);
399 spawnChildFromText(h, $value);
400 }
401 }
402 break;
403 case 2:
404 {
405 $_ngcc_current_state = 1;
406 $runtime.sendText(super._cookie, $value);
407 }
408 break;
409 case 13:
410 {
411 name = $value;
412 $_ngcc_current_state = 12;
413 }
414 break;
415 case 4:
416 {
417 if(($ai = $runtime.getAttributeIndex("","system"))>=0) {
418 $runtime.consumeAttribute($ai);
419 $runtime.sendText(super._cookie, $value);
420 }
421 else {
422 $_ngcc_current_state = 2;
423 $runtime.sendText(super._cookie, $value);
424 }
425 }
426 break;
427 case 6:
428 {
429 sys = $value;
430 $_ngcc_current_state = 5;
431 }
432 break;
433 case 14:
434 {
435 if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
436 $runtime.consumeAttribute($ai);
437 $runtime.sendText(super._cookie, $value);
438 }
439 }
440 break;
441 case 8:
442 {
443 if(($ai = $runtime.getAttributeIndex("","public"))>=0) {
444 $runtime.consumeAttribute($ai);
445 $runtime.sendText(super._cookie, $value);
446 }
447 else {
448 $_ngcc_current_state = 4;
449 $runtime.sendText(super._cookie, $value);
450 }
451 }
452 break;
453 }
454 }
456 public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
457 switch($__cookie__) {
458 case 554:
459 {
460 fa = ((ForeignAttributesImpl)$__result__);
461 $_ngcc_current_state = 14;
462 }
463 break;
464 case 539:
465 {
466 ann = ((AnnotationImpl)$__result__);
467 $_ngcc_current_state = 1;
468 }
469 break;
470 }
471 }
473 public boolean accepted() {
474 return(($_ngcc_current_state == 0));
475 }
478 private Locator loc;
479 private XSNotation makeResult() {
480 return new NotationImpl( $runtime.document,ann,loc,fa,name,pub,sys);
481 }
483 }