KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ws > jaxme > generator > sg > ParticleSG


1 /*
2  * Copyright 2003, 2004 The Apache Software Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.ws.jaxme.generator.sg;
17
18 import org.apache.ws.jaxme.js.DirectAccessible;
19 import org.apache.ws.jaxme.js.JavaMethod;
20 import org.apache.ws.jaxme.generator.sg.GroupSG;
21 import org.apache.ws.jaxme.generator.sg.ObjectSG;
22 import org.apache.ws.jaxme.generator.sg.PropertySG;
23 import org.apache.ws.jaxme.generator.sg.SGlet;
24 import org.xml.sax.Locator JavaDoc;
25 import org.xml.sax.SAXException JavaDoc;
26
27
28 /** Interface of a particle.
29  */

30 public interface ParticleSG {
31     /** <p>Initializes the ParticleSG.</p>
32      */

33     public void init() throws SAXException JavaDoc;
34
35     /** <p>Returns the particles locator.</p>
36      */

37     public Locator JavaDoc getLocator();
38     
39     /** <p>Returns whether the pariticle is a group. If so, you may use the
40      * {@link #getGroupSG()} method.</p>
41      * @see #getGroupSG()
42      */

43     public boolean isGroup();
44     
45     /** <p>Returns whether the particle is an element. If so, you may use the
46      * {@link #getObjectSG()} method.</p>
47      * @see #getObjectSG()
48      */

49     public boolean isElement();
50     
51     /** <p>Returns whether the particle is a wildcard. If so, you may use the
52      * {@link #getObjectSG()} method.</p>
53      * @see #getObjectSG()
54      */

55     public boolean isWildcard();
56     
57     /** <p>If the particle is a group, returns the particles {@link GroupSG}.</p>
58      * @throws IllegalStateException The particle is no group.
59      * @see #isGroup()
60      */

61     public GroupSG getGroupSG();
62     
63     /** <p>If the particle is an element or wildcard, returns the particles {@link ObjectSG}.</p>
64      * @throws IllegalStateException The particle is neither an element nor a wildcard
65      * @see #isElement()
66      * @see #isWildcard()
67      */

68     public ObjectSG getObjectSG();
69     
70     /** <p>Returns the particles minOccurs value.</p>
71      * @see #getMaxOccurs()
72      */

73     public int getMinOccurs();
74     
75     /** <p>Returns the particles maxOccurs value; -1 indicated "unbounded".</p>
76      * @see #isMultiple()
77      * @see #getMinOccurs()
78      */

79     public int getMaxOccurs();
80     
81     /** <p>Returns whether the particles multiplicity is 2 or greater.</p>
82      * @see #getMaxOccurs()
83      */

84     public boolean isMultiple();
85     
86     /** <p>Creates a new instance of {@link org.apache.ws.jaxme.generator.sg.PropertySGChain}.</p>
87      */

88     public Object JavaDoc newPropertySGChain() throws SAXException JavaDoc;
89
90     /** <p>Returns an instance of {@link org.apache.ws.jaxme.generator.sg.PropertySG}.</p>
91      */

92     public PropertySG getPropertySG() throws SAXException JavaDoc;
93     
94     /** <p>Invokes the given {@link SGlet} for all non null values.</p>
95      */

96     public void forAllNonNullValues(JavaMethod pMethod, DirectAccessible pElement, SGlet pSGlet) throws SAXException JavaDoc;
97 }
98
Popular Tags