src/share/jaxws_classes/com/sun/xml/internal/xsom/impl/parser/state/includeDecl.java

changeset 0
373ffda63c9a
child 637
9c07ef4934dd
     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/includeDecl.java	Wed Apr 27 01:27:09 2016 +0800
     1.3 @@ -0,0 +1,288 @@
     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 includeDecl extends NGCCHandler {
    1.49 +    private String schemaLocation;
    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 includeDecl(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie) {
    1.61 +        super(source, parent, cookie);
    1.62 +        $runtime = runtime;
    1.63 +        $_ngcc_current_state = 7;
    1.64 +    }
    1.65 +
    1.66 +    public includeDecl(NGCCRuntimeEx runtime) {
    1.67 +        this(null, runtime, runtime, -1);
    1.68 +    }
    1.69 +
    1.70 +    private void action0()throws SAXException {
    1.71 +        $runtime.includeSchema( schemaLocation );
    1.72 +}
    1.73 +
    1.74 +    public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
    1.75 +        int $ai;
    1.76 +        $uri = $__uri;
    1.77 +        $localName = $__local;
    1.78 +        $qname = $__qname;
    1.79 +        switch($_ngcc_current_state) {
    1.80 +        case 2:
    1.81 +            {
    1.82 +                if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
    1.83 +                    NGCCHandler h = new annotation(this, super._source, $runtime, 372, null,AnnotationContext.SCHEMA);
    1.84 +                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
    1.85 +                }
    1.86 +                else {
    1.87 +                    $_ngcc_current_state = 1;
    1.88 +                    $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
    1.89 +                }
    1.90 +            }
    1.91 +            break;
    1.92 +        case 0:
    1.93 +            {
    1.94 +                revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
    1.95 +            }
    1.96 +            break;
    1.97 +        case 7:
    1.98 +            {
    1.99 +                if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("include"))) {
   1.100 +                    $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
   1.101 +                    $_ngcc_current_state = 6;
   1.102 +                }
   1.103 +                else {
   1.104 +                    unexpectedEnterElement($__qname);
   1.105 +                }
   1.106 +            }
   1.107 +            break;
   1.108 +        case 6:
   1.109 +            {
   1.110 +                if(($ai = $runtime.getAttributeIndex("","schemaLocation"))>=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 +        default:
   1.120 +            {
   1.121 +                unexpectedEnterElement($__qname);
   1.122 +            }
   1.123 +            break;
   1.124 +        }
   1.125 +    }
   1.126 +
   1.127 +    public void leaveElement(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 1:
   1.134 +            {
   1.135 +                if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("include"))) {
   1.136 +                    $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
   1.137 +                    $_ngcc_current_state = 0;
   1.138 +                    action0();
   1.139 +                }
   1.140 +                else {
   1.141 +                    unexpectedLeaveElement($__qname);
   1.142 +                }
   1.143 +            }
   1.144 +            break;
   1.145 +        case 2:
   1.146 +            {
   1.147 +                $_ngcc_current_state = 1;
   1.148 +                $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
   1.149 +            }
   1.150 +            break;
   1.151 +        case 0:
   1.152 +            {
   1.153 +                revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname);
   1.154 +            }
   1.155 +            break;
   1.156 +        case 6:
   1.157 +            {
   1.158 +                if(($ai = $runtime.getAttributeIndex("","schemaLocation"))>=0) {
   1.159 +                    $runtime.consumeAttribute($ai);
   1.160 +                    $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
   1.161 +                }
   1.162 +                else {
   1.163 +                    unexpectedLeaveElement($__qname);
   1.164 +                }
   1.165 +            }
   1.166 +            break;
   1.167 +        default:
   1.168 +            {
   1.169 +                unexpectedLeaveElement($__qname);
   1.170 +            }
   1.171 +            break;
   1.172 +        }
   1.173 +    }
   1.174 +
   1.175 +    public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
   1.176 +        int $ai;
   1.177 +        $uri = $__uri;
   1.178 +        $localName = $__local;
   1.179 +        $qname = $__qname;
   1.180 +        switch($_ngcc_current_state) {
   1.181 +        case 2:
   1.182 +            {
   1.183 +                $_ngcc_current_state = 1;
   1.184 +                $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
   1.185 +            }
   1.186 +            break;
   1.187 +        case 0:
   1.188 +            {
   1.189 +                revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname);
   1.190 +            }
   1.191 +            break;
   1.192 +        case 6:
   1.193 +            {
   1.194 +                if(($__uri.equals("") && $__local.equals("schemaLocation"))) {
   1.195 +                    $_ngcc_current_state = 5;
   1.196 +                }
   1.197 +                else {
   1.198 +                    unexpectedEnterAttribute($__qname);
   1.199 +                }
   1.200 +            }
   1.201 +            break;
   1.202 +        default:
   1.203 +            {
   1.204 +                unexpectedEnterAttribute($__qname);
   1.205 +            }
   1.206 +            break;
   1.207 +        }
   1.208 +    }
   1.209 +
   1.210 +    public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
   1.211 +        int $ai;
   1.212 +        $uri = $__uri;
   1.213 +        $localName = $__local;
   1.214 +        $qname = $__qname;
   1.215 +        switch($_ngcc_current_state) {
   1.216 +        case 2:
   1.217 +            {
   1.218 +                $_ngcc_current_state = 1;
   1.219 +                $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
   1.220 +            }
   1.221 +            break;
   1.222 +        case 0:
   1.223 +            {
   1.224 +                revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname);
   1.225 +            }
   1.226 +            break;
   1.227 +        case 4:
   1.228 +            {
   1.229 +                if(($__uri.equals("") && $__local.equals("schemaLocation"))) {
   1.230 +                    $_ngcc_current_state = 2;
   1.231 +                }
   1.232 +                else {
   1.233 +                    unexpectedLeaveAttribute($__qname);
   1.234 +                }
   1.235 +            }
   1.236 +            break;
   1.237 +        default:
   1.238 +            {
   1.239 +                unexpectedLeaveAttribute($__qname);
   1.240 +            }
   1.241 +            break;
   1.242 +        }
   1.243 +    }
   1.244 +
   1.245 +    public void text(String $value) throws SAXException {
   1.246 +        int $ai;
   1.247 +        switch($_ngcc_current_state) {
   1.248 +        case 2:
   1.249 +            {
   1.250 +                $_ngcc_current_state = 1;
   1.251 +                $runtime.sendText(super._cookie, $value);
   1.252 +            }
   1.253 +            break;
   1.254 +        case 0:
   1.255 +            {
   1.256 +                revertToParentFromText(this, super._cookie, $value);
   1.257 +            }
   1.258 +            break;
   1.259 +        case 5:
   1.260 +            {
   1.261 +                schemaLocation = $value;
   1.262 +                $_ngcc_current_state = 4;
   1.263 +            }
   1.264 +            break;
   1.265 +        case 6:
   1.266 +            {
   1.267 +                if(($ai = $runtime.getAttributeIndex("","schemaLocation"))>=0) {
   1.268 +                    $runtime.consumeAttribute($ai);
   1.269 +                    $runtime.sendText(super._cookie, $value);
   1.270 +                }
   1.271 +            }
   1.272 +            break;
   1.273 +        }
   1.274 +    }
   1.275 +
   1.276 +    public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
   1.277 +        switch($__cookie__) {
   1.278 +        case 372:
   1.279 +            {
   1.280 +                $_ngcc_current_state = 1;
   1.281 +            }
   1.282 +            break;
   1.283 +        }
   1.284 +    }
   1.285 +
   1.286 +    public boolean accepted() {
   1.287 +        return(($_ngcc_current_state == 0));
   1.288 +    }
   1.289 +
   1.290 +
   1.291 +}

mercurial