private void setYoziGroups(Element generalElement, GenericCharacterTemplate characterTemplate)
     throws PersistenceException {
   Element yoziGroupElement = generalElement.element(TAG_YOZI_GROUPS);
   if (yoziGroupElement == null) {
     GenericGroupedTraitTypeProvider provider =
         new GenericGroupedTraitTypeProvider(AllYoziTraitTypeGroup.getInstance());
     List<String> emptyList = new ArrayList<String>();
     for (YoziType yozi : YoziType.values())
       provider.addGroupedAbilityType(yozi.getId(), yozi.getId(), null, emptyList);
     characterTemplate.setYoziGroups(provider.getTraitTypeGroups());
     return;
   }
   IXmlTemplateRegistry<GenericGroupedTraitTypeProvider> registry =
       registryCollection.getTraitGroupTemplateRegistry();
   TraitTypeGroupTemplateParser parser =
       new TraitTypeGroupTemplateParser(registry, AllYoziTraitTypeGroup.getInstance());
   GenericGroupedTraitTypeProvider yoziGroups = parser.parseTemplate(yoziGroupElement);
   characterTemplate.setYoziGroups(yoziGroups.getTraitTypeGroups());
 }
 private void setAbilityGroups(Element generalElement, GenericCharacterTemplate characterTemplate)
     throws PersistenceException {
   Element abilityGroupElement = generalElement.element(TAG_ABILITY_GROUPS);
   if (abilityGroupElement == null) {
     return;
   }
   IXmlTemplateRegistry<GenericGroupedTraitTypeProvider> registry =
       registryCollection.getTraitGroupTemplateRegistry();
   TraitTypeGroupTemplateParser parser =
       new TraitTypeGroupTemplateParser(registry, AllAbilityTraitTypeGroup.getInstance());
   GenericGroupedTraitTypeProvider abilityGroups = parser.parseTemplate(abilityGroupElement);
   characterTemplate.setAbilityGroups(abilityGroups.getTraitTypeGroups());
 }