1 17 package org.apache.ws.jaxme.xs.xml.impl; 18 19 import org.apache.ws.jaxme.xs.parser.impl.LocSAXException; 20 import org.apache.ws.jaxme.xs.xml.*; 21 import org.xml.sax.SAXException ; 22 23 24 44 public class XsTRestrictionTypeImpl extends XsTAnnotatedImpl 45 implements XsTRestrictionType { 46 private XsQName base; 47 private final XsGTypeDefParticle typeDefParticle; 48 private final XsGSimpleRestrictionModel simpleRestrictionModel; 49 private final XsGAttrDecls attrDecls; 50 51 protected XsTRestrictionTypeImpl(XsObject pParent) { 52 super(pParent); 53 typeDefParticle = getObjectFactory().newXsGTypeDefParticle(this); 54 simpleRestrictionModel = getObjectFactory().newXsGSimpleRestrictionModel(this); 55 attrDecls = getObjectFactory().newXsGAttrDecls(this); 56 } 57 58 public void setBase(XsQName pBase) { 59 base = pBase; 60 } 61 62 public void setBase(String pBase) throws SAXException { 63 setBase(asXsQName(pBase)); 64 } 65 66 public XsQName getBase() { 67 return base; 68 } 69 70 public XsTGroupRef createGroup() { 71 return typeDefParticle.createGroup(); 72 } 73 74 public XsTAll createAll() { 75 return typeDefParticle.createAll(); 76 } 77 78 public XsESequence createSequence() { 79 return typeDefParticle.createSequence(); 80 } 81 82 public XsEChoice createChoice() { 83 return typeDefParticle.createChoice(); 84 } 85 86 public XsTTypeDefParticle getTypeDefParticle() { 87 return typeDefParticle.getTypeDefParticle(); 88 } 89 90 public XsTLocalSimpleType createSimpleType() throws SAXException { 91 return simpleRestrictionModel.createSimpleType(); 92 } 93 94 public XsTLocalSimpleType getSimpleType() { 95 return simpleRestrictionModel.getSimpleType(); 96 } 97 98 public XsEMinExclusive createMinExclusive() throws SAXException { 99 return simpleRestrictionModel.createMinExclusive(); 100 } 101 102 public XsEMinExclusive getMinExclusive() { 103 return simpleRestrictionModel.getMinExclusive(); 104 } 105 106 public XsEMinInclusive createMinInclusive() throws SAXException { 107 return simpleRestrictionModel.createMinInclusive(); 108 } 109 110 public XsEMinInclusive getMinInclusive() { 111 return simpleRestrictionModel.getMinInclusive(); 112 } 113 114 public XsEMaxExclusive createMaxExclusive() throws SAXException { 115 return simpleRestrictionModel.createMaxExclusive(); 116 } 117 118 public XsEMaxExclusive getMaxExclusive() { 119 return simpleRestrictionModel.getMaxExclusive(); 120 } 121 122 public XsEMaxInclusive createMaxInclusive() throws SAXException { 123 return simpleRestrictionModel.createMaxInclusive(); 124 } 125 126 public XsEMaxInclusive getMaxInclusive() { 127 return simpleRestrictionModel.getMaxInclusive(); 128 } 129 130 public XsETotalDigits createTotalDigits() throws SAXException { 131 return simpleRestrictionModel.createTotalDigits(); 132 } 133 134 public XsETotalDigits getTotalDigits() { 135 return simpleRestrictionModel.getTotalDigits(); 136 } 137 138 public XsEFractionDigits createFractionDigits() throws SAXException { 139 return simpleRestrictionModel.createFractionDigits(); 140 } 141 142 public XsEFractionDigits getFractionDigits() { 143 return simpleRestrictionModel.getFractionDigits(); 144 } 145 146 public XsELength createLength() throws SAXException { 147 return simpleRestrictionModel.createLength(); 148 } 149 150 public XsELength getLength() { 151 return simpleRestrictionModel.getLength(); 152 } 153 154 public XsEMinLength createMinLength() throws SAXException { 155 return simpleRestrictionModel.createMinLength(); 156 } 157 158 public XsEMinLength getMinLength() { 159 return simpleRestrictionModel.getMinLength(); 160 } 161 162 public XsEMaxLength createMaxLength() throws SAXException { 163 return simpleRestrictionModel.createMaxLength(); 164 } 165 166 public XsEMaxLength getMaxLength() { 167 return simpleRestrictionModel.getMaxLength(); 168 } 169 170 public XsEWhiteSpace createWhiteSpace() throws SAXException { 171 return simpleRestrictionModel.createWhiteSpace(); 172 } 173 174 public XsEWhiteSpace getWhiteSpace() { 175 return simpleRestrictionModel.getWhiteSpace(); 176 } 177 178 public XsEPattern createPattern() throws SAXException { 179 return simpleRestrictionModel.createPattern(); 180 } 181 182 public XsEPattern[] getPatterns() { 183 return simpleRestrictionModel.getPatterns(); 184 } 185 186 public XsEEnumeration createEnumeration() throws SAXException { 187 return simpleRestrictionModel.createEnumeration(); 188 } 189 190 public XsEEnumeration[] getEnumerations() { 191 return simpleRestrictionModel.getEnumerations(); 192 } 193 194 public boolean hasFacets() { 195 return simpleRestrictionModel.hasFacets(); 196 } 197 198 public XsTFacetBase[] getFacets() { 199 return simpleRestrictionModel.getFacets(); 200 } 201 202 public XsTAttribute createAttribute() { 203 return attrDecls.createAttribute(); 204 } 205 206 public XsTAttribute[] getAttributes() { 207 return attrDecls.getAttributes(); 208 } 209 210 public XsTAttributeGroupRef createAttributeGroup() { 211 return attrDecls.createAttributeGroup(); 212 } 213 214 public XsTAttributeGroupRef[] getAttributeGroups() { 215 return attrDecls.getAttributeGroups(); 216 } 217 218 public XsTWildcard createAnyAttribute() { 219 return attrDecls.createAnyAttribute(); 220 } 221 222 public XsTWildcard getAnyAttribute() { 223 return attrDecls.getAnyAttribute(); 224 } 225 226 public Object [] getAllAttributes() { 227 return attrDecls.getAllAttributes(); 228 } 229 230 public void validate() throws SAXException { 231 super.validate(); 232 if (base == null) { 233 throw new LocSAXException("The 'base' attribute must be set.", getLocator()); 234 } 235 } 236 } 237 | Popular Tags |