src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/redefine.java

Fri, 23 Aug 2013 09:57:21 +0100

author
mkos
date
Fri, 23 Aug 2013 09:57:21 +0100
changeset 397
b99d7e355d4b
parent 286
f50545b5e2f1
child 637
9c07ef4934dd
permissions
-rw-r--r--

8022885: Update JAX-WS RI integration to 2.2.9-b14140
8013016: Rebase 8009009 against the latest jdk8/jaxws
Reviewed-by: alanb, chegar

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

mercurial