private GroupBeanSG newBeanSG(GroupSG pGroup) throws SAXException {
if (pGroup.isSequence()) {
return new SequenceBeanSG(ctSG, pGroup, null);
} else if (pGroup.isChoice()) {
return new ChoiceBeanSG(ctSG, pGroup, null);
} else if (pGroup.isAll()) {
return new AllBeanSG(ctSG, pGroup, null);
} else {
throw new IllegalStateException("Invalid group type");
}