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 22 /** <p>Interface of <code>xs:simpleRestrictionModel</code>, following 23 * this specification: 24 * <pre> 25 * <xs:group name="simpleRestrictionModel"> 26 * <xs:sequence> 27 * <xs:element name="simpleType" type="xs:localSimpleType" minOccurs="0"/> 28 * <xs:group ref="xs:facets" minOccurs="0" maxOccurs="unbounded"/> 29 * </xs:sequence> 30 * </xs:group> 31 * 32 * <xs:group name="facets"> 33 * <xs:annotation> 34 * <xs:documentation> 35 * We should use a substitution group for facets, but 36 * that's ruled out because it would allow users to 37 * add their own, which we're not ready for yet. 38 * </xs:documentation> 39 * </xs:annotation> 40 * <xs:choice> 41 * <xs:element ref="xs:minExclusive"/> 42 * <xs:element ref="xs:minInclusive"/> 43 * <xs:element ref="xs:maxExclusive"/> 44 * <xs:element ref="xs:maxInclusive"/> 45 * <xs:element ref="xs:totalDigits"/> 46 * <xs:element ref="xs:fractionDigits"/> 47 * <xs:element ref="xs:length"/> 48 * <xs:element ref="xs:minLength"/> 49 * <xs:element ref="xs:maxLength"/> 50 * <xs:element ref="xs:enumeration"/> 51 * <xs:element ref="xs:whiteSpace"/> 52 * <xs:element ref="xs:pattern"/> 53 * </xs:choice> 54 * </xs:group> 55 * </pre></p> 56 * 57 * @author <a HREF="mailto:joe@ispsoft.de">Jochen Wiedmann</a> 58 */ 59 public interface XsGSimpleRestrictionModel { 60 public XsTLocalSimpleType createSimpleType() throws SAXException; 61 public XsTLocalSimpleType getSimpleType(); 62 63 public XsEMinExclusive createMinExclusive() throws SAXException; 64 public XsEMinExclusive getMinExclusive(); 65 66 public XsEMinInclusive createMinInclusive() throws SAXException; 67 public XsEMinInclusive getMinInclusive(); 68 69 public XsEMaxExclusive createMaxExclusive() throws SAXException; 70 public XsEMaxExclusive getMaxExclusive(); 71 72 public XsEMaxInclusive createMaxInclusive() throws SAXException; 73 public XsEMaxInclusive getMaxInclusive(); 74 75 public XsETotalDigits createTotalDigits() throws SAXException; 76 public XsETotalDigits getTotalDigits(); 77 78 public XsEFractionDigits createFractionDigits() throws SAXException; 79 public XsEFractionDigits getFractionDigits(); 80 81 public XsELength createLength() throws SAXException; 82 public XsELength getLength(); 83 84 public XsEMinLength createMinLength() throws SAXException; 85 public XsEMinLength getMinLength(); 86 87 public XsEMaxLength createMaxLength() throws SAXException; 88 public XsEMaxLength getMaxLength(); 89 90 public XsEWhiteSpace createWhiteSpace() throws SAXException; 91 public XsEWhiteSpace getWhiteSpace(); 92 93 public XsEPattern createPattern() throws SAXException; 94 public XsEPattern[] getPatterns(); 95 96 public XsEEnumeration createEnumeration() throws SAXException; 97 public XsEEnumeration[] getEnumerations(); 98 99 /** <p>Returns whether any facet has been defined.</p> 100 */ 101 public boolean hasFacets(); 102 103 /** <p>Returns an array of all facets.</p> 104 */ 105 public XsTFacetBase[] getFacets(); 106 } 107