src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/importDecl.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 importDecl extends NGCCHandler {
ohair@286 46 private String ns;
ohair@286 47 private String schemaLocation;
ohair@286 48 protected final NGCCRuntimeEx $runtime;
ohair@286 49 private int $_ngcc_current_state;
ohair@286 50 protected String $uri;
ohair@286 51 protected String $localName;
ohair@286 52 protected String $qname;
ohair@286 53
ohair@286 54 public final NGCCRuntime getRuntime() {
ohair@286 55 return($runtime);
ohair@286 56 }
ohair@286 57
ohair@286 58 public importDecl(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie) {
ohair@286 59 super(source, parent, cookie);
ohair@286 60 $runtime = runtime;
ohair@286 61 $_ngcc_current_state = 12;
ohair@286 62 }
ohair@286 63
ohair@286 64 public importDecl(NGCCRuntimeEx runtime) {
ohair@286 65 this(null, runtime, runtime, -1);
ohair@286 66 }
ohair@286 67
ohair@286 68 private void action0()throws SAXException {
ohair@286 69
ohair@286 70 if(ns==null) ns="";
ohair@286 71 $runtime.importSchema( ns,schemaLocation );
ohair@286 72
ohair@286 73 }
ohair@286 74
ohair@286 75 public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
ohair@286 76 int $ai;
ohair@286 77 $uri = $__uri;
ohair@286 78 $localName = $__local;
ohair@286 79 $qname = $__qname;
ohair@286 80 switch($_ngcc_current_state) {
mkos@397 81 case 4:
ohair@286 82 {
mkos@397 83 if(($ai = $runtime.getAttributeIndex("","schemaLocation"))>=0) {
mkos@397 84 $runtime.consumeAttribute($ai);
mkos@397 85 $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
mkos@397 86 }
mkos@397 87 else {
mkos@397 88 $_ngcc_current_state = 2;
mkos@397 89 $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
mkos@397 90 }
ohair@286 91 }
ohair@286 92 break;
ohair@286 93 case 8:
ohair@286 94 {
ohair@286 95 if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
ohair@286 96 $runtime.consumeAttribute($ai);
ohair@286 97 $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
ohair@286 98 }
ohair@286 99 else {
ohair@286 100 $_ngcc_current_state = 4;
ohair@286 101 $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
ohair@286 102 }
ohair@286 103 }
ohair@286 104 break;
ohair@286 105 case 12:
ohair@286 106 {
ohair@286 107 if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("import"))) {
ohair@286 108 $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
ohair@286 109 $_ngcc_current_state = 8;
ohair@286 110 }
ohair@286 111 else {
ohair@286 112 unexpectedEnterElement($__qname);
ohair@286 113 }
ohair@286 114 }
ohair@286 115 break;
ohair@286 116 case 2:
ohair@286 117 {
ohair@286 118 if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
mkos@397 119 NGCCHandler h = new annotation(this, super._source, $runtime, 340, null,AnnotationContext.SCHEMA);
ohair@286 120 spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
ohair@286 121 }
ohair@286 122 else {
ohair@286 123 $_ngcc_current_state = 1;
ohair@286 124 $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
ohair@286 125 }
ohair@286 126 }
ohair@286 127 break;
mkos@397 128 case 0:
ohair@286 129 {
mkos@397 130 revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
ohair@286 131 }
ohair@286 132 break;
ohair@286 133 default:
ohair@286 134 {
ohair@286 135 unexpectedEnterElement($__qname);
ohair@286 136 }
ohair@286 137 break;
ohair@286 138 }
ohair@286 139 }
ohair@286 140
ohair@286 141 public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
ohair@286 142 int $ai;
ohair@286 143 $uri = $__uri;
ohair@286 144 $localName = $__local;
ohair@286 145 $qname = $__qname;
ohair@286 146 switch($_ngcc_current_state) {
mkos@397 147 case 4:
ohair@286 148 {
mkos@397 149 if(($ai = $runtime.getAttributeIndex("","schemaLocation"))>=0) {
mkos@397 150 $runtime.consumeAttribute($ai);
mkos@397 151 $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
mkos@397 152 }
mkos@397 153 else {
mkos@397 154 $_ngcc_current_state = 2;
mkos@397 155 $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
mkos@397 156 }
ohair@286 157 }
ohair@286 158 break;
ohair@286 159 case 8:
ohair@286 160 {
ohair@286 161 if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
ohair@286 162 $runtime.consumeAttribute($ai);
ohair@286 163 $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
ohair@286 164 }
ohair@286 165 else {
ohair@286 166 $_ngcc_current_state = 4;
ohair@286 167 $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
ohair@286 168 }
ohair@286 169 }
ohair@286 170 break;
mkos@397 171 case 2:
mkos@397 172 {
mkos@397 173 $_ngcc_current_state = 1;
mkos@397 174 $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
mkos@397 175 }
mkos@397 176 break;
ohair@286 177 case 1:
ohair@286 178 {
ohair@286 179 if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("import"))) {
ohair@286 180 $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
ohair@286 181 $_ngcc_current_state = 0;
ohair@286 182 action0();
ohair@286 183 }
ohair@286 184 else {
ohair@286 185 unexpectedLeaveElement($__qname);
ohair@286 186 }
ohair@286 187 }
ohair@286 188 break;
mkos@397 189 case 0:
ohair@286 190 {
mkos@397 191 revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname);
ohair@286 192 }
ohair@286 193 break;
ohair@286 194 default:
ohair@286 195 {
ohair@286 196 unexpectedLeaveElement($__qname);
ohair@286 197 }
ohair@286 198 break;
ohair@286 199 }
ohair@286 200 }
ohair@286 201
ohair@286 202 public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
ohair@286 203 int $ai;
ohair@286 204 $uri = $__uri;
ohair@286 205 $localName = $__local;
ohair@286 206 $qname = $__qname;
ohair@286 207 switch($_ngcc_current_state) {
mkos@397 208 case 4:
ohair@286 209 {
mkos@397 210 if(($__uri.equals("") && $__local.equals("schemaLocation"))) {
mkos@397 211 $_ngcc_current_state = 6;
mkos@397 212 }
mkos@397 213 else {
mkos@397 214 $_ngcc_current_state = 2;
mkos@397 215 $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
mkos@397 216 }
ohair@286 217 }
ohair@286 218 break;
ohair@286 219 case 8:
ohair@286 220 {
ohair@286 221 if(($__uri.equals("") && $__local.equals("namespace"))) {
ohair@286 222 $_ngcc_current_state = 10;
ohair@286 223 }
ohair@286 224 else {
ohair@286 225 $_ngcc_current_state = 4;
ohair@286 226 $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
ohair@286 227 }
ohair@286 228 }
ohair@286 229 break;
ohair@286 230 case 2:
ohair@286 231 {
ohair@286 232 $_ngcc_current_state = 1;
ohair@286 233 $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
ohair@286 234 }
ohair@286 235 break;
mkos@397 236 case 0:
ohair@286 237 {
mkos@397 238 revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname);
ohair@286 239 }
ohair@286 240 break;
ohair@286 241 default:
ohair@286 242 {
ohair@286 243 unexpectedEnterAttribute($__qname);
ohair@286 244 }
ohair@286 245 break;
ohair@286 246 }
ohair@286 247 }
ohair@286 248
ohair@286 249 public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
ohair@286 250 int $ai;
ohair@286 251 $uri = $__uri;
ohair@286 252 $localName = $__local;
ohair@286 253 $qname = $__qname;
ohair@286 254 switch($_ngcc_current_state) {
ohair@286 255 case 9:
ohair@286 256 {
ohair@286 257 if(($__uri.equals("") && $__local.equals("namespace"))) {
ohair@286 258 $_ngcc_current_state = 4;
ohair@286 259 }
ohair@286 260 else {
ohair@286 261 unexpectedLeaveAttribute($__qname);
ohair@286 262 }
ohair@286 263 }
ohair@286 264 break;
mkos@397 265 case 4:
ohair@286 266 {
mkos@397 267 $_ngcc_current_state = 2;
mkos@397 268 $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
ohair@286 269 }
ohair@286 270 break;
ohair@286 271 case 8:
ohair@286 272 {
ohair@286 273 $_ngcc_current_state = 4;
ohair@286 274 $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
ohair@286 275 }
ohair@286 276 break;
ohair@286 277 case 5:
ohair@286 278 {
ohair@286 279 if(($__uri.equals("") && $__local.equals("schemaLocation"))) {
ohair@286 280 $_ngcc_current_state = 2;
ohair@286 281 }
ohair@286 282 else {
ohair@286 283 unexpectedLeaveAttribute($__qname);
ohair@286 284 }
ohair@286 285 }
ohair@286 286 break;
mkos@397 287 case 2:
ohair@286 288 {
mkos@397 289 $_ngcc_current_state = 1;
ohair@286 290 $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
ohair@286 291 }
ohair@286 292 break;
mkos@397 293 case 0:
mkos@397 294 {
mkos@397 295 revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname);
mkos@397 296 }
mkos@397 297 break;
ohair@286 298 default:
ohair@286 299 {
ohair@286 300 unexpectedLeaveAttribute($__qname);
ohair@286 301 }
ohair@286 302 break;
ohair@286 303 }
ohair@286 304 }
ohair@286 305
ohair@286 306 public void text(String $value) throws SAXException {
ohair@286 307 int $ai;
ohair@286 308 switch($_ngcc_current_state) {
mkos@397 309 case 4:
ohair@286 310 {
mkos@397 311 if(($ai = $runtime.getAttributeIndex("","schemaLocation"))>=0) {
mkos@397 312 $runtime.consumeAttribute($ai);
mkos@397 313 $runtime.sendText(super._cookie, $value);
mkos@397 314 }
mkos@397 315 else {
mkos@397 316 $_ngcc_current_state = 2;
mkos@397 317 $runtime.sendText(super._cookie, $value);
mkos@397 318 }
ohair@286 319 }
ohair@286 320 break;
ohair@286 321 case 8:
ohair@286 322 {
ohair@286 323 if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
ohair@286 324 $runtime.consumeAttribute($ai);
ohair@286 325 $runtime.sendText(super._cookie, $value);
ohair@286 326 }
ohair@286 327 else {
ohair@286 328 $_ngcc_current_state = 4;
ohair@286 329 $runtime.sendText(super._cookie, $value);
ohair@286 330 }
ohair@286 331 }
ohair@286 332 break;
mkos@397 333 case 10:
ohair@286 334 {
mkos@397 335 ns = $value;
mkos@397 336 $_ngcc_current_state = 9;
ohair@286 337 }
ohair@286 338 break;
ohair@286 339 case 2:
ohair@286 340 {
ohair@286 341 $_ngcc_current_state = 1;
ohair@286 342 $runtime.sendText(super._cookie, $value);
ohair@286 343 }
ohair@286 344 break;
mkos@397 345 case 0:
ohair@286 346 {
mkos@397 347 revertToParentFromText(this, super._cookie, $value);
ohair@286 348 }
ohair@286 349 break;
mkos@397 350 case 6:
ohair@286 351 {
mkos@397 352 schemaLocation = $value;
mkos@397 353 $_ngcc_current_state = 5;
ohair@286 354 }
ohair@286 355 break;
ohair@286 356 }
ohair@286 357 }
ohair@286 358
ohair@286 359 public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
ohair@286 360 switch($__cookie__) {
mkos@397 361 case 340:
ohair@286 362 {
ohair@286 363 $_ngcc_current_state = 1;
ohair@286 364 }
ohair@286 365 break;
ohair@286 366 }
ohair@286 367 }
ohair@286 368
ohair@286 369 public boolean accepted() {
ohair@286 370 return(($_ngcc_current_state == 0));
ohair@286 371 }
ohair@286 372
ohair@286 373
ohair@286 374 }

mercurial