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

Mon, 28 May 2018 10:36:45 +0800

author
aoqi
date
Mon, 28 May 2018 10:36:45 +0800
changeset 1546
dc8316632248
parent 1445
06086cb6c349
parent 637
9c07ef4934dd
permissions
-rw-r--r--

Merge

     1 /*
     2  * Copyright (c) 1997, 2017, 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;
    29 import com.sun.xml.internal.bind.WhiteSpaceProcessor;
    30 import com.sun.xml.internal.xsom.*;
    31 import com.sun.xml.internal.xsom.impl.*;
    32 import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
    33 import com.sun.xml.internal.xsom.parser.*;
    35 import org.xml.sax.Attributes;
    36 import org.xml.sax.Locator;
    37 import org.xml.sax.SAXException;
    39 class notation extends NGCCHandler {
    40     private String name;
    41     private String pub;
    42     private ForeignAttributesImpl fa;
    43     private String sys;
    44     private AnnotationImpl ann;
    45     protected final NGCCRuntimeEx $runtime;
    46     private int $_ngcc_current_state;
    47     protected String $uri;
    48     protected String $localName;
    49     protected String $qname;
    51     public final NGCCRuntime getRuntime() {
    52         return($runtime);
    53     }
    55     public notation(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie) {
    56         super(source, parent, cookie);
    57         $runtime = runtime;
    58         $_ngcc_current_state = 16;
    59     }
    61     public notation(NGCCRuntimeEx runtime) {
    62         this(null, runtime, runtime, -1);
    63     }
    65     private void action0()throws SAXException {
    66         loc = $runtime.copyLocator();
    67 }
    69     public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
    70         int $ai;
    71         $uri = $__uri;
    72         $localName = $__local;
    73         $qname = $__qname;
    74         switch($_ngcc_current_state) {
    75         case 2:
    76             {
    77                 if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation"))) {
    78                     NGCCHandler h = new annotation(this, super._source, $runtime, 209, null,AnnotationContext.NOTATION);
    79                     spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
    80                 }
    81                 else {
    82                     $_ngcc_current_state = 1;
    83                     $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
    84                 }
    85             }
    86             break;
    87         case 16:
    88             {
    89                 if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("notation"))) {
    90                     $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
    91                     action0();
    92                     $_ngcc_current_state = 15;
    93                 }
    94                 else {
    95                     unexpectedEnterElement($__qname);
    96                 }
    97             }
    98             break;
    99         case 14:
   100             {
   101                 if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
   102                     $runtime.consumeAttribute($ai);
   103                     $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
   104                 }
   105                 else {
   106                     unexpectedEnterElement($__qname);
   107                 }
   108             }
   109             break;
   110         case 15:
   111             {
   112                 if((($ai = $runtime.getAttributeIndex("","name"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("annotation")))) {
   113                     NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 224, null);
   114                     spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
   115                 }
   116                 else {
   117                     unexpectedEnterElement($__qname);
   118                 }
   119             }
   120             break;
   121         case 4:
   122             {
   123                 if(($ai = $runtime.getAttributeIndex("","system"))>=0) {
   124                     $runtime.consumeAttribute($ai);
   125                     $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
   126                 }
   127                 else {
   128                     $_ngcc_current_state = 2;
   129                     $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
   130                 }
   131             }
   132             break;
   133         case 8:
   134             {
   135                 if(($ai = $runtime.getAttributeIndex("","public"))>=0) {
   136                     $runtime.consumeAttribute($ai);
   137                     $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
   138                 }
   139                 else {
   140                     $_ngcc_current_state = 4;
   141                     $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
   142                 }
   143             }
   144             break;
   145         case 0:
   146             {
   147                 revertToParentFromEnterElement(makeResult(), super._cookie, $__uri, $__local, $__qname, $attrs);
   148             }
   149             break;
   150         default:
   151             {
   152                 unexpectedEnterElement($__qname);
   153             }
   154             break;
   155         }
   156     }
   158     public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
   159         int $ai;
   160         $uri = $__uri;
   161         $localName = $__local;
   162         $qname = $__qname;
   163         switch($_ngcc_current_state) {
   164         case 2:
   165             {
   166                 $_ngcc_current_state = 1;
   167                 $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
   168             }
   169             break;
   170         case 14:
   171             {
   172                 if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
   173                     $runtime.consumeAttribute($ai);
   174                     $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
   175                 }
   176                 else {
   177                     unexpectedLeaveElement($__qname);
   178                 }
   179             }
   180             break;
   181         case 15:
   182             {
   183                 if((($ai = $runtime.getAttributeIndex("","name"))>=0 && ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("notation")))) {
   184                     NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 224, null);
   185                     spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
   186                 }
   187                 else {
   188                     unexpectedLeaveElement($__qname);
   189                 }
   190             }
   191             break;
   192         case 4:
   193             {
   194                 if(($ai = $runtime.getAttributeIndex("","system"))>=0) {
   195                     $runtime.consumeAttribute($ai);
   196                     $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
   197                 }
   198                 else {
   199                     $_ngcc_current_state = 2;
   200                     $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
   201                 }
   202             }
   203             break;
   204         case 1:
   205             {
   206                 if(($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("notation"))) {
   207                     $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
   208                     $_ngcc_current_state = 0;
   209                 }
   210                 else {
   211                     unexpectedLeaveElement($__qname);
   212                 }
   213             }
   214             break;
   215         case 8:
   216             {
   217                 if(($ai = $runtime.getAttributeIndex("","public"))>=0) {
   218                     $runtime.consumeAttribute($ai);
   219                     $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
   220                 }
   221                 else {
   222                     $_ngcc_current_state = 4;
   223                     $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
   224                 }
   225             }
   226             break;
   227         case 0:
   228             {
   229                 revertToParentFromLeaveElement(makeResult(), super._cookie, $__uri, $__local, $__qname);
   230             }
   231             break;
   232         default:
   233             {
   234                 unexpectedLeaveElement($__qname);
   235             }
   236             break;
   237         }
   238     }
   240     public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
   241         int $ai;
   242         $uri = $__uri;
   243         $localName = $__local;
   244         $qname = $__qname;
   245         switch($_ngcc_current_state) {
   246         case 2:
   247             {
   248                 $_ngcc_current_state = 1;
   249                 $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
   250             }
   251             break;
   252         case 14:
   253             {
   254                 if(($__uri.equals("") && $__local.equals("name"))) {
   255                     $_ngcc_current_state = 13;
   256                 }
   257                 else {
   258                     unexpectedEnterAttribute($__qname);
   259                 }
   260             }
   261             break;
   262         case 15:
   263             {
   264                 if(($__uri.equals("") && $__local.equals("name"))) {
   265                     NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 224, null);
   266                     spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
   267                 }
   268                 else {
   269                     unexpectedEnterAttribute($__qname);
   270                 }
   271             }
   272             break;
   273         case 4:
   274             {
   275                 if(($__uri.equals("") && $__local.equals("system"))) {
   276                     $_ngcc_current_state = 6;
   277                 }
   278                 else {
   279                     $_ngcc_current_state = 2;
   280                     $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
   281                 }
   282             }
   283             break;
   284         case 8:
   285             {
   286                 if(($__uri.equals("") && $__local.equals("public"))) {
   287                     $_ngcc_current_state = 10;
   288                 }
   289                 else {
   290                     $_ngcc_current_state = 4;
   291                     $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
   292                 }
   293             }
   294             break;
   295         case 0:
   296             {
   297                 revertToParentFromEnterAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
   298             }
   299             break;
   300         default:
   301             {
   302                 unexpectedEnterAttribute($__qname);
   303             }
   304             break;
   305         }
   306     }
   308     public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
   309         int $ai;
   310         $uri = $__uri;
   311         $localName = $__local;
   312         $qname = $__qname;
   313         switch($_ngcc_current_state) {
   314         case 2:
   315             {
   316                 $_ngcc_current_state = 1;
   317                 $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
   318             }
   319             break;
   320         case 9:
   321             {
   322                 if(($__uri.equals("") && $__local.equals("public"))) {
   323                     $_ngcc_current_state = 4;
   324                 }
   325                 else {
   326                     unexpectedLeaveAttribute($__qname);
   327                 }
   328             }
   329             break;
   330         case 12:
   331             {
   332                 if(($__uri.equals("") && $__local.equals("name"))) {
   333                     $_ngcc_current_state = 8;
   334                 }
   335                 else {
   336                     unexpectedLeaveAttribute($__qname);
   337                 }
   338             }
   339             break;
   340         case 5:
   341             {
   342                 if(($__uri.equals("") && $__local.equals("system"))) {
   343                     $_ngcc_current_state = 2;
   344                 }
   345                 else {
   346                     unexpectedLeaveAttribute($__qname);
   347                 }
   348             }
   349             break;
   350         case 4:
   351             {
   352                 $_ngcc_current_state = 2;
   353                 $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
   354             }
   355             break;
   356         case 8:
   357             {
   358                 $_ngcc_current_state = 4;
   359                 $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
   360             }
   361             break;
   362         case 0:
   363             {
   364                 revertToParentFromLeaveAttribute(makeResult(), super._cookie, $__uri, $__local, $__qname);
   365             }
   366             break;
   367         default:
   368             {
   369                 unexpectedLeaveAttribute($__qname);
   370             }
   371             break;
   372         }
   373     }
   375     public void text(String $value) throws SAXException {
   376         int $ai;
   377         switch($_ngcc_current_state) {
   378         case 2:
   379             {
   380                 $_ngcc_current_state = 1;
   381                 $runtime.sendText(super._cookie, $value);
   382             }
   383             break;
   384         case 10:
   385             {
   386                 pub = $value;
   387                 $_ngcc_current_state = 9;
   388             }
   389             break;
   390         case 14:
   391             {
   392                 if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
   393                     $runtime.consumeAttribute($ai);
   394                     $runtime.sendText(super._cookie, $value);
   395                 }
   396             }
   397             break;
   398         case 15:
   399             {
   400                 if(($ai = $runtime.getAttributeIndex("","name"))>=0) {
   401                     NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 224, null);
   402                     spawnChildFromText(h, $value);
   403                 }
   404             }
   405             break;
   406         case 4:
   407             {
   408                 if(($ai = $runtime.getAttributeIndex("","system"))>=0) {
   409                     $runtime.consumeAttribute($ai);
   410                     $runtime.sendText(super._cookie, $value);
   411                 }
   412                 else {
   413                     $_ngcc_current_state = 2;
   414                     $runtime.sendText(super._cookie, $value);
   415                 }
   416             }
   417             break;
   418         case 8:
   419             {
   420                 if(($ai = $runtime.getAttributeIndex("","public"))>=0) {
   421                     $runtime.consumeAttribute($ai);
   422                     $runtime.sendText(super._cookie, $value);
   423                 }
   424                 else {
   425                     $_ngcc_current_state = 4;
   426                     $runtime.sendText(super._cookie, $value);
   427                 }
   428             }
   429             break;
   430         case 13:
   431             {
   432                 name = WhiteSpaceProcessor.collapse($value);
   433                 $_ngcc_current_state = 12;
   434             }
   435             break;
   436         case 6:
   437             {
   438                 sys = $value;
   439                 $_ngcc_current_state = 5;
   440             }
   441             break;
   442         case 0:
   443             {
   444                 revertToParentFromText(makeResult(), super._cookie, $value);
   445             }
   446             break;
   447         }
   448     }
   450     public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
   451         switch($__cookie__) {
   452         case 209:
   453             {
   454                 ann = ((AnnotationImpl)$__result__);
   455                 $_ngcc_current_state = 1;
   456             }
   457             break;
   458         case 224:
   459             {
   460                 fa = ((ForeignAttributesImpl)$__result__);
   461                 $_ngcc_current_state = 14;
   462             }
   463             break;
   464         }
   465     }
   467     public boolean accepted() {
   468         return(($_ngcc_current_state == 0));
   469     }
   472       private Locator loc;
   473       private XSNotation makeResult() {
   474         return new NotationImpl( $runtime.document,ann,loc,fa,name,pub,sys);
   475       }
   477 }

mercurial