325N/A/*
325N/A * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
325N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
325N/A *
325N/A * This code is free software; you can redistribute it and/or modify it
325N/A * under the terms of the GNU General Public License version 2 only, as
325N/A * published by the Free Software Foundation. Oracle designates this
325N/A * particular file as subject to the "Classpath" exception as provided
325N/A * by Oracle in the LICENSE file that accompanied this code.
325N/A *
325N/A * This code is distributed in the hope that it will be useful, but WITHOUT
325N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
325N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
325N/A * version 2 for more details (a copy is included in the LICENSE file that
325N/A * accompanied this code).
325N/A *
325N/A * You should have received a copy of the GNU General Public License version
325N/A * 2 along with this work; if not, write to the Free Software Foundation,
325N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
325N/A *
325N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
325N/A * or visit www.oracle.com if you need additional information or have any
325N/A * questions.
325N/A */
325N/A
325N/A/* this file is generated by RelaxNGCC */
325N/Apackage com.sun.tools.internal.jxc.gen.config;
325N/Aimport org.xml.sax.SAXException;
325N/Aimport org.xml.sax.XMLReader;
325N/Aimport org.xml.sax.Attributes;
325N/Aimport com.sun.tools.internal.jxc.NGCCRuntimeEx;
325N/A
325N/Aimport java.io.File;
325N/A
325N/A
325N/Apublic class Schema extends NGCCHandler {
325N/A private File baseDir;
325N/A private String loc;
325N/A protected final NGCCRuntimeEx $runtime;
325N/A private int $_ngcc_current_state;
325N/A protected String $uri;
325N/A protected String $localName;
325N/A protected String $qname;
325N/A
325N/A public final NGCCRuntime getRuntime() {
325N/A return($runtime);
325N/A }
325N/A
325N/A public Schema(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie, File _baseDir) {
325N/A super(source, parent, cookie);
325N/A $runtime = runtime;
325N/A this.baseDir = _baseDir;
325N/A $_ngcc_current_state = 10;
325N/A }
325N/A
325N/A public Schema(NGCCRuntimeEx runtime, File _baseDir) {
325N/A this(null, runtime, runtime, -1, _baseDir);
325N/A }
325N/A
325N/A private void action0()throws SAXException {
325N/A location = new File(baseDir,loc);
325N/A}
325N/A
325N/A public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
325N/A int $ai;
325N/A $uri = $__uri;
325N/A $localName = $__local;
325N/A $qname = $__qname;
325N/A switch($_ngcc_current_state) {
325N/A case 2:
325N/A {
325N/A if(($ai = $runtime.getAttributeIndex("","location"))>=0) {
325N/A $runtime.consumeAttribute($ai);
325N/A $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
325N/A }
325N/A else {
325N/A $_ngcc_current_state = 1;
325N/A $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
325N/A }
325N/A }
325N/A break;
325N/A case 6:
325N/A {
325N/A if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
325N/A $runtime.consumeAttribute($ai);
325N/A $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
325N/A }
325N/A else {
325N/A $_ngcc_current_state = 2;
325N/A $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
325N/A }
325N/A }
325N/A break;
325N/A case 10:
325N/A {
325N/A if(($__uri.equals("") && $__local.equals("schema"))) {
325N/A $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs);
325N/A $_ngcc_current_state = 6;
325N/A }
325N/A else {
325N/A unexpectedEnterElement($__qname);
325N/A }
325N/A }
325N/A break;
325N/A case 0:
325N/A {
325N/A revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs);
325N/A }
325N/A break;
325N/A default:
325N/A {
325N/A unexpectedEnterElement($__qname);
325N/A }
325N/A break;
325N/A }
325N/A }
325N/A
325N/A public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
325N/A int $ai;
325N/A $uri = $__uri;
325N/A $localName = $__local;
325N/A $qname = $__qname;
325N/A switch($_ngcc_current_state) {
325N/A case 1:
325N/A {
325N/A if(($__uri.equals("") && $__local.equals("schema"))) {
325N/A $runtime.onLeaveElementConsumed($__uri, $__local, $__qname);
325N/A $_ngcc_current_state = 0;
325N/A }
325N/A else {
325N/A unexpectedLeaveElement($__qname);
325N/A }
325N/A }
325N/A break;
325N/A case 2:
325N/A {
325N/A if(($ai = $runtime.getAttributeIndex("","location"))>=0) {
325N/A $runtime.consumeAttribute($ai);
325N/A $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
325N/A }
325N/A else {
325N/A $_ngcc_current_state = 1;
325N/A $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
325N/A }
325N/A }
325N/A break;
325N/A case 6:
325N/A {
325N/A if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
325N/A $runtime.consumeAttribute($ai);
325N/A $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
325N/A }
325N/A else {
325N/A $_ngcc_current_state = 2;
325N/A $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
325N/A }
325N/A }
325N/A break;
325N/A case 0:
325N/A {
325N/A revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname);
325N/A }
325N/A break;
325N/A default:
325N/A {
325N/A unexpectedLeaveElement($__qname);
325N/A }
325N/A break;
325N/A }
325N/A }
325N/A
325N/A public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
325N/A int $ai;
325N/A $uri = $__uri;
325N/A $localName = $__local;
325N/A $qname = $__qname;
325N/A switch($_ngcc_current_state) {
325N/A case 2:
325N/A {
325N/A if(($__uri.equals("") && $__local.equals("location"))) {
325N/A $_ngcc_current_state = 4;
325N/A }
325N/A else {
325N/A $_ngcc_current_state = 1;
325N/A $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
325N/A }
325N/A }
325N/A break;
325N/A case 6:
325N/A {
325N/A if(($__uri.equals("") && $__local.equals("namespace"))) {
325N/A $_ngcc_current_state = 8;
325N/A }
325N/A else {
325N/A $_ngcc_current_state = 2;
325N/A $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
325N/A }
325N/A }
325N/A break;
325N/A case 0:
325N/A {
325N/A revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname);
325N/A }
325N/A break;
325N/A default:
325N/A {
325N/A unexpectedEnterAttribute($__qname);
325N/A }
325N/A break;
325N/A }
325N/A }
325N/A
325N/A public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
325N/A int $ai;
325N/A $uri = $__uri;
325N/A $localName = $__local;
325N/A $qname = $__qname;
325N/A switch($_ngcc_current_state) {
325N/A case 7:
325N/A {
325N/A if(($__uri.equals("") && $__local.equals("namespace"))) {
325N/A $_ngcc_current_state = 2;
325N/A }
325N/A else {
325N/A unexpectedLeaveAttribute($__qname);
325N/A }
325N/A }
325N/A break;
325N/A case 2:
325N/A {
325N/A $_ngcc_current_state = 1;
325N/A $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
325N/A }
325N/A break;
325N/A case 6:
325N/A {
325N/A $_ngcc_current_state = 2;
325N/A $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
325N/A }
325N/A break;
325N/A case 0:
325N/A {
325N/A revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname);
325N/A }
325N/A break;
325N/A case 3:
325N/A {
325N/A if(($__uri.equals("") && $__local.equals("location"))) {
325N/A $_ngcc_current_state = 1;
325N/A }
325N/A else {
325N/A unexpectedLeaveAttribute($__qname);
325N/A }
325N/A }
325N/A break;
325N/A default:
325N/A {
325N/A unexpectedLeaveAttribute($__qname);
325N/A }
325N/A break;
325N/A }
325N/A }
325N/A
325N/A public void text(String $value) throws SAXException {
325N/A int $ai;
325N/A switch($_ngcc_current_state) {
325N/A case 4:
325N/A {
325N/A loc = $value;
325N/A $_ngcc_current_state = 3;
325N/A action0();
325N/A }
325N/A break;
325N/A case 2:
325N/A {
325N/A if(($ai = $runtime.getAttributeIndex("","location"))>=0) {
325N/A $runtime.consumeAttribute($ai);
325N/A $runtime.sendText(super._cookie, $value);
325N/A }
325N/A else {
325N/A $_ngcc_current_state = 1;
325N/A $runtime.sendText(super._cookie, $value);
325N/A }
325N/A }
325N/A break;
325N/A case 8:
325N/A {
325N/A namespace = $value;
325N/A $_ngcc_current_state = 7;
325N/A }
325N/A break;
325N/A case 6:
325N/A {
325N/A if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) {
325N/A $runtime.consumeAttribute($ai);
325N/A $runtime.sendText(super._cookie, $value);
325N/A }
325N/A else {
325N/A $_ngcc_current_state = 2;
325N/A $runtime.sendText(super._cookie, $value);
325N/A }
325N/A }
325N/A break;
325N/A case 0:
325N/A {
325N/A revertToParentFromText(this, super._cookie, $value);
325N/A }
325N/A break;
325N/A }
325N/A }
325N/A
325N/A public void onChildCompleted(Object result, int cookie, boolean needAttCheck)throws SAXException {
325N/A switch(cookie) {
325N/A }
325N/A }
325N/A
325N/A public boolean accepted() {
325N/A return(($_ngcc_current_state == 0));
325N/A }
325N/A
325N/A
325N/A private File location;
325N/A private String namespace;
325N/A public String getNamespace() { return this.namespace;}
325N/A public File getLocation() { return this.location;}
325N/A
325N/A}