String orientation = attributes.getValue("orientation");
int number = Integer.parseInt(attributes.getValue("number"));
if (type.toUpperCase().equals("DEFAULT")) {
TurnoutType turnoutType = turnoutPersistence
.getTurnoutType(SRCPTurnoutTypes.DEFAULT);
actualTurnout = new Turnout(0, turnoutType, actualTurnoutGroup,
number, desc, defaultstate.toUpperCase(),
orientation.toUpperCase(), 0, 0, false);
actualAddresses = new Address[1];
turnoutType.getTurnouts().add(actualTurnout);
} else if (type.toUpperCase().equals("DOUBLECROSS")) {
TurnoutType turnoutType = turnoutPersistence
.getTurnoutType(SRCPTurnoutTypes.DOUBLECROSS);
actualTurnout = new Turnout(0, turnoutType, actualTurnoutGroup,
number, desc, defaultstate.toUpperCase(),
orientation.toUpperCase(), 0, 0, false);
actualAddresses = new Address[1];
turnoutType.getTurnouts().add(actualTurnout);
} else if (type.toUpperCase().equals("THREEWAY")) {
TurnoutType turnoutType = turnoutPersistence
.getTurnoutType(SRCPTurnoutTypes.THREEWAY);
actualTurnout = new Turnout(0, turnoutType, actualTurnoutGroup,
number, desc, defaultstate.toUpperCase(),
orientation.toUpperCase(), 0, 0, false);
actualAddresses = new Address[2];
turnoutType.getTurnouts().add(actualTurnout);
}