return result;
}
public DriverConfig getDriver(final String label) {
final DriverConfig driverConfig = new DriverConfig();
driversCfg.processChildren(DRIVER, new ConfigurationCallback() {
public void process(Configuration cfg) {
String lbl = cfg.getAttribute(LABEL);
if ( !lbl.equals(label) )
return;
String className = cfg.getAttribute(CLASS);
driverConfig.setLabel(lbl);
driverConfig.setClassName(className);
final Map propsMap = driverConfig.getProperties();
Configuration propsCfg = cfg.getChild(PROPERTIES);
if ( propsCfg != null ) {
propsCfg.processChildren(PROPERTY, new ConfigurationCallback() {
public void process(Configuration pcfg) {
propsMap.put(pcfg.getAttribute(NAME), pcfg.getAttribute(VALUE));
}
});
}