1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/notation.java Wed Apr 27 01:27:09 2016 +0800 1.3 @@ -0,0 +1,483 @@ 1.4 +/* 1.5 + * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 1.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.7 + * 1.8 + * This code is free software; you can redistribute it and/or modify it 1.9 + * under the terms of the GNU General Public License version 2 only, as 1.10 + * published by the Free Software Foundation. Oracle designates this 1.11 + * particular file as subject to the "Classpath" exception as provided 1.12 + * by Oracle in the LICENSE file that accompanied this code. 1.13 + * 1.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 1.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1.17 + * version 2 for more details (a copy is included in the LICENSE file that 1.18 + * accompanied this code). 1.19 + * 1.20 + * You should have received a copy of the GNU General Public License version 1.21 + * 2 along with this work; if not, write to the Free Software Foundation, 1.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1.23 + * 1.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 1.25 + * or visit www.oracle.com if you need additional information or have any 1.26 + * questions. 1.27 + */ 1.28 + 1.29 +/* this file is generated by RelaxNGCC */ 1.30 +package com.sun.xml.internal.xsom.impl.parser.state; 1.31 +import org.xml.sax.SAXException; 1.32 +import org.xml.sax.XMLReader; 1.33 +import org.xml.sax.Attributes; 1.34 +import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx; 1.35 + 1.36 + import com.sun.xml.internal.xsom.*; 1.37 + import com.sun.xml.internal.xsom.parser.*; 1.38 + import com.sun.xml.internal.xsom.impl.*; 1.39 + import com.sun.xml.internal.xsom.impl.parser.*; 1.40 + import org.xml.sax.Locator; 1.41 + import org.xml.sax.ContentHandler; 1.42 + import org.xml.sax.helpers.*; 1.43 + import java.util.*; 1.44 + import java.math.BigInteger; 1.45 + 1.46 + 1.47 + 1.48 +class notation extends NGCCHandler { 1.49 + private String name; 1.50 + private String pub; 1.51 + private ForeignAttributesImpl fa; 1.52 + private String sys; 1.53 + private AnnotationImpl ann; 1.54 + protected final NGCCRuntimeEx $runtime; 1.55 + private int $_ngcc_current_state; 1.56 + protected String $uri; 1.57 + protected String $localName; 1.58 + protected String $qname; 1.59 + 1.60 + public final NGCCRuntime getRuntime() { 1.61 + return($runtime); 1.62 + } 1.63 + 1.64 + public notation(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie) { 1.65 + super(source, parent, cookie); 1.66 + $runtime = runtime; 1.67 + $_ngcc_current_state = 16; 1.68 + } 1.69 + 1.70 + public notation(NGCCRuntimeEx runtime) { 1.71 + this(null, runtime, runtime, -1); 1.72 + } 1.73 + 1.74 + private void action0()throws SAXException { 1.75 + loc = $runtime.copyLocator(); 1.76 +} 1.77 + 1.78 + public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException { 1.79 + int $ai; 1.80 + $uri = $__uri; 1.81 + $localName = $__local; 1.82 + $qname = $__qname; 1.83 + switch($_ngcc_current_state) { 1.84 + case 2: 1.85 + { 1.86 + if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) { 1.87 + NGCCHandler h = new annotation(this, super._source, $runtime, 209, null,AnnotationContext.NOTATION); 1.88 + spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs); 1.89 + } 1.90 + else { 1.91 + $_ngcc_current_state = 1; 1.92 + $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs); 1.93 + } 1.94 + } 1.95 + break; 1.96 + case 16: 1.97 + { 1.98 + if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("notation"))) { 1.99 + $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs); 1.100 + action0(); 1.101 + $_ngcc_current_state = 15; 1.102 + } 1.103 + else { 1.104 + unexpectedEnterElement($__qname); 1.105 + } 1.106 + } 1.107 + break; 1.108 + case 14: 1.109 + { 1.110 + if(($ai = $runtime.getAttributeIndex("","name"))>=0) { 1.111 + $runtime.consumeAttribute($ai); 1.112 + $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs); 1.113 + } 1.114 + else { 1.115 + unexpectedEnterElement($__qname); 1.116 + } 1.117 + } 1.118 + break; 1.119 + case 15: 1.120 + { 1.121 + if((($ai = $runtime.getAttributeIndex("","name"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) { 1.122 + NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 224, null); 1.123 + spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs); 1.124 + } 1.125 + else { 1.126 + unexpectedEnterElement($__qname); 1.127 + } 1.128 + } 1.129 + break; 1.130 + case 4: 1.131 + { 1.132 + if(($ai = $runtime.getAttributeIndex("","system"))>=0) { 1.133 + $runtime.consumeAttribute($ai); 1.134 + $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs); 1.135 + } 1.136 + else { 1.137 + $_ngcc_current_state = 2; 1.138 + $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs); 1.139 + } 1.140 + } 1.141 + break; 1.142 + case 8: 1.143 + { 1.144 + if(($ai = $runtime.getAttributeIndex("","public"))>=0) { 1.145 + $runtime.consumeAttribute($ai); 1.146 + $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs); 1.147 + } 1.148 + else { 1.149 + $_ngcc_current_state = 4; 1.150 + $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs); 1.151 + } 1.152 + } 1.153 + break; 1.154 + case 0: 1.155 + { 1.156 + revertToParentFromEnterElement(makeResult(), super._cookie, $__uri, $__local, $__qname, $attrs); 1.157 + } 1.158 + break; 1.159 + default: 1.160 + { 1.161 + unexpectedEnterElement($__qname); 1.162 + } 1.163 + break; 1.164 + } 1.165 + } 1.166 + 1.167 + public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException { 1.168 + int $ai; 1.169 + $uri = $__uri; 1.170 + $localName = $__local; 1.171 + $qname = $__qname; 1.172 + switch($_ngcc_current_state) { 1.173 + case 2: 1.174 + { 1.175 + $_ngcc_current_state = 1; 1.176 + $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname); 1.177 + } 1.178 + break; 1.179 + case 14: 1.180 + { 1.181 + if(($ai = $runtime.getAttributeIndex("","name"))>=0) { 1.182 + $runtime.consumeAttribute($ai); 1.183 + $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname); 1.184 + } 1.185 + else { 1.186 + unexpectedLeaveElement($__qname); 1.187 + } 1.188 + } 1.189 + break; 1.190 + case 15: 1.191 + { 1.192 + if((($ai = $runtime.getAttributeIndex("","name"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("notation")))) { 1.193 + NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 224, null); 1.194 + spawnChildFromLeaveElement(h, $__uri, $__local, $__qname); 1.195 + } 1.196 + else { 1.197 + unexpectedLeaveElement($__qname); 1.198 + } 1.199 + } 1.200 + break; 1.201 + case 4: 1.202 + { 1.203 + if(($ai = $runtime.getAttributeIndex("","system"))>=0) { 1.204 + $runtime.consumeAttribute($ai); 1.205 + $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname); 1.206 + } 1.207 + else { 1.208 + $_ngcc_current_state = 2; 1.209 + $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname); 1.210 + } 1.211 + } 1.212 + break; 1.213 + case 1: 1.214 + { 1.215 + if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("notation"))) { 1.216 + $runtime.onLeaveElementConsumed($__uri, $__local, $__qname); 1.217 + $_ngcc_current_state = 0; 1.218 + } 1.219 + else { 1.220 + unexpectedLeaveElement($__qname); 1.221 + } 1.222 + } 1.223 + break; 1.224 + case 8: 1.225 + { 1.226 + if(($ai = $runtime.getAttributeIndex("","public"))>=0) { 1.227 + $runtime.consumeAttribute($ai); 1.228 + $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname); 1.229 + } 1.230 + else { 1.231 + $_ngcc_current_state = 4; 1.232 + $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname); 1.233 + } 1.234 + } 1.235 + break; 1.236 + case 0: 1.237 + { 1.238 + revertToParentFromLeaveElement(makeResult(), super._cookie, $__uri, $__local, $__qname); 1.239 + } 1.240 + break; 1.241 + default: 1.242 + { 1.243 + unexpectedLeaveElement($__qname); 1.244 + } 1.245 + break; 1.246 + } 1.247 + } 1.248 + 1.249 + public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException { 1.250 + int $ai; 1.251 + $uri = $__uri; 1.252 + $localName = $__local; 1.253 + $qname = $__qname; 1.254 + switch($_ngcc_current_state) { 1.255 + case 2: 1.256 + { 1.257 + $_ngcc_current_state = 1; 1.258 + $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname); 1.259 + } 1.260 + break; 1.261 + case 14: 1.262 + { 1.263 + if(($__uri.equals("") && $__local.equals("name"))) { 1.264 + $_ngcc_current_state = 13; 1.265 + } 1.266 + else { 1.267 + unexpectedEnterAttribute($__qname); 1.268 + } 1.269 + } 1.270 + break; 1.271 + case 15: 1.272 + { 1.273 + if(($__uri.equals("") && $__local.equals("name"))) { 1.274 + NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 224, null); 1.275 + spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname); 1.276 + } 1.277 + else { 1.278 + unexpectedEnterAttribute($__qname); 1.279 + } 1.280 + } 1.281 + break; 1.282 + case 4: 1.283 + { 1.284 + if(($__uri.equals("") && $__local.equals("system"))) { 1.285 + $_ngcc_current_state = 6; 1.286 + } 1.287 + else { 1.288 + $_ngcc_current_state = 2; 1.289 + $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname); 1.290 + } 1.291 + } 1.292 + break; 1.293 + case 8: 1.294 + { 1.295 + if(($__uri.equals("") && $__local.equals("public"))) { 1.296 + $_ngcc_current_state = 10; 1.297 + } 1.298 + else { 1.299 + $_ngcc_current_state = 4; 1.300 + $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname); 1.301 + } 1.302 + } 1.303 + break; 1.304 + case 0: 1.305 + { 1.306 + revertToParentFromEnterAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname); 1.307 + } 1.308 + break; 1.309 + default: 1.310 + { 1.311 + unexpectedEnterAttribute($__qname); 1.312 + } 1.313 + break; 1.314 + } 1.315 + } 1.316 + 1.317 + public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException { 1.318 + int $ai; 1.319 + $uri = $__uri; 1.320 + $localName = $__local; 1.321 + $qname = $__qname; 1.322 + switch($_ngcc_current_state) { 1.323 + case 2: 1.324 + { 1.325 + $_ngcc_current_state = 1; 1.326 + $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname); 1.327 + } 1.328 + break; 1.329 + case 9: 1.330 + { 1.331 + if(($__uri.equals("") && $__local.equals("public"))) { 1.332 + $_ngcc_current_state = 4; 1.333 + } 1.334 + else { 1.335 + unexpectedLeaveAttribute($__qname); 1.336 + } 1.337 + } 1.338 + break; 1.339 + case 12: 1.340 + { 1.341 + if(($__uri.equals("") && $__local.equals("name"))) { 1.342 + $_ngcc_current_state = 8; 1.343 + } 1.344 + else { 1.345 + unexpectedLeaveAttribute($__qname); 1.346 + } 1.347 + } 1.348 + break; 1.349 + case 5: 1.350 + { 1.351 + if(($__uri.equals("") && $__local.equals("system"))) { 1.352 + $_ngcc_current_state = 2; 1.353 + } 1.354 + else { 1.355 + unexpectedLeaveAttribute($__qname); 1.356 + } 1.357 + } 1.358 + break; 1.359 + case 4: 1.360 + { 1.361 + $_ngcc_current_state = 2; 1.362 + $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname); 1.363 + } 1.364 + break; 1.365 + case 8: 1.366 + { 1.367 + $_ngcc_current_state = 4; 1.368 + $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname); 1.369 + } 1.370 + break; 1.371 + case 0: 1.372 + { 1.373 + revertToParentFromLeaveAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname); 1.374 + } 1.375 + break; 1.376 + default: 1.377 + { 1.378 + unexpectedLeaveAttribute($__qname); 1.379 + } 1.380 + break; 1.381 + } 1.382 + } 1.383 + 1.384 + public void text(String $value) throws SAXException { 1.385 + int $ai; 1.386 + switch($_ngcc_current_state) { 1.387 + case 2: 1.388 + { 1.389 + $_ngcc_current_state = 1; 1.390 + $runtime.sendText(super._cookie, $value); 1.391 + } 1.392 + break; 1.393 + case 10: 1.394 + { 1.395 + pub = $value; 1.396 + $_ngcc_current_state = 9; 1.397 + } 1.398 + break; 1.399 + case 14: 1.400 + { 1.401 + if(($ai = $runtime.getAttributeIndex("","name"))>=0) { 1.402 + $runtime.consumeAttribute($ai); 1.403 + $runtime.sendText(super._cookie, $value); 1.404 + } 1.405 + } 1.406 + break; 1.407 + case 15: 1.408 + { 1.409 + if(($ai = $runtime.getAttributeIndex("","name"))>=0) { 1.410 + NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 224, null); 1.411 + spawnChildFromText(h, $value); 1.412 + } 1.413 + } 1.414 + break; 1.415 + case 4: 1.416 + { 1.417 + if(($ai = $runtime.getAttributeIndex("","system"))>=0) { 1.418 + $runtime.consumeAttribute($ai); 1.419 + $runtime.sendText(super._cookie, $value); 1.420 + } 1.421 + else { 1.422 + $_ngcc_current_state = 2; 1.423 + $runtime.sendText(super._cookie, $value); 1.424 + } 1.425 + } 1.426 + break; 1.427 + case 8: 1.428 + { 1.429 + if(($ai = $runtime.getAttributeIndex("","public"))>=0) { 1.430 + $runtime.consumeAttribute($ai); 1.431 + $runtime.sendText(super._cookie, $value); 1.432 + } 1.433 + else { 1.434 + $_ngcc_current_state = 4; 1.435 + $runtime.sendText(super._cookie, $value); 1.436 + } 1.437 + } 1.438 + break; 1.439 + case 13: 1.440 + { 1.441 + name = $value; 1.442 + $_ngcc_current_state = 12; 1.443 + } 1.444 + break; 1.445 + case 6: 1.446 + { 1.447 + sys = $value; 1.448 + $_ngcc_current_state = 5; 1.449 + } 1.450 + break; 1.451 + case 0: 1.452 + { 1.453 + revertToParentFromText(makeResult(), super._cookie, $value); 1.454 + } 1.455 + break; 1.456 + } 1.457 + } 1.458 + 1.459 + public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException { 1.460 + switch($__cookie__) { 1.461 + case 209: 1.462 + { 1.463 + ann = ((AnnotationImpl)$__result__); 1.464 + $_ngcc_current_state = 1; 1.465 + } 1.466 + break; 1.467 + case 224: 1.468 + { 1.469 + fa = ((ForeignAttributesImpl)$__result__); 1.470 + $_ngcc_current_state = 14; 1.471 + } 1.472 + break; 1.473 + } 1.474 + } 1.475 + 1.476 + public boolean accepted() { 1.477 + return(($_ngcc_current_state == 0)); 1.478 + } 1.479 + 1.480 + 1.481 + private Locator loc; 1.482 + private XSNotation makeResult() { 1.483 + return new NotationImpl( $runtime.document,ann,loc,fa,name,pub,sys); 1.484 + } 1.485 + 1.486 +}