in apache-rat-core/src/main/java/org/apache/rat/configuration/XMLConfigurationReader.java [96:127]
public XMLConfigurationReader() {
try {
document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
} catch (ParserConfigurationException e) {
throw new IllegalStateException("No XML parser defined", e);
}
rootElement = document.createElement(XMLConfig.ROOT);
document.appendChild(rootElement);
familiesElement = document.createElement(XMLConfig.FAMILIES);
rootElement.appendChild(familiesElement);
licensesElement = document.createElement(XMLConfig.LICENSES);
rootElement.appendChild(licensesElement);
approvedElement = document.createElement(XMLConfig.APPROVED);
rootElement.appendChild(approvedElement);
matchersElement = document.createElement(XMLConfig.MATCHERS);
rootElement.appendChild(matchersElement);
licenses = new TreeSet<>();
licenseFamilies = new TreeSet<>();
approvedFamilies = new TreeSet<>();
matchers = new HashMap<>();
builderParams = new BuilderParams() {
@Override
public Map<String, IHeaderMatcher> matcherMap() {
return matchers;
}
@Override
public SortedSet<ILicenseFamily> licenseFamilies() {
return licenseFamilies;
}
};
}