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