String terminalLocationVal = part.getTerminal();
if (terminalLocationVal != null) {
terminalLocationVal = terminalLocationVal.trim();
}
if (terminalLocationVal != null && terminalLocationVal.length() > 0) {
CommandTerminal terminal = new CommandTerminal();
terminal.setTerminal(terminalLocationVal);
editedCommand.setCommandTerminal(terminal);
}
else {
editedCommand.setCommandTerminal(null);
}