public static void addFeatureGroupDepBody(FeatureGroupSupport dep, final ElementNode depE, String ns) { if(dep.getName() != null) { addAttribute(depE, Attribute.NAME, dep.getName()); } if(!dep.isInheritFeatures()) { addAttribute(depE, Attribute.INHERIT_FEATURES, FALSE); } addFeatureGroupIncludeExclude(dep, ns, depE); writeFeatureGroupSpecBody(depE, dep, ns); if(dep.hasExternalFeatureGroups()) { for(Map.Entry<String, FeatureGroup> entry : dep.getExternalFeatureGroups().entrySet()) { final ElementNode fpE = addElement(depE, Element.ORIGIN.getLocalName(), ns); addAttribute(fpE, Attribute.NAME, entry.getKey()); addFeatureGroupIncludeExclude(entry.getValue(), ns, fpE); } } if(dep.hasPackageDeps()) { PackageXmlWriter.writePackageDeps(dep, addElement(depE, Element.PACKAGES.getLocalName(), ns)); } }