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 46 public class XsTSimpleExtensionTypeImpl extends XsTAnnotatedImpl implements XsTSimpleExtensionType { 47 private XsQName base; 48 private final XsGAttrDecls attrDecls; 49 50 protected XsTSimpleExtensionTypeImpl(XsObject pParent) { 51 super(pParent); 52 attrDecls = getObjectFactory().newXsGAttrDecls(this); 53 } 54 55 public void setBase(XsQName pBase) { 56 base = pBase; 57 } 58 59 public void setBase(String pBase) throws SAXException { 60 setBase(asXsQName(pBase)); 61 } 62 63 public XsQName getBase() { 64 return base; 65 } 66 67 public void validate() throws SAXException { 68 super.validate(); 69 if (getBase() == null) { 70 throw new LocSAXException("The 'base' attribute must be set.", getLocator()); 71 } 72 } 73 74 public XsTAttribute createAttribute() { 75 return attrDecls.createAttribute(); 76 } 77 78 public XsTAttribute[] getAttributes() { 79 return attrDecls.getAttributes(); 80 } 81 82 public XsTAttributeGroupRef createAttributeGroup() { 83 return attrDecls.createAttributeGroup(); 84 } 85 86 public XsTAttributeGroupRef[] getAttributeGroups() { 87 return attrDecls.getAttributeGroups(); 88 } 89 90 public XsTWildcard createAnyAttribute() { 91 return attrDecls.createAnyAttribute(); 92 } 93 94 public XsTWildcard getAnyAttribute() { 95 return attrDecls.getAnyAttribute(); 96 } 97 98 public Object [] getAllAttributes() { 99 return attrDecls.getAllAttributes(); 100 } 101 } 102 | Popular Tags |