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/group.java Tue Mar 06 16:09:35 2012 -0800 1.3 @@ -0,0 +1,451 @@ 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 group extends NGCCHandler { 1.49 + private AnnotationImpl annotation; 1.50 + private String name; 1.51 + private ModelGroupImpl term; 1.52 + private ForeignAttributesImpl fa; 1.53 + protected final NGCCRuntimeEx $runtime; 1.54 + private int $_ngcc_current_state; 1.55 + protected String $uri; 1.56 + protected String $localName; 1.57 + protected String $qname; 1.58 + 1.59 + public final NGCCRuntime getRuntime() { 1.60 + return($runtime); 1.61 + } 1.62 + 1.63 + public group(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie) { 1.64 + super(source, parent, cookie); 1.65 + $runtime = runtime; 1.66 + $_ngcc_current_state = 15; 1.67 + } 1.68 + 1.69 + public group(NGCCRuntimeEx runtime) { 1.70 + this(null, runtime, runtime, -1); 1.71 + } 1.72 + 1.73 + private void action0()throws SAXException { 1.74 + 1.75 + result = new ModelGroupDeclImpl( $runtime.document, 1.76 + annotation, loc, fa, 1.77 + $runtime.currentSchema.getTargetNamespace(), 1.78 + name, 1.79 + term 1.80 + ); 1.81 + 1.82 +} 1.83 + 1.84 + private void action1()throws SAXException { 1.85 + 1.86 + mloc = $runtime.copyLocator(); 1.87 + compositorName = $localName; 1.88 + 1.89 +} 1.90 + 1.91 + private void action2()throws SAXException { 1.92 + loc = $runtime.copyLocator(); 1.93 +} 1.94 + 1.95 + public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException { 1.96 + int $ai; 1.97 + $uri = $__uri; 1.98 + $localName = $__local; 1.99 + $qname = $__qname; 1.100 + switch($_ngcc_current_state) { 1.101 + case 15: 1.102 + { 1.103 + if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group"))) { 1.104 + $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs); 1.105 + action2(); 1.106 + $_ngcc_current_state = 11; 1.107 + } 1.108 + else { 1.109 + unexpectedEnterElement($__qname); 1.110 + } 1.111 + } 1.112 + break; 1.113 + case 3: 1.114 + { 1.115 + if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")) || (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element"))))))) { 1.116 + NGCCHandler h = new modelGroupBody(this, super._source, $runtime, 593, mloc,compositorName); 1.117 + spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs); 1.118 + } 1.119 + else { 1.120 + unexpectedEnterElement($__qname); 1.121 + } 1.122 + } 1.123 + break; 1.124 + case 4: 1.125 + { 1.126 + if(((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))) { 1.127 + $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs); 1.128 + $_ngcc_current_state = 3; 1.129 + } 1.130 + else { 1.131 + unexpectedEnterElement($__qname); 1.132 + } 1.133 + } 1.134 + break; 1.135 + case 11: 1.136 + { 1.137 + if(($ai = $runtime.getAttributeIndex("","ID"))>=0) { 1.138 + $runtime.consumeAttribute($ai); 1.139 + $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs); 1.140 + } 1.141 + else { 1.142 + $_ngcc_current_state = 10; 1.143 + $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs); 1.144 + } 1.145 + } 1.146 + break; 1.147 + case 5: 1.148 + { 1.149 + if(((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))) { 1.150 + NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 595, null); 1.151 + spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs); 1.152 + } 1.153 + else { 1.154 + unexpectedEnterElement($__qname); 1.155 + } 1.156 + } 1.157 + break; 1.158 + case 10: 1.159 + { 1.160 + if(($ai = $runtime.getAttributeIndex("","name"))>=0) { 1.161 + $runtime.consumeAttribute($ai); 1.162 + $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs); 1.163 + } 1.164 + else { 1.165 + unexpectedEnterElement($__qname); 1.166 + } 1.167 + } 1.168 + break; 1.169 + case 6: 1.170 + { 1.171 + if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) { 1.172 + NGCCHandler h = new annotation(this, super._source, $runtime, 597, null,AnnotationContext.MODELGROUP_DECL); 1.173 + spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs); 1.174 + } 1.175 + else { 1.176 + $_ngcc_current_state = 5; 1.177 + $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs); 1.178 + } 1.179 + } 1.180 + break; 1.181 + case 0: 1.182 + { 1.183 + revertToParentFromEnterElement(result, super._cookie, $__uri, $__local, $__qname, $attrs); 1.184 + } 1.185 + break; 1.186 + default: 1.187 + { 1.188 + unexpectedEnterElement($__qname); 1.189 + } 1.190 + break; 1.191 + } 1.192 + } 1.193 + 1.194 + public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException { 1.195 + int $ai; 1.196 + $uri = $__uri; 1.197 + $localName = $__local; 1.198 + $qname = $__qname; 1.199 + switch($_ngcc_current_state) { 1.200 + case 3: 1.201 + { 1.202 + if(((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))) { 1.203 + NGCCHandler h = new modelGroupBody(this, super._source, $runtime, 593, mloc,compositorName); 1.204 + spawnChildFromLeaveElement(h, $__uri, $__local, $__qname); 1.205 + } 1.206 + else { 1.207 + unexpectedLeaveElement($__qname); 1.208 + } 1.209 + } 1.210 + break; 1.211 + case 2: 1.212 + { 1.213 + if(((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence")))) { 1.214 + $runtime.onLeaveElementConsumed($__uri, $__local, $__qname); 1.215 + $_ngcc_current_state = 1; 1.216 + } 1.217 + else { 1.218 + unexpectedLeaveElement($__qname); 1.219 + } 1.220 + } 1.221 + break; 1.222 + case 11: 1.223 + { 1.224 + if(($ai = $runtime.getAttributeIndex("","ID"))>=0) { 1.225 + $runtime.consumeAttribute($ai); 1.226 + $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname); 1.227 + } 1.228 + else { 1.229 + $_ngcc_current_state = 10; 1.230 + $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname); 1.231 + } 1.232 + } 1.233 + break; 1.234 + case 1: 1.235 + { 1.236 + if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group"))) { 1.237 + $runtime.onLeaveElementConsumed($__uri, $__local, $__qname); 1.238 + $_ngcc_current_state = 0; 1.239 + action0(); 1.240 + } 1.241 + else { 1.242 + unexpectedLeaveElement($__qname); 1.243 + } 1.244 + } 1.245 + break; 1.246 + case 10: 1.247 + { 1.248 + if(($ai = $runtime.getAttributeIndex("","name"))>=0) { 1.249 + $runtime.consumeAttribute($ai); 1.250 + $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname); 1.251 + } 1.252 + else { 1.253 + unexpectedLeaveElement($__qname); 1.254 + } 1.255 + } 1.256 + break; 1.257 + case 6: 1.258 + { 1.259 + $_ngcc_current_state = 5; 1.260 + $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname); 1.261 + } 1.262 + break; 1.263 + case 0: 1.264 + { 1.265 + revertToParentFromLeaveElement(result, super._cookie, $__uri, $__local, $__qname); 1.266 + } 1.267 + break; 1.268 + default: 1.269 + { 1.270 + unexpectedLeaveElement($__qname); 1.271 + } 1.272 + break; 1.273 + } 1.274 + } 1.275 + 1.276 + public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException { 1.277 + int $ai; 1.278 + $uri = $__uri; 1.279 + $localName = $__local; 1.280 + $qname = $__qname; 1.281 + switch($_ngcc_current_state) { 1.282 + case 11: 1.283 + { 1.284 + if(($__uri.equals("") && $__local.equals("ID"))) { 1.285 + $_ngcc_current_state = 13; 1.286 + } 1.287 + else { 1.288 + $_ngcc_current_state = 10; 1.289 + $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname); 1.290 + } 1.291 + } 1.292 + break; 1.293 + case 10: 1.294 + { 1.295 + if(($__uri.equals("") && $__local.equals("name"))) { 1.296 + $_ngcc_current_state = 9; 1.297 + } 1.298 + else { 1.299 + unexpectedEnterAttribute($__qname); 1.300 + } 1.301 + } 1.302 + break; 1.303 + case 6: 1.304 + { 1.305 + $_ngcc_current_state = 5; 1.306 + $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname); 1.307 + } 1.308 + break; 1.309 + case 0: 1.310 + { 1.311 + revertToParentFromEnterAttribute(result, super._cookie, $__uri, $__local, $__qname); 1.312 + } 1.313 + break; 1.314 + default: 1.315 + { 1.316 + unexpectedEnterAttribute($__qname); 1.317 + } 1.318 + break; 1.319 + } 1.320 + } 1.321 + 1.322 + public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException { 1.323 + int $ai; 1.324 + $uri = $__uri; 1.325 + $localName = $__local; 1.326 + $qname = $__qname; 1.327 + switch($_ngcc_current_state) { 1.328 + case 12: 1.329 + { 1.330 + if(($__uri.equals("") && $__local.equals("ID"))) { 1.331 + $_ngcc_current_state = 10; 1.332 + } 1.333 + else { 1.334 + unexpectedLeaveAttribute($__qname); 1.335 + } 1.336 + } 1.337 + break; 1.338 + case 11: 1.339 + { 1.340 + $_ngcc_current_state = 10; 1.341 + $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname); 1.342 + } 1.343 + break; 1.344 + case 8: 1.345 + { 1.346 + if(($__uri.equals("") && $__local.equals("name"))) { 1.347 + $_ngcc_current_state = 6; 1.348 + } 1.349 + else { 1.350 + unexpectedLeaveAttribute($__qname); 1.351 + } 1.352 + } 1.353 + break; 1.354 + case 6: 1.355 + { 1.356 + $_ngcc_current_state = 5; 1.357 + $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname); 1.358 + } 1.359 + break; 1.360 + case 0: 1.361 + { 1.362 + revertToParentFromLeaveAttribute(result, super._cookie, $__uri, $__local, $__qname); 1.363 + } 1.364 + break; 1.365 + default: 1.366 + { 1.367 + unexpectedLeaveAttribute($__qname); 1.368 + } 1.369 + break; 1.370 + } 1.371 + } 1.372 + 1.373 + public void text(String $value) throws SAXException { 1.374 + int $ai; 1.375 + switch($_ngcc_current_state) { 1.376 + case 13: 1.377 + { 1.378 + $_ngcc_current_state = 12; 1.379 + } 1.380 + break; 1.381 + case 9: 1.382 + { 1.383 + name = $value; 1.384 + $_ngcc_current_state = 8; 1.385 + } 1.386 + break; 1.387 + case 11: 1.388 + { 1.389 + if(($ai = $runtime.getAttributeIndex("","ID"))>=0) { 1.390 + $runtime.consumeAttribute($ai); 1.391 + $runtime.sendText(super._cookie, $value); 1.392 + } 1.393 + else { 1.394 + $_ngcc_current_state = 10; 1.395 + $runtime.sendText(super._cookie, $value); 1.396 + } 1.397 + } 1.398 + break; 1.399 + case 10: 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 6: 1.408 + { 1.409 + $_ngcc_current_state = 5; 1.410 + $runtime.sendText(super._cookie, $value); 1.411 + } 1.412 + break; 1.413 + case 0: 1.414 + { 1.415 + revertToParentFromText(result, super._cookie, $value); 1.416 + } 1.417 + break; 1.418 + } 1.419 + } 1.420 + 1.421 + public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException { 1.422 + switch($__cookie__) { 1.423 + case 593: 1.424 + { 1.425 + term = ((ModelGroupImpl)$__result__); 1.426 + $_ngcc_current_state = 2; 1.427 + } 1.428 + break; 1.429 + case 595: 1.430 + { 1.431 + fa = ((ForeignAttributesImpl)$__result__); 1.432 + action1(); 1.433 + $_ngcc_current_state = 4; 1.434 + } 1.435 + break; 1.436 + case 597: 1.437 + { 1.438 + annotation = ((AnnotationImpl)$__result__); 1.439 + $_ngcc_current_state = 5; 1.440 + } 1.441 + break; 1.442 + } 1.443 + } 1.444 + 1.445 + public boolean accepted() { 1.446 + return(($_ngcc_current_state == 0)); 1.447 + } 1.448 + 1.449 + 1.450 + private ModelGroupDeclImpl result; 1.451 + private Locator loc,mloc; 1.452 + private String compositorName; 1.453 + 1.454 +}