int bus = Integer.parseInt(attributes.getValue("bus"));
int address = Integer.parseInt(attributes.getValue("address"));
if (type.toUpperCase().equals("DELTA")
|| type.toUpperCase().equals("DELTALOCOMOTIVE")) {
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")
|| type.toUpperCase().equals("DIGITALLOCOMOTIVE")) {
LocomotiveType locomotiveType = locomotivePersistence
.getLocomotiveTypeByName("DIGITAL");
actualLocomotive = new Locomotive(0, actualLocomotiveGroup,
locomotiveType, name, desc, "", address, bus);
locomotiveType.getLocomotives().add(actualLocomotive);
}
}