1/*
2 * Copyright (c) 1997, 2013, 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 */
25
26/* this file is generated by RelaxNGCC */
27package com.sun.xml.internal.xsom.impl.parser.state;
28import org.xml.sax.SAXException;
29import org.xml.sax.XMLReader;
30import org.xml.sax.Attributes;
31import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
32
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;
42
43
44
45class complexType_complexContent_body extends NGCCHandler {
46    private AttributesHolder owner;
47    protected final NGCCRuntimeEx $runtime;
48    private int $_ngcc_current_state;
49    protected String $uri;
50    protected String $localName;
51    protected String $qname;
52
53    public final NGCCRuntime getRuntime() {
54        return($runtime);
55    }
56
57    public complexType_complexContent_body(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie, AttributesHolder _owner) {
58        super(source, parent, cookie);
59        $runtime = runtime;
60        this.owner = _owner;
61        $_ngcc_current_state = 2;
62    }
63
64    public complexType_complexContent_body(NGCCRuntimeEx runtime, AttributesHolder _owner) {
65        this(null, runtime, runtime, -1, _owner);
66    }
67
68    private void action0()throws SAXException {
69        if(particle==null)
70          particle = $runtime.parser.schemaSet.empty;
71}
72
73    public void enterElement(String $__uri, String $__local, String $__qname, Attributes $attrs) throws SAXException {
74        int $ai;
75        $uri = $__uri;
76        $localName = $__local;
77        $qname = $__qname;
78        switch($_ngcc_current_state) {
79        case 1:
80            {
81                if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attributeGroup")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("anyAttribute")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("attribute"))))) {
82                    NGCCHandler h = new attributeUses(this, super._source, $runtime, 1, owner);
83                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
84                }
85                else {
86                    NGCCHandler h = new attributeUses(this, super._source, $runtime, 1, owner);
87                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
88                }
89            }
90            break;
91        case 0:
92            {
93                revertToParentFromEnterElement(particle, super._cookie, $__uri, $__local, $__qname, $attrs);
94            }
95            break;
96        case 2:
97            {
98                if((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("group")) || (($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("element")) || (((($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("all")) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("choice"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("sequence"))) || ($__uri.equals("http://www.w3.org/2001/XMLSchema") && $__local.equals("any")))))) {
99                    NGCCHandler h = new particle(this, super._source, $runtime, 3);
100                    spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs);
101                }
102                else {
103                    $_ngcc_current_state = 1;
104                    $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs);
105                }
106            }
107            break;
108        default:
109            {
110                unexpectedEnterElement($__qname);
111            }
112            break;
113        }
114    }
115
116    public void leaveElement(String $__uri, String $__local, String $__qname) throws SAXException {
117        int $ai;
118        $uri = $__uri;
119        $localName = $__local;
120        $qname = $__qname;
121        switch($_ngcc_current_state) {
122        case 1:
123            {
124                NGCCHandler h = new attributeUses(this, super._source, $runtime, 1, owner);
125                spawnChildFromLeaveElement(h, $__uri, $__local, $__qname);
126            }
127            break;
128        case 0:
129            {
130                revertToParentFromLeaveElement(particle, super._cookie, $__uri, $__local, $__qname);
131            }
132            break;
133        case 2:
134            {
135                $_ngcc_current_state = 1;
136                $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname);
137            }
138            break;
139        default:
140            {
141                unexpectedLeaveElement($__qname);
142            }
143            break;
144        }
145    }
146
147    public void enterAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
148        int $ai;
149        $uri = $__uri;
150        $localName = $__local;
151        $qname = $__qname;
152        switch($_ngcc_current_state) {
153        case 1:
154            {
155                NGCCHandler h = new attributeUses(this, super._source, $runtime, 1, owner);
156                spawnChildFromEnterAttribute(h, $__uri, $__local, $__qname);
157            }
158            break;
159        case 0:
160            {
161                revertToParentFromEnterAttribute(particle, super._cookie, $__uri, $__local, $__qname);
162            }
163            break;
164        case 2:
165            {
166                $_ngcc_current_state = 1;
167                $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname);
168            }
169            break;
170        default:
171            {
172                unexpectedEnterAttribute($__qname);
173            }
174            break;
175        }
176    }
177
178    public void leaveAttribute(String $__uri, String $__local, String $__qname) throws SAXException {
179        int $ai;
180        $uri = $__uri;
181        $localName = $__local;
182        $qname = $__qname;
183        switch($_ngcc_current_state) {
184        case 1:
185            {
186                NGCCHandler h = new attributeUses(this, super._source, $runtime, 1, owner);
187                spawnChildFromLeaveAttribute(h, $__uri, $__local, $__qname);
188            }
189            break;
190        case 0:
191            {
192                revertToParentFromLeaveAttribute(particle, super._cookie, $__uri, $__local, $__qname);
193            }
194            break;
195        case 2:
196            {
197                $_ngcc_current_state = 1;
198                $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname);
199            }
200            break;
201        default:
202            {
203                unexpectedLeaveAttribute($__qname);
204            }
205            break;
206        }
207    }
208
209    public void text(String $value) throws SAXException {
210        int $ai;
211        switch($_ngcc_current_state) {
212        case 1:
213            {
214                NGCCHandler h = new attributeUses(this, super._source, $runtime, 1, owner);
215                spawnChildFromText(h, $value);
216            }
217            break;
218        case 0:
219            {
220                revertToParentFromText(particle, super._cookie, $value);
221            }
222            break;
223        case 2:
224            {
225                $_ngcc_current_state = 1;
226                $runtime.sendText(super._cookie, $value);
227            }
228            break;
229        }
230    }
231
232    public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
233        switch($__cookie__) {
234        case 1:
235            {
236                action0();
237                $_ngcc_current_state = 0;
238            }
239            break;
240        case 3:
241            {
242                particle = ((ParticleImpl)$__result__);
243                $_ngcc_current_state = 1;
244            }
245            break;
246        }
247    }
248
249    public boolean accepted() {
250        return(($_ngcc_current_state == 0));
251    }
252
253
254      private ContentTypeImpl particle;
255
256}
257