1 17 package org.apache.ws.jaxme.xs.xml.impl; 18 19 import org.apache.ws.jaxme.xs.xml.*; 20 21 22 47 public class XsTRealGroupImpl extends XsTGroupImpl implements XsTRealGroup { 48 protected XsTRealGroupImpl(XsObject pParent) { 49 super(pParent); 50 } 51 52 public XsTGroupRef createGroup() { 53 throw new IllegalStateException ("This group must not reference other groups."); 54 } 55 56 public XsEAny createAny() { 57 throw new IllegalStateException ("This group must not have an an 'any' element."); 58 } 59 60 public XsTLocalElement createElement() { 61 throw new IllegalStateException ("This group must not have an 'element' child element."); 62 } 63 64 public XsESequence createSequence() { 65 return super.createSequence(); 66 } 67 68 public XsEChoice createChoice() { 69 return super.createChoice(); 70 } 71 72 public XsTAll createAll() { 73 return super.createAll(); 74 } 75 76 public void validate() { 77 if (getParticles().length > 1) { 78 throw new IllegalStateException ("This group must have exactly a single 'sequence', 'choice', or 'all' element."); 79 } 80 } 81 } 82 | Popular Tags |