private void parseValue(DigitalSTROMBindingConfigEnum configKey, String valueStr) {
switch (configKey) {
case dsid:
this.dsid = new DSID(valueStr);
break;
case consumption:
try {
this.consumption = ConsumptionConfig.valueOf(valueStr);
}catch (Exception e) {
logger.error("WRONG consumption type: "+valueStr+"; "+e.getLocalizedMessage());
}
if (consumption == null) {
this.consumption = ConsumptionConfig.ACTIVE_POWER;
}
break;
case timeinterval:
int interval = -1;
try {
interval = Integer.parseInt(valueStr);
} catch (java.lang.NumberFormatException e) {
logger.error("Numberformat exception by parsing a string to int in timeinterval: "+valueStr);
}
if (interval != -1) {
this.timeinterval = interval;
}
break;
case dsmid:
this.dsmid = new DSID(valueStr);
break;
case context:
if (valueStr.toLowerCase().equals(ContextConfig.slat.name())) {
this.context = ContextConfig.slat;
}