simpleRuleSetElement.setAttribute("patternsType", getPatternsType());
simpleRuleSetElement.setAttribute("ignorePattern", getIgnorePattern());
simpleRuleSetElement.setAttribute("takePattern", getTakePattern());
simpleRuleSetElement.setAttribute("useFilter", String.valueOf(isUseFilter()));
FileFilterManager filterManager = new FileFilterManager();
if (fileFilter != null) {
Element fileFilterElement = filterManager.serializeFileFilter(getFileFilter(), document, "FileFilter", "FileFilterRule");
simpleRuleSetElement.appendChild(fileFilterElement);
}
if (fileFilterTree != null) {
HashMap<String, FileFilter> itemsMap = fileFilterTree.getItemsMap();
Set<Entry<String, FileFilter>> entrySet = itemsMap.entrySet();
for (Entry<String, FileFilter> entry : entrySet) {
String path = entry.getKey();
FileFilter filter = entry.getValue();
Element subdirFilterElement = document.createElement("SubdirectoryFileFilter");
subdirFilterElement.setAttribute("path", path);
Element fileFilterElement = filterManager.serializeFileFilter(filter, document, "FileFilter", "FileFilterRule");
subdirFilterElement.appendChild(fileFilterElement);
simpleRuleSetElement.appendChild(subdirFilterElement);
}
}