1 17 package org.apache.ws.jaxme.xs.xml.impl; 18 19 import org.apache.ws.jaxme.xs.xml.*; 20 21 22 51 public class XsEComplexContentImpl extends XsTAnnotatedImpl implements XsEComplexContent { 52 private XsTComplexRestrictionType restriction; 53 private XsTExtensionType extension; 54 private Boolean isMixed; 55 56 protected XsEComplexContentImpl(XsObject pParent) { 57 super(pParent); 58 } 59 60 public XsTComplexRestrictionType createRestriction() { 61 if (restriction != null) { 62 throw new IllegalStateException ("Multiple 'restriction' child elements are forbidden."); 63 } 64 if (extension != null) { 65 throw new IllegalStateException ("The 'extension' and 'restriction' child elements are mutually exclusive."); 66 } 67 return restriction = getObjectFactory().newXsTComplexRestrictionType(this); 68 } 69 70 public XsTComplexRestrictionType getRestriction() { 71 return restriction; 72 } 73 74 public XsTExtensionType createExtension() { 75 if (extension != null) { 76 throw new IllegalStateException ("Multiple 'extension' child elements are forbidden."); 77 } 78 if (restriction != null) { 79 throw new IllegalStateException ("The 'extension' and 'restriction' child elements are mutually exclusive."); 80 } 81 return extension = getObjectFactory().newXsTExtensionType(this); 82 } 83 84 public XsTExtensionType getExtension() { 85 return extension; 86 } 87 88 public void setMixed(boolean pMixed) { 89 isMixed = pMixed ? Boolean.TRUE : Boolean.FALSE; 90 } 91 92 public Boolean isMixed() { return isMixed; } 93 } 94 | Popular Tags |