throw new RuntimeException();
}
}
private Document createDocument(final Reflections reflections) {
Store map = reflections.getStore();
Document document = DocumentFactory.getInstance().createDocument();
Element root = document.addElement("Reflections");
for (String indexName : map.keySet()) {
Element indexElement = root.addElement(indexName);
for (String key : map.get(indexName).keySet()) {
Element entryElement = indexElement.addElement("entry");
entryElement.addElement("key").setText(key);
Element valuesElement = entryElement.addElement("values");
for (String value : map.get(indexName).get(key)) {
valuesElement.addElement("value").setText(value);
}
}
}
return document;