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