src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/Schema.java

Tue, 06 Mar 2012 16:09:35 -0800

author
ohair
date
Tue, 06 Mar 2012 16:09:35 -0800
changeset 286
f50545b5e2f1
child 368
0989ad8c0860
permissions
-rw-r--r--

7150322: Stop using drop source bundles in jaxws
Reviewed-by: darcy, ohrstrom

     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.tools.internal.jxc.gen.config;
    28 import org.xml.sax.SAXException;
    29 import org.xml.sax.XMLReader;
    30 import org.xml.sax.Attributes;
    31 import com.sun.tools.internal.jxc.NGCCRuntimeEx;
    33 import java.io.File;
    36 public class Schema extends NGCCHandler {
    37     private File baseDir;
    38     private String loc;
    39     protected final NGCCRuntimeEx $runtime;
    40     private int $_ngcc_current_state;
    41     protected String $uri;
    42     protected String $localName;
    43     protected String $qname;
    45     public final NGCCRuntime getRuntime() {
    46         return($runtime);
    47     }
    49     public Schema(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie, File _baseDir) {
    50         super(source, parent, cookie);
    51         $runtime = runtime;
    52         this.baseDir = _baseDir;
    53         $_ngcc_current_state = 10;
    54     }
    56     public Schema(NGCCRuntimeEx runtime, File _baseDir) {
    57         this(null, runtime, runtime, -1, _baseDir);
    58     }
    60     private void action0()throws SAXException {
    61         location = new File(baseDir,loc);
    62 }
    64     public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
    65         int $ai;
    66         $uri = $__uri;
    67         $localName = $__local;
    68         $qname = $__qname;
    69         switch($_ngcc_current_state) {
    70         case 6:
    71             {
    72                 if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
    73                     $runtime.consumeAttribute($ai);
    74                     $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
    75                 }
    76                 else {
    77                     $_ngcc_current_state = 2;
    78                     $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
    79                 }
    80             }
    81             break;
    82         case 0:
    83             {
    84                 revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
    85             }
    86             break;
    87         case 2:
    88             {
    89                 if(($ai = $runtime.getAttributeIndex("","location"))>=0) {
    90                     $runtime.consumeAttribute($ai);
    91                     $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
    92                 }
    93                 else {
    94                     $_ngcc_current_state = 1;
    95                     $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
    96                 }
    97             }
    98             break;
    99         case 10:
   100             {
   101                 if(($__uri.equals("") && $__local.equals("schema"))) {
   102                     $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
   103                     $_ngcc_current_state = 6;
   104                 }
   105                 else {
   106                     unexpectedEnterElement($__qname);
   107                 }
   108             }
   109             break;
   110         default:
   111             {
   112                 unexpectedEnterElement($__qname);
   113             }
   114             break;
   115         }
   116     }
   118     public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
   119         int $ai;
   120         $uri = $__uri;
   121         $localName = $__local;
   122         $qname = $__qname;
   123         switch($_ngcc_current_state) {
   124         case 6:
   125             {
   126                 if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
   127                     $runtime.consumeAttribute($ai);
   128                     $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
   129                 }
   130                 else {
   131                     $_ngcc_current_state = 2;
   132                     $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
   133                 }
   134             }
   135             break;
   136         case 0:
   137             {
   138                 revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname);
   139             }
   140             break;
   141         case 1:
   142             {
   143                 if(($__uri.equals("") && $__local.equals("schema"))) {
   144                     $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
   145                     $_ngcc_current_state = 0;
   146                 }
   147                 else {
   148                     unexpectedLeaveElement($__qname);
   149                 }
   150             }
   151             break;
   152         case 2:
   153             {
   154                 if(($ai = $runtime.getAttributeIndex("","location"))>=0) {
   155                     $runtime.consumeAttribute($ai);
   156                     $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
   157                 }
   158                 else {
   159                     $_ngcc_current_state = 1;
   160                     $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__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 6:
   179             {
   180                 if(($__uri.equals("") && $__local.equals("namespace"))) {
   181                     $_ngcc_current_state = 8;
   182                 }
   183                 else {
   184                     $_ngcc_current_state = 2;
   185                     $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
   186                 }
   187             }
   188             break;
   189         case 0:
   190             {
   191                 revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname);
   192             }
   193             break;
   194         case 2:
   195             {
   196                 if(($__uri.equals("") && $__local.equals("location"))) {
   197                     $_ngcc_current_state = 4;
   198                 }
   199                 else {
   200                     $_ngcc_current_state = 1;
   201                     $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
   202                 }
   203             }
   204             break;
   205         default:
   206             {
   207                 unexpectedEnterAttribute($__qname);
   208             }
   209             break;
   210         }
   211     }
   213     public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
   214         int $ai;
   215         $uri = $__uri;
   216         $localName = $__local;
   217         $qname = $__qname;
   218         switch($_ngcc_current_state) {
   219         case 7:
   220             {
   221                 if(($__uri.equals("") && $__local.equals("namespace"))) {
   222                     $_ngcc_current_state = 2;
   223                 }
   224                 else {
   225                     unexpectedLeaveAttribute($__qname);
   226                 }
   227             }
   228             break;
   229         case 6:
   230             {
   231                 $_ngcc_current_state = 2;
   232                 $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
   233             }
   234             break;
   235         case 0:
   236             {
   237                 revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname);
   238             }
   239             break;
   240         case 2:
   241             {
   242                 $_ngcc_current_state = 1;
   243                 $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
   244             }
   245             break;
   246         case 3:
   247             {
   248                 if(($__uri.equals("") && $__local.equals("location"))) {
   249                     $_ngcc_current_state = 1;
   250                 }
   251                 else {
   252                     unexpectedLeaveAttribute($__qname);
   253                 }
   254             }
   255             break;
   256         default:
   257             {
   258                 unexpectedLeaveAttribute($__qname);
   259             }
   260             break;
   261         }
   262     }
   264     public void text(String $value) throws SAXException {
   265         int $ai;
   266         switch($_ngcc_current_state) {
   267         case 6:
   268             {
   269                 if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
   270                     $runtime.consumeAttribute($ai);
   271                     $runtime.sendText(super._cookie, $value);
   272                 }
   273                 else {
   274                     $_ngcc_current_state = 2;
   275                     $runtime.sendText(super._cookie, $value);
   276                 }
   277             }
   278             break;
   279         case 4:
   280             {
   281                 loc = $value;
   282                 $_ngcc_current_state = 3;
   283                 action0();
   284             }
   285             break;
   286         case 0:
   287             {
   288                 revertToParentFromText(this, super._cookie, $value);
   289             }
   290             break;
   291         case 8:
   292             {
   293                 namespace = $value;
   294                 $_ngcc_current_state = 7;
   295             }
   296             break;
   297         case 2:
   298             {
   299                 if(($ai = $runtime.getAttributeIndex("","location"))>=0) {
   300                     $runtime.consumeAttribute($ai);
   301                     $runtime.sendText(super._cookie, $value);
   302                 }
   303                 else {
   304                     $_ngcc_current_state = 1;
   305                     $runtime.sendText(super._cookie, $value);
   306                 }
   307             }
   308             break;
   309         }
   310     }
   312     public void onChildCompleted(Object result, int cookie, boolean needAttCheck)throws SAXException {
   313         switch(cookie) {
   314         }
   315     }
   317     public boolean accepted() {
   318         return(($_ngcc_current_state == 0));
   319     }
   322        private File location;
   323        private String namespace;
   324        public String getNamespace() { return this.namespace;}
   325        public File getLocation() { return this.location;}
   327 }

mercurial