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; 20 21 /** <p>Interface of the attribute group <code>xs:occurs</code>, 22 * as specified by the following: 23 * <pre> 24 * <xs:attributeGroup name="occurs"> 25 * <xs:annotation> 26 * <xs:documentation> 27 * for all particles 28 * </xs:documentation> 29 * </xs:annotation> 30 * <xs:attribute name="minOccurs" type="xs:nonNegativeInteger" 31 * use="optional" default="1"/> 32 * <xs:attribute name="maxOccurs" type="xs:allNNI" 33 * use="optional" default="1"/> 34 * </xs:attributeGroup> 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 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; 56 } 57