if (type.toUpperCase().equals("DEFAULT")
|| type.toUpperCase().equals("DEFAULTSWITCH")) {
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")
|| type.toUpperCase().equals("DOUBLECROSSSWITCH")) {
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")
|| type.toUpperCase().equals("THREEWAYSWITCH")) {
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);
}