doc.appendChild(rootElement);
}
for (Object object : categories) {
if (object instanceof Category){
Category cat=(Category)object;
Element categoryDef = doc.createElement("category-def");
categoryDef.setAttribute("name", cat.getId());
categoryDef.setAttribute("label", cat.getLabel());
rootElement.appendChild(categoryDef);
Element descriptionElement = doc.createElement("description");
descriptionElement.setTextContent(cat.getDescription());
categoryDef.appendChild(descriptionElement);
ArrayList processedFeatures = cat.getProcessedFeatures(project, artifactFactory, remoteRepositories, localRepository, resolver);
for (Object obj : processedFeatures) {
FeatureArtifact feature=(FeatureArtifact)obj;
if (!featureCategories.containsKey(feature.getArtifactId())){
ArrayList list = new ArrayList();
featureCategories.put(feature.getArtifactId(), list);
list.add(feature);
}
ArrayList list = (ArrayList)featureCategories.get(feature.getArtifactId());
list.add(cat.getId());
}
}
}
for (Object key : featureCategories.keySet()) {