}
// Displayer
if (item.getNodeName().equals("displayer") && item.hasAttributes() && item.hasChildNodes()) {
String typeUid = item.getAttributes().getNamedItem("type").getNodeValue();
DataDisplayerType type = dataDisplayerManager.getDisplayerTypeByUid(typeUid);
if (type == null) {
results.getMessages().add(new ImportExportMessage(ImportExportMessage.DISPLAYER_TYPE_NOT_FOUND, new Object[] {typeUid}));
throw new RuntimeException("Continue with the next KPI...");
}
DataDisplayerRenderer renderer = null;
Node rendererNode = item.getAttributes().getNamedItem("renderer");
if (rendererNode != null) {
String rendUid = rendererNode.getNodeValue();
renderer = dataDisplayerManager.getDisplayerRendererByUid(rendUid);
if (renderer == null) {
results.getMessages().add(new ImportExportMessage(ImportExportMessage.DISPLAYER_RENDERER_NOT_FOUND, new Object[] {rendUid}));
throw new RuntimeException("Continue with the next KPI...");
}
}
DataDisplayer displayer = type.getXmlFormat().parse(subNodes, results);
if (results.getMessages().hasErrors()) {
throw new Exception(results.getMessages().get(0).toString());
}
displayer.setDataDisplayerType(type);