int bus = Integer.parseInt(attributes.getValue("bus"));
int address = Integer.parseInt(attributes.getValue("address"));
if (type.toUpperCase().equals("DELTA")) {
LocomotiveType locomotiveType = locomotivePersistence
.getLocomotiveTypeByName("DELTA");
actualLocomotive = new Locomotive(0, actualLocomotiveGroup,
locomotiveType, name, desc, "", address, bus);
locomotiveType.getLocomotives().add(actualLocomotive);
} else if (type.toUpperCase().equals("DIGITAL")) {
LocomotiveType locomotiveType = locomotivePersistence
.getLocomotiveTypeByName("DIGITAL");
actualLocomotive = new Locomotive(0, actualLocomotiveGroup,
locomotiveType, name, desc, "", address, bus);
locomotiveType.getLocomotives().add(actualLocomotive);
}
}