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

Tue, 06 Mar 2012 16:09:35 -0800

author
ohair
date
Tue, 06 Mar 2012 16:09:35 -0800
changeset 286
f50545b5e2f1
child 397
b99d7e355d4b
permissions
-rw-r--r--

7150322: Stop using drop source bundles in jaxws
Reviewed-by: darcy, ohrstrom

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) {
ohair@286 121 case 2:
ohair@286 122 {
ohair@286 123 if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
ohair@286 124 NGCCHandler h = new annotation(this, super._source, $runtime, 581, null,AnnotationContext.SCHEMA);
ohair@286 125 spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
ohair@286 126 }
ohair@286 127 else {
ohair@286 128 if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) {
ohair@286 129 NGCCHandler h = new simpleType(this, super._source, $runtime, 582);
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("complexType"))) {
ohair@286 134 NGCCHandler h = new complexType(this, super._source, $runtime, 583);
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("group"))) {
ohair@286 139 NGCCHandler h = new group(this, super._source, $runtime, 584);
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("attributeGroup"))) {
ohair@286 144 NGCCHandler h = new attributeGroupDecl(this, super._source, $runtime, 585);
ohair@286 145 spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
ohair@286 146 }
ohair@286 147 else {
ohair@286 148 $_ngcc_current_state = 1;
ohair@286 149 $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
ohair@286 150 }
ohair@286 151 }
ohair@286 152 }
ohair@286 153 }
ohair@286 154 }
ohair@286 155 }
ohair@286 156 break;
ohair@286 157 case 15:
ohair@286 158 {
ohair@286 159 if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("redefine"))) {
ohair@286 160 $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
ohair@286 161 $_ngcc_current_state = 14;
ohair@286 162 }
ohair@286 163 else {
ohair@286 164 unexpectedEnterElement($__qname);
ohair@286 165 }
ohair@286 166 }
ohair@286 167 break;
ohair@286 168 case 0:
ohair@286 169 {
ohair@286 170 revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
ohair@286 171 }
ohair@286 172 break;
ohair@286 173 case 14:
ohair@286 174 {
ohair@286 175 if(($ai = $runtime.getAttributeIndex("","schemaLocation"))>=0) {
ohair@286 176 $runtime.consumeAttribute($ai);
ohair@286 177 $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
ohair@286 178 }
ohair@286 179 else {
ohair@286 180 unexpectedEnterElement($__qname);
ohair@286 181 }
ohair@286 182 }
ohair@286 183 break;
ohair@286 184 case 1:
ohair@286 185 {
ohair@286 186 if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
ohair@286 187 NGCCHandler h = new annotation(this, super._source, $runtime, 576, null,AnnotationContext.SCHEMA);
ohair@286 188 spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
ohair@286 189 }
ohair@286 190 else {
ohair@286 191 if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("simpleType"))) {
ohair@286 192 NGCCHandler h = new simpleType(this, super._source, $runtime, 577);
ohair@286 193 spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
ohair@286 194 }
ohair@286 195 else {
ohair@286 196 if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("complexType"))) {
ohair@286 197 NGCCHandler h = new complexType(this, super._source, $runtime, 578);
ohair@286 198 spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
ohair@286 199 }
ohair@286 200 else {
ohair@286 201 if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group"))) {
ohair@286 202 NGCCHandler h = new group(this, super._source, $runtime, 579);
ohair@286 203 spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
ohair@286 204 }
ohair@286 205 else {
ohair@286 206 if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup"))) {
ohair@286 207 NGCCHandler h = new attributeGroupDecl(this, super._source, $runtime, 580);
ohair@286 208 spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
ohair@286 209 }
ohair@286 210 else {
ohair@286 211 unexpectedEnterElement($__qname);
ohair@286 212 }
ohair@286 213 }
ohair@286 214 }
ohair@286 215 }
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 2:
ohair@286 234 {
ohair@286 235 $_ngcc_current_state = 1;
ohair@286 236 $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
ohair@286 237 }
ohair@286 238 break;
ohair@286 239 case 0:
ohair@286 240 {
ohair@286 241 revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname);
ohair@286 242 }
ohair@286 243 break;
ohair@286 244 case 14:
ohair@286 245 {
ohair@286 246 if(($ai = $runtime.getAttributeIndex("","schemaLocation"))>=0) {
ohair@286 247 $runtime.consumeAttribute($ai);
ohair@286 248 $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
ohair@286 249 }
ohair@286 250 else {
ohair@286 251 unexpectedLeaveElement($__qname);
ohair@286 252 }
ohair@286 253 }
ohair@286 254 break;
ohair@286 255 case 1:
ohair@286 256 {
ohair@286 257 if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("redefine"))) {
ohair@286 258 $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
ohair@286 259 $_ngcc_current_state = 0;
ohair@286 260 }
ohair@286 261 else {
ohair@286 262 unexpectedLeaveElement($__qname);
ohair@286 263 }
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 2:
ohair@286 281 {
ohair@286 282 $_ngcc_current_state = 1;
ohair@286 283 $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
ohair@286 284 }
ohair@286 285 break;
ohair@286 286 case 0:
ohair@286 287 {
ohair@286 288 revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname);
ohair@286 289 }
ohair@286 290 break;
ohair@286 291 case 14:
ohair@286 292 {
ohair@286 293 if(($__uri.equals("") && $__local.equals("schemaLocation"))) {
ohair@286 294 $_ngcc_current_state = 13;
ohair@286 295 }
ohair@286 296 else {
ohair@286 297 unexpectedEnterAttribute($__qname);
ohair@286 298 }
ohair@286 299 }
ohair@286 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) {
ohair@286 315 case 2:
ohair@286 316 {
ohair@286 317 $_ngcc_current_state = 1;
ohair@286 318 $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
ohair@286 319 }
ohair@286 320 break;
ohair@286 321 case 12:
ohair@286 322 {
ohair@286 323 if(($__uri.equals("") && $__local.equals("schemaLocation"))) {
ohair@286 324 $_ngcc_current_state = 2;
ohair@286 325 }
ohair@286 326 else {
ohair@286 327 unexpectedLeaveAttribute($__qname);
ohair@286 328 }
ohair@286 329 }
ohair@286 330 break;
ohair@286 331 case 0:
ohair@286 332 {
ohair@286 333 revertToParentFromLeaveAttribute(this, 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) {
ohair@286 347 case 2:
ohair@286 348 {
ohair@286 349 $_ngcc_current_state = 1;
ohair@286 350 $runtime.sendText(super._cookie, $value);
ohair@286 351 }
ohair@286 352 break;
ohair@286 353 case 13:
ohair@286 354 {
ohair@286 355 schemaLocation = $value;
ohair@286 356 $_ngcc_current_state = 12;
ohair@286 357 action4();
ohair@286 358 }
ohair@286 359 break;
ohair@286 360 case 0:
ohair@286 361 {
ohair@286 362 revertToParentFromText(this, super._cookie, $value);
ohair@286 363 }
ohair@286 364 break;
ohair@286 365 case 14:
ohair@286 366 {
ohair@286 367 if(($ai = $runtime.getAttributeIndex("","schemaLocation"))>=0) {
ohair@286 368 $runtime.consumeAttribute($ai);
ohair@286 369 $runtime.sendText(super._cookie, $value);
ohair@286 370 }
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__) {
ohair@286 378 case 581:
ohair@286 379 {
ohair@286 380 $_ngcc_current_state = 1;
ohair@286 381 }
ohair@286 382 break;
ohair@286 383 case 582:
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;
ohair@286 390 case 583:
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;
ohair@286 397 case 584:
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;
ohair@286 404 case 585:
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;
ohair@286 411 case 576:
ohair@286 412 {
ohair@286 413 $_ngcc_current_state = 1;
ohair@286 414 }
ohair@286 415 break;
ohair@286 416 case 577:
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;
ohair@286 423 case 578:
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;
ohair@286 430 case 579:
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;
ohair@286 437 case 580:
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