| | |
| | | throw new JobExecutionException("Cannot connect source postgreSQL database."); |
| | | } |
| | | |
| | | Calendar cal = Calendar.getInstance(); |
| | | Date startTime = cal.getTime(); |
| | | long t1 = System.currentTimeMillis(); |
| | | try |
| | | { |
| | | logger.info("-- step:clearOutputDatabase --"); |
| | |
| | | } |
| | | |
| | | disconnect(); |
| | | Date endTime = cal.getTime(); |
| | | Date time = new Date(endTime.getTime() - startTime.getTime()); |
| | | long t2 = System.currentTimeMillis(); |
| | | // public static final String DATE_FORMAT_NOW = "yyyy-MM-dd HH:mm:ss"; |
| | | // SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_NOW); |
| | | logger.warn("use time = " + time); |
| | | logger.warn("use time = " + ((t2 - t1) / 60000.0) + " min"); |
| | | } catch (SQLException e) |
| | | { |
| | | logger.warn(e.getMessage(), e); |
| | |
| | | convertContext.setExecutionContext(context); |
| | | String dgnPaths[] = StringUtils.splitToArray(dgnFile.toString(), File.separator); |
| | | convertContext.setFilename(dgnPaths[dgnPaths.length - 1]); |
| | | convertContext.startTransaction(); |
| | | |
| | | FileInputStream fs = new FileInputStream(dgnFile); |
| | | FileChannel fc = fs.getChannel(); |
| | |
| | | convertContext.setExecutionContext(context); |
| | | String dgnPaths[] = StringUtils.splitToArray(dgnFile.toString(), File.separator); |
| | | convertContext.setFilename(dgnPaths[dgnPaths.length - 1]); |
| | | convertContext.startTransaction(); |
| | | |
| | | FileInputStream fs = new FileInputStream(dgnFile); |
| | | FileChannel fc = fs.getChannel(); |
| | |
| | | convertContext.setExecutionContext(context); |
| | | String dgnPaths[] = StringUtils.splitToArray(dgnFile.toString(), File.separator); |
| | | convertContext.setFilename(dgnPaths[dgnPaths.length - 1]); |
| | | convertContext.startTransaction(); |
| | | |
| | | FileInputStream fs = new FileInputStream(dgnFile); |
| | | FileChannel fc = fs.getChannel(); |