use of com.sldeditor.common.xml.ui.XMLPanelDetails in project sldeditor by robward-scisys.
the class SymbolTypeConfigReader method readConfig.
/**
* Read configuration.
*
* @param panelId the panel id
* @param fullResourceName the full resource name
* @param fieldEnableMap the field enable map
* @return true, if successful
*/
public static boolean readConfig(Class<?> panelId, String fullResourceName, Map<Class<?>, List<SymbolTypeConfig>> fieldEnableMap) {
XMLSymbolTypeConfig symbolTypeConfig = (XMLSymbolTypeConfig) ParseXML.parseUIFile(fullResourceName, SCHEMA_RESOURCE, XMLSymbolTypeConfig.class);
if (symbolTypeConfig == null) {
return false;
}
for (XMLPanelDetails xmlPanelDetails : symbolTypeConfig.getPanel()) {
String symbolizerClassName = xmlPanelDetails.getType();
logger.debug("Symbolizer : " + symbolizerClassName);
Class<?> symbolizerClass;
try {
symbolizerClass = Class.forName(symbolizerClassName);
List<SymbolTypeConfig> configList = readSymbolizerConfig(panelId, xmlPanelDetails);
fieldEnableMap.put(symbolizerClass, configList);
} catch (ClassNotFoundException e) {
ConsoleManager.getInstance().exception(SymbolTypeConfigReader.class, e);
return false;
}
}
return true;
}
Aggregations