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

Thu, 31 Aug 2017 15:18:52 +0800

author
aoqi
date
Thu, 31 Aug 2017 15:18:52 +0800
changeset 637
9c07ef4934dd
parent 397
b99d7e355d4b
parent 0
373ffda63c9a
permissions
-rw-r--r--

merge

     1 /*
     2  * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     8  * particular file as subject to the "Classpath" exception as provided
     9  * by Oracle in the LICENSE file that accompanied this code.
    10  *
    11  * This code is distributed in the hope that it will be useful, but WITHOUT
    12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    14  * version 2 for more details (a copy is included in the LICENSE file that
    15  * accompanied this code).
    16  *
    17  * You should have received a copy of the GNU General Public License version
    18  * 2 along with this work; if not, write to the Free Software Foundation,
    19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    20  *
    21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    22  * or visit www.oracle.com if you need additional information or have any
    23  * questions.
    24  */
    26 /* this file is generated by RelaxNGCC */
    27 package com.sun.xml.internal.xsom.impl.parser.state;
    28 import org.xml.sax.SAXException;
    29 import org.xml.sax.XMLReader;
    30 import org.xml.sax.Attributes;
    31 import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
    33     import com.sun.xml.internal.xsom.*;
    34     import com.sun.xml.internal.xsom.parser.*;
    35     import com.sun.xml.internal.xsom.impl.*;
    36     import com.sun.xml.internal.xsom.impl.parser.*;
    37     import org.xml.sax.Locator;
    38     import org.xml.sax.ContentHandler;
    39     import org.xml.sax.helpers.*;
    40     import java.util.*;
    41     import java.math.BigInteger;
    45 class includeDecl extends NGCCHandler {
    46     private String schemaLocation;
    47     protected final NGCCRuntimeEx $runtime;
    48     private int $_ngcc_current_state;
    49     protected String $uri;
    50     protected String $localName;
    51     protected String $qname;
    53     public final NGCCRuntime getRuntime() {
    54         return($runtime);
    55     }
    57     public includeDecl(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie) {
    58         super(source, parent, cookie);
    59         $runtime = runtime;
    60         $_ngcc_current_state = 7;
    61     }
    63     public includeDecl(NGCCRuntimeEx runtime) {
    64         this(null, runtime, runtime, -1);
    65     }
    67     private void action0()throws SAXException {
    68         $runtime.includeSchema( schemaLocation );
    69 }
    71     public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
    72         int $ai;
    73         $uri = $__uri;
    74         $localName = $__local;
    75         $qname = $__qname;
    76         switch($_ngcc_current_state) {
    77         case 2:
    78             {
    79                 if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
    80                     NGCCHandler h = new annotation(this, super._source, $runtime, 372, null,AnnotationContext.SCHEMA);
    81                     spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
    82                 }
    83                 else {
    84                     $_ngcc_current_state = 1;
    85                     $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
    86                 }
    87             }
    88             break;
    89         case 0:
    90             {
    91                 revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
    92             }
    93             break;
    94         case 7:
    95             {
    96                 if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("include"))) {
    97                     $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
    98                     $_ngcc_current_state = 6;
    99                 }
   100                 else {
   101                     unexpectedEnterElement($__qname);
   102                 }
   103             }
   104             break;
   105         case 6:
   106             {
   107                 if(($ai = $runtime.getAttributeIndex("","schemaLocation"))>=0) {
   108                     $runtime.consumeAttribute($ai);
   109                     $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
   110                 }
   111                 else {
   112                     unexpectedEnterElement($__qname);
   113                 }
   114             }
   115             break;
   116         default:
   117             {
   118                 unexpectedEnterElement($__qname);
   119             }
   120             break;
   121         }
   122     }
   124     public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
   125         int $ai;
   126         $uri = $__uri;
   127         $localName = $__local;
   128         $qname = $__qname;
   129         switch($_ngcc_current_state) {
   130         case 1:
   131             {
   132                 if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("include"))) {
   133                     $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
   134                     $_ngcc_current_state = 0;
   135                     action0();
   136                 }
   137                 else {
   138                     unexpectedLeaveElement($__qname);
   139                 }
   140             }
   141             break;
   142         case 2:
   143             {
   144                 $_ngcc_current_state = 1;
   145                 $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
   146             }
   147             break;
   148         case 0:
   149             {
   150                 revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname);
   151             }
   152             break;
   153         case 6:
   154             {
   155                 if(($ai = $runtime.getAttributeIndex("","schemaLocation"))>=0) {
   156                     $runtime.consumeAttribute($ai);
   157                     $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
   158                 }
   159                 else {
   160                     unexpectedLeaveElement($__qname);
   161                 }
   162             }
   163             break;
   164         default:
   165             {
   166                 unexpectedLeaveElement($__qname);
   167             }
   168             break;
   169         }
   170     }
   172     public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
   173         int $ai;
   174         $uri = $__uri;
   175         $localName = $__local;
   176         $qname = $__qname;
   177         switch($_ngcc_current_state) {
   178         case 2:
   179             {
   180                 $_ngcc_current_state = 1;
   181                 $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
   182             }
   183             break;
   184         case 0:
   185             {
   186                 revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname);
   187             }
   188             break;
   189         case 6:
   190             {
   191                 if(($__uri.equals("") && $__local.equals("schemaLocation"))) {
   192                     $_ngcc_current_state = 5;
   193                 }
   194                 else {
   195                     unexpectedEnterAttribute($__qname);
   196                 }
   197             }
   198             break;
   199         default:
   200             {
   201                 unexpectedEnterAttribute($__qname);
   202             }
   203             break;
   204         }
   205     }
   207     public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
   208         int $ai;
   209         $uri = $__uri;
   210         $localName = $__local;
   211         $qname = $__qname;
   212         switch($_ngcc_current_state) {
   213         case 2:
   214             {
   215                 $_ngcc_current_state = 1;
   216                 $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
   217             }
   218             break;
   219         case 0:
   220             {
   221                 revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname);
   222             }
   223             break;
   224         case 4:
   225             {
   226                 if(($__uri.equals("") && $__local.equals("schemaLocation"))) {
   227                     $_ngcc_current_state = 2;
   228                 }
   229                 else {
   230                     unexpectedLeaveAttribute($__qname);
   231                 }
   232             }
   233             break;
   234         default:
   235             {
   236                 unexpectedLeaveAttribute($__qname);
   237             }
   238             break;
   239         }
   240     }
   242     public void text(String $value) throws SAXException {
   243         int $ai;
   244         switch($_ngcc_current_state) {
   245         case 2:
   246             {
   247                 $_ngcc_current_state = 1;
   248                 $runtime.sendText(super._cookie, $value);
   249             }
   250             break;
   251         case 0:
   252             {
   253                 revertToParentFromText(this, super._cookie, $value);
   254             }
   255             break;
   256         case 5:
   257             {
   258                 schemaLocation = $value;
   259                 $_ngcc_current_state = 4;
   260             }
   261             break;
   262         case 6:
   263             {
   264                 if(($ai = $runtime.getAttributeIndex("","schemaLocation"))>=0) {
   265                     $runtime.consumeAttribute($ai);
   266                     $runtime.sendText(super._cookie, $value);
   267                 }
   268             }
   269             break;
   270         }
   271     }
   273     public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
   274         switch($__cookie__) {
   275         case 372:
   276             {
   277                 $_ngcc_current_state = 1;
   278             }
   279             break;
   280         }
   281     }
   283     public boolean accepted() {
   284         return(($_ngcc_current_state == 0));
   285     }
   288 }

mercurial