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

Print this page




  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  */
  25 
  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;
  32 
  33 import java.io.File;
  34 
  35 




  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;
  44 
  45     public final NGCCRuntime getRuntime() {
  46         return($runtime);
  47     }
  48 
  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     }
  55 
  56     public Schema(NGCCRuntimeEx runtime, File _baseDir) {
  57         this(null, runtime, runtime, -1, _baseDir);
  58     }
  59 
  60     private void action0()throws SAXException {
  61         location = new File(baseDir,loc);
  62 }
  63 
  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 0:
  71             {
  72                 revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
  73             }
  74             break;
  75         case 6:
  76             {
  77                 if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
  78                     $runtime.consumeAttribute($ai);
  79                     $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
  80                 }
  81                 else {
  82                     $_ngcc_current_state = 2;
  83                     $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
  84                 }
  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     }
 117 
 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 0:
 125             {
 126                 revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname);
 127             }
 128             break;
 129         case 6:
 130             {
 131                 if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
 132                     $runtime.consumeAttribute($ai);
 133                     $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
 134                 }
 135                 else {
 136                     $_ngcc_current_state = 2;
 137                     $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
 138                 }
 139             }
 140             break;





 141         case 2:
 142             {
 143                 if(($ai = $runtime.getAttributeIndex("","location"))>=0) {
 144                     $runtime.consumeAttribute($ai);
 145                     $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
 146                 }
 147                 else {
 148                     $_ngcc_current_state = 1;
 149                     $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
 150                 }
 151             }
 152             break;
 153         case 1:
 154             {
 155                 if(($__uri.equals("") && $__local.equals("schema"))) {
 156                     $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
 157                     $_ngcc_current_state = 0;
 158                 }
 159                 else {
 160                     unexpectedLeaveElement($__qname);

 161                 }
 162             }
 163             break;
 164         default:
 165             {
 166                 unexpectedLeaveElement($__qname);
 167             }
 168             break;
 169         }
 170     }
 171 
 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 0:
 179             {
 180                 revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname);
 181             }
 182             break;
 183         case 6:
 184             {
 185                 if(($__uri.equals("") && $__local.equals("namespace"))) {
 186                     $_ngcc_current_state = 8;
 187                 }
 188                 else {
 189                     $_ngcc_current_state = 2;
 190                     $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
 191                 }
 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     }
 212 
 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 0:
 220             {
 221                 revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname);
 222             }
 223             break;
 224         case 7:
 225             {
 226                 if(($__uri.equals("") && $__local.equals("namespace"))) {
 227                     $_ngcc_current_state = 2;
 228                 }
 229                 else {
 230                     unexpectedLeaveAttribute($__qname);
 231                 }
 232             }
 233             break;
 234         case 6:
 235             {

 236                 $_ngcc_current_state = 2;
 237                 $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
 238             }
 239             break;
 240         case 3:
 241             {
 242                 if(($__uri.equals("") && $__local.equals("location"))) {
 243                     $_ngcc_current_state = 1;
 244                 }
 245                 else {
 246                     unexpectedLeaveAttribute($__qname);
 247                 }
 248             }
 249             break;
 250         case 2:
 251             {
 252                 $_ngcc_current_state = 1;
 253                 $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
 254             }
 255             break;






 256         default:
 257             {
 258                 unexpectedLeaveAttribute($__qname);
 259             }
 260             break;
 261         }
 262     }
 263 
 264     public void text(String $value) throws SAXException {
 265         int $ai;
 266         switch($_ngcc_current_state) {
 267         case 8:
 268             {
 269                 namespace = $value;
 270                 $_ngcc_current_state = 7;
 271             }
 272             break;







 273         case 0:
 274             {
 275                 revertToParentFromText(this, super._cookie, $value);
 276             }
 277             break;
 278         case 6:
 279             {
 280                 if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
 281                     $runtime.consumeAttribute($ai);
 282                     $runtime.sendText(super._cookie, $value);
 283                 }
 284                 else {
 285                     $_ngcc_current_state = 2;
 286                     $runtime.sendText(super._cookie, $value);
 287                 }
 288             }
 289             break;
 290         case 4:
 291             {
 292                 loc = $value;
 293                 $_ngcc_current_state = 3;
 294                 action0();
 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     }
 311 
 312     public void onChildCompleted(Object result, int cookie, boolean needAttCheck)throws SAXException {
 313         switch(cookie) {
 314         }
 315     }
 316 
 317     public boolean accepted() {
 318         return(($_ngcc_current_state == 0));
 319     }
 320 
 321 
 322        private File location;
 323        private String namespace;
 324        public String getNamespace() { return this.namespace;}


  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  */
  25 
  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;
  32 
  33 import java.io.File;
  34 
  35 /**
  36  * <p><b>
  37  *     Auto-generated, do not edit.
  38  * </b></p>
  39  */
  40 public class Schema extends NGCCHandler {
  41     private File baseDir;
  42     private String loc;
  43     protected final NGCCRuntimeEx $runtime;
  44     private int $_ngcc_current_state;
  45     protected String $uri;
  46     protected String $localName;
  47     protected String $qname;
  48 
  49     public final NGCCRuntime getRuntime() {
  50         return($runtime);
  51     }
  52 
  53     public Schema(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie, File _baseDir) {
  54         super(source, parent, cookie);
  55         $runtime = runtime;
  56         this.baseDir = _baseDir;
  57         $_ngcc_current_state = 10;
  58     }
  59 
  60     public Schema(NGCCRuntimeEx runtime, File _baseDir) {
  61         this(null, runtime, runtime, -1, _baseDir);
  62     }
  63 
  64     private void action0()throws SAXException {
  65         location = new File(baseDir,loc);
  66 }
  67 
  68     public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
  69         int $ai;
  70         $uri = $__uri;
  71         $localName = $__local;
  72         $qname = $__qname;
  73         switch($_ngcc_current_state) {
  74         case 0:
  75             {
  76                 revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
  77             }
  78             break;
  79         case 2:
  80             {
  81                 if(($ai = $runtime.getAttributeIndex("","location"))>=0) {
  82                     $runtime.consumeAttribute($ai);
  83                     $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
  84                 }
  85                 else {
  86                     $_ngcc_current_state = 1;
  87                     $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
  88                 }
  89             }
  90             break;
  91         case 6:
  92             {
  93                 if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
  94                     $runtime.consumeAttribute($ai);
  95                     $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
  96                 }
  97                 else {
  98                     $_ngcc_current_state = 2;
  99                     $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
 100                 }
 101             }
 102             break;
 103         case 10:
 104             {
 105                 if(($__uri.equals("") && $__local.equals("schema"))) {
 106                     $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
 107                     $_ngcc_current_state = 6;
 108                 }
 109                 else {
 110                     unexpectedEnterElement($__qname);
 111                 }
 112             }
 113             break;
 114         default:
 115             {
 116                 unexpectedEnterElement($__qname);
 117             }
 118             break;
 119         }
 120     }
 121 
 122     public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
 123         int $ai;
 124         $uri = $__uri;
 125         $localName = $__local;
 126         $qname = $__qname;
 127         switch($_ngcc_current_state) {
 128         case 1:





 129             {
 130                 if(($__uri.equals("") && $__local.equals("schema"))) {
 131                     $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
 132                     $_ngcc_current_state = 0;
 133                 }
 134                 else {
 135                     unexpectedLeaveElement($__qname);

 136                 }
 137             }
 138             break;
 139         case 0:
 140             {
 141                 revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname);
 142             }
 143             break;
 144         case 2:
 145             {
 146                 if(($ai = $runtime.getAttributeIndex("","location"))>=0) {
 147                     $runtime.consumeAttribute($ai);
 148                     $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
 149                 }
 150                 else {
 151                     $_ngcc_current_state = 1;
 152                     $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
 153                 }
 154             }
 155             break;
 156         case 6:
 157             {
 158                 if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
 159                     $runtime.consumeAttribute($ai);
 160                     $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
 161                 }
 162                 else {
 163                     $_ngcc_current_state = 2;
 164                     $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
 165                 }
 166             }
 167             break;
 168         default:
 169             {
 170                 unexpectedLeaveElement($__qname);
 171             }
 172             break;
 173         }
 174     }
 175 
 176     public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
 177         int $ai;
 178         $uri = $__uri;
 179         $localName = $__local;
 180         $qname = $__qname;
 181         switch($_ngcc_current_state) {
 182         case 0:
 183             {
 184                 revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname);
 185             }
 186             break;
 187         case 2:
 188             {
 189                 if(($__uri.equals("") && $__local.equals("location"))) {
 190                     $_ngcc_current_state = 4;
 191                 }
 192                 else {
 193                     $_ngcc_current_state = 1;
 194                     $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
 195                 }
 196             }
 197             break;
 198         case 6:
 199             {
 200                 if(($__uri.equals("") && $__local.equals("namespace"))) {
 201                     $_ngcc_current_state = 8;
 202                 }
 203                 else {
 204                     $_ngcc_current_state = 2;
 205                     $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
 206                 }
 207             }
 208             break;
 209         default:
 210             {
 211                 unexpectedEnterAttribute($__qname);
 212             }
 213             break;
 214         }
 215     }
 216 
 217     public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
 218         int $ai;
 219         $uri = $__uri;
 220         $localName = $__local;
 221         $qname = $__qname;
 222         switch($_ngcc_current_state) {
 223         case 0:
 224             {
 225                 revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname);
 226             }
 227             break;
 228         case 3:
 229             {
 230                 if(($__uri.equals("") && $__local.equals("location"))) {
 231                     $_ngcc_current_state = 1;
 232                 }
 233                 else {
 234                     unexpectedLeaveAttribute($__qname);
 235                 }
 236             }
 237             break;
 238         case 7:
 239             {
 240                 if(($__uri.equals("") && $__local.equals("namespace"))) {
 241                     $_ngcc_current_state = 2;







 242                 }
 243                 else {
 244                     unexpectedLeaveAttribute($__qname);
 245                 }
 246             }
 247             break;
 248         case 2:
 249             {
 250                 $_ngcc_current_state = 1;
 251                 $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
 252             }
 253             break;
 254         case 6:
 255             {
 256                 $_ngcc_current_state = 2;
 257                 $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
 258             }
 259             break;
 260         default:
 261             {
 262                 unexpectedLeaveAttribute($__qname);
 263             }
 264             break;
 265         }
 266     }
 267 
 268     public void text(String $value) throws SAXException {
 269         int $ai;
 270         switch($_ngcc_current_state) {
 271         case 8:
 272             {
 273                 namespace = $value;
 274                 $_ngcc_current_state = 7;
 275             }
 276             break;
 277         case 4:
 278             {
 279                 loc = $value;
 280                 $_ngcc_current_state = 3;
 281                 action0();
 282             }
 283             break;
 284         case 0:
 285             {
 286                 revertToParentFromText(this, super._cookie, $value);
 287             }
 288             break;
 289         case 2:
 290             {
 291                 if(($ai = $runtime.getAttributeIndex("","location"))>=0) {
 292                     $runtime.consumeAttribute($ai);
 293                     $runtime.sendText(super._cookie, $value);
 294                 }
 295                 else {
 296                     $_ngcc_current_state = 1;
 297                     $runtime.sendText(super._cookie, $value);
 298                 }
 299             }
 300             break;
 301         case 6:







 302             {
 303                 if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
 304                     $runtime.consumeAttribute($ai);
 305                     $runtime.sendText(super._cookie, $value);
 306                 }
 307                 else {
 308                     $_ngcc_current_state = 2;
 309                     $runtime.sendText(super._cookie, $value);
 310                 }
 311             }
 312             break;
 313         }
 314     }
 315 
 316     public void onChildCompleted(Object result, int cookie, boolean needAttCheck)throws SAXException {
 317         switch(cookie) {
 318         }
 319     }
 320 
 321     public boolean accepted() {
 322         return(($_ngcc_current_state == 0));
 323     }
 324 
 325 
 326        private File location;
 327        private String namespace;
 328        public String getNamespace() { return this.namespace;}