1 17 package org.apache.ws.jaxme.xs.impl; 18 19 import org.apache.ws.jaxme.xs.XSAnnotation; 20 import org.apache.ws.jaxme.xs.XSEnumeration; 21 import org.apache.ws.jaxme.xs.XSObject; 22 import org.apache.ws.jaxme.xs.xml.XsEAnnotation; 23 import org.apache.ws.jaxme.xs.xml.XsEEnumeration; 24 import org.xml.sax.SAXException ; 25 26 27 32 public class XSEnumerationImpl extends XSObjectImpl implements XSEnumeration { 33 private final XSAnnotation[] annotations; 34 35 37 public XSEnumerationImpl(XSObject pParent, XsEEnumeration pBaseEnumeration) throws SAXException { 38 super(pParent, pBaseEnumeration); 39 if (pBaseEnumeration.getValue() == null) { 40 throw new NullPointerException ("Missing attribute: 'value'"); 41 } 42 XsEAnnotation xsAnnotation = pBaseEnumeration.getAnnotation(); 43 if (xsAnnotation == null) { 44 annotations = new XSAnnotation[0]; 45 } else { 46 annotations = new XSAnnotation[]{getXSSchema().getXSObjectFactory().newXSAnnotation(this, xsAnnotation)}; 47 } 48 } 49 50 public String getValue() { return ((XsEEnumeration) getXsObject()).getValue(); } 51 52 public XSAnnotation[] getAnnotations() { return annotations; } 53 } 54 | Popular Tags |