public String addTrain(String trainName, String routeName, int totalSeats, Date departureTime) throws IOException {
        String message = "";
        log.debug("Start method \"addTrain\"");
        if ("".equals(routeName) || "".equals(trainName)
                || "".equals(totalSeats) || departureTime == null) {
            message = "Все поля должны быть заполнены";
            return message;
        }
        Route route = routeDAO.loadRoute(routeName);
        if (route == null) {
            log.debug("Send AddTrainRespondInfo to client with WRONG_ROUTE_NAME_STATUS");
            message = "Маршрут не найден";
            return message;
        }
        Date currentTime = new Date();
        if (!currentTime.before(departureTime)) {
            message = "Время отправления уже прошло";
            return message;
        }
        Train train = trainDAO.loadTrain(trainName);
        if (train != null) {
            log.debug("Send AddTrainRespondInfo to client with WRONG_TRAIN_NAME");
            message = "Поезд с таким названием уже существует";
            return message;
        }
        train = new Train(trainName, totalSeats,
                new Timestamp(departureTime.getTime()), route);
        if (!trainDAO.saveTrain(train)) {
            log.debug("Send AddTrainRespondInfo to client with SERVER_ERROR_STATUS");
            message = "Server error";
            return message;
        } else {
            log.debug("Send AddTrainRespondInfo to client with OK_STATUS");
            message = "Поезд добавлен";
            return message;
        }
    }