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/ersSet.java Wed Apr 27 01:27:09 2016 +0800 1.3 @@ -0,0 +1,186 @@ 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 ersSet extends NGCCHandler { 1.49 + private String v; 1.50 + protected final NGCCRuntimeEx $runtime; 1.51 + private int $_ngcc_current_state; 1.52 + protected String $uri; 1.53 + protected String $localName; 1.54 + protected String $qname; 1.55 + 1.56 + public final NGCCRuntime getRuntime() { 1.57 + return($runtime); 1.58 + } 1.59 + 1.60 + public ersSet(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie) { 1.61 + super(source, parent, cookie); 1.62 + $runtime = runtime; 1.63 + $_ngcc_current_state = 1; 1.64 + } 1.65 + 1.66 + public ersSet(NGCCRuntimeEx runtime) { 1.67 + this(null, runtime, runtime, -1); 1.68 + } 1.69 + 1.70 + public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException { 1.71 + int $ai; 1.72 + $uri = $__uri; 1.73 + $localName = $__local; 1.74 + $qname = $__qname; 1.75 + switch($_ngcc_current_state) { 1.76 + case 0: 1.77 + { 1.78 + revertToParentFromEnterElement(makeResult(), super._cookie, $__uri, $__local, $__qname, $attrs); 1.79 + } 1.80 + break; 1.81 + default: 1.82 + { 1.83 + unexpectedEnterElement($__qname); 1.84 + } 1.85 + break; 1.86 + } 1.87 + } 1.88 + 1.89 + public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException { 1.90 + int $ai; 1.91 + $uri = $__uri; 1.92 + $localName = $__local; 1.93 + $qname = $__qname; 1.94 + switch($_ngcc_current_state) { 1.95 + case 0: 1.96 + { 1.97 + revertToParentFromLeaveElement(makeResult(), super._cookie, $__uri, $__local, $__qname); 1.98 + } 1.99 + break; 1.100 + default: 1.101 + { 1.102 + unexpectedLeaveElement($__qname); 1.103 + } 1.104 + break; 1.105 + } 1.106 + } 1.107 + 1.108 + public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException { 1.109 + int $ai; 1.110 + $uri = $__uri; 1.111 + $localName = $__local; 1.112 + $qname = $__qname; 1.113 + switch($_ngcc_current_state) { 1.114 + case 0: 1.115 + { 1.116 + revertToParentFromEnterAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname); 1.117 + } 1.118 + break; 1.119 + default: 1.120 + { 1.121 + unexpectedEnterAttribute($__qname); 1.122 + } 1.123 + break; 1.124 + } 1.125 + } 1.126 + 1.127 + public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException { 1.128 + int $ai; 1.129 + $uri = $__uri; 1.130 + $localName = $__local; 1.131 + $qname = $__qname; 1.132 + switch($_ngcc_current_state) { 1.133 + case 0: 1.134 + { 1.135 + revertToParentFromLeaveAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname); 1.136 + } 1.137 + break; 1.138 + default: 1.139 + { 1.140 + unexpectedLeaveAttribute($__qname); 1.141 + } 1.142 + break; 1.143 + } 1.144 + } 1.145 + 1.146 + public void text(String $value) throws SAXException { 1.147 + int $ai; 1.148 + switch($_ngcc_current_state) { 1.149 + case 0: 1.150 + { 1.151 + revertToParentFromText(makeResult(), super._cookie, $value); 1.152 + } 1.153 + break; 1.154 + case 1: 1.155 + { 1.156 + v = $value; 1.157 + $_ngcc_current_state = 0; 1.158 + } 1.159 + break; 1.160 + } 1.161 + } 1.162 + 1.163 + public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException { 1.164 + switch($__cookie__) { 1.165 + } 1.166 + } 1.167 + 1.168 + public boolean accepted() { 1.169 + return(($_ngcc_current_state == 0)); 1.170 + } 1.171 + 1.172 + 1.173 + private Integer makeResult() { 1.174 + if(v==null) return new Integer($runtime.blockDefault); 1.175 + 1.176 + if(v.indexOf("#all")!=-1) 1.177 + return new Integer( 1.178 + XSType.EXTENSION|XSType.RESTRICTION|XSType.SUBSTITUTION); 1.179 + 1.180 + int r = 0; 1.181 + 1.182 + if(v.indexOf("extension")!=-1) r|=XSType.EXTENSION; 1.183 + if(v.indexOf("restriction")!=-1) r|=XSType.RESTRICTION; 1.184 + if(v.indexOf("substitution")!=-1) r|=XSType.SUBSTITUTION; 1.185 + 1.186 + return new Integer(r); 1.187 + } 1.188 + 1.189 +}