KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ws > jaxme > xs > xml > XsAGOccurs


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  */

17 package org.apache.ws.jaxme.xs.xml;
18
19 import org.xml.sax.SAXException JavaDoc;
20
21 /** <p>Interface of the attribute group <code>xs:occurs</code>,
22  * as specified by the following:
23  * <pre>
24  * &lt;xs:attributeGroup name="occurs"&gt;
25  * &lt;xs:annotation&gt;
26  * &lt;xs:documentation&gt;
27  * for all particles
28  * &lt;/xs:documentation&gt;
29  * &lt;/xs:annotation&gt;
30  * &lt;xs:attribute name="minOccurs" type="xs:nonNegativeInteger"
31  * use="optional" default="1"/&gt;
32  * &lt;xs:attribute name="maxOccurs" type="xs:allNNI"
33  * use="optional" default="1"/&gt;
34  * &lt;/xs:attributeGroup&gt;
35  * </pre></p>
36  * <p><em>Implementation note:</em> The implementation must ensure
37  * that either 'maxOccurs' is unbounded or 'minOccurs' <= 'maxOccurs'.
38  * This is checked by the <code>validate</code> method.</p>
39  *
40  * @author <a HREF="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
41  */

42 public interface XsAGOccurs {
43   /** <p>Either of 'unbounded' or a nonnegative integer value.</p>
44    */

45   public void setMaxOccurs(String JavaDoc pMaxOccurs);
46   /** <p>-1 for 'unbounded'</p>
47    */

48   public int getMaxOccurs();
49
50   public void setMinOccurs(int pMinOccurs);
51   public int getMinOccurs();
52
53   /** <p>Verifies whether the attribute group constraints are met.</p>
54    */

55   public void validate() throws SAXException JavaDoc;
56 }
57
Popular Tags