| | |
| | | import org.apache.commons.logging.LogFactory; |
| | | import org.geotools.feature.IllegalAttributeException; |
| | | import org.geotools.feature.SchemaException; |
| | | import org.geotools.data.oracle.OracleDataStore; |
| | | import org.geotools.data.jdbc.ConnectionPoolManager; |
| | | import org.geotools.data.jdbc.datasource.DataSourceUtil; |
| | | import org.geotools.data.jdbc.datasource.DataSourceFinder; |
| | | import org.quartz.JobDetail; |
| | | import org.quartz.JobExecutionContext; |
| | | import org.quartz.JobExecutionException; |
| | |
| | | import oracle.sql.ARRAY; |
| | | import oracle.sql.BLOB; |
| | | |
| | | import com.ximple.eofms.jobs.context.AbstractOracleJobContext; |
| | | import com.ximple.eofms.jobs.context.shapefile.FeatureDgnConvertShpJobContext; |
| | | import com.ximple.eofms.jobs.context.shapefile.GeneralDgnConvertShpJobContext; |
| | | import com.ximple.eofms.jobs.context.shapefile.IndexDgnConvertShpJobContext; |
| | | import com.ximple.eofms.jobs.context.shapefile.OracleConvertShapefilesJobContext; |
| | | import com.ximple.eofms.util.BinConverter; |
| | | import com.ximple.eofms.util.ByteArrayCompressor; |
| | | import com.ximple.eofms.util.StringUtils; |
| | | import com.ximple.eofms.jobs.context.AbstractOracleJobContext; |
| | | import com.ximple.eofms.jobs.context.FeatureDgnConvertShpJobContext; |
| | | import com.ximple.eofms.jobs.context.GeneralDgnConvertShpJobContext; |
| | | import com.ximple.eofms.jobs.context.IndexDgnConvertShpJobContext; |
| | | import com.ximple.eofms.jobs.context.OracleConvertShapefilesJobContext; |
| | | import com.ximple.io.dgn7.ComplexElement; |
| | | import com.ximple.io.dgn7.Dgn7fileException; |
| | | import com.ximple.io.dgn7.Dgn7fileReader; |
| | |
| | | // Log the time the job started |
| | | logger.info(jobName + " fired at " + new Date()); |
| | | extractJobConfiguration(jobDetail); |
| | | createSourceDataStore(); |
| | | if (getSourceDataStore() == null) |
| | | { |
| | | throw new JobExecutionException("Cannot connect source oracle database."); |
| | | } |
| | | |
| | | try |
| | | { |
| | |
| | | for (String orgSchema : _orgSchema) |
| | | { |
| | | OracleConvertShapefilesJobContext jobContext = (OracleConvertShapefilesJobContext) prepareJobContext(_filterPath); |
| | | jobContext.setConnectionInfo(_oracleHost, _oraclePort, _oracleInstance); |
| | | jobContext.setLogin(_username, _password); |
| | | jobContext.setShapeData(_dataPath); |
| | | jobContext.setConvertDB(_convertDB); |
| | | jobContext.setConvertFile(_convertFile); |
| | | jobContext.setSourceDataStore(getSourceDataStore()); |
| | | jobContext.setDataPath(_dataPath); |
| | | jobContext.setConvertElementIn(_convertElementIn); |
| | | jobContext.setElementLogging(checkElementLogging()); |
| | | jobContext.setExecutionContext(context); |
| | |
| | | logger.info("-- step:createDummyFeatureFile --"); |
| | | createDummyFeatureFile(context); |
| | | } |
| | | |
| | | disconnect(); |
| | | } catch (SQLException e) |
| | | { |
| | | logger.warn(e.getMessage(), e); |
| | |
| | | * °õ¦æÂà´«¯Á¤Þ¹ÏÀɪº¤u§@ |
| | | * |
| | | * @param context ¤u§@°õ¦æÀô¹Ò |
| | | * @throws org.quartz.JobExecutionException exception |
| | | * @throws org.quartz.JobExecutionException |
| | | * exception |
| | | */ |
| | | private void convertIndexDesignFile(JobExecutionContext context) throws JobExecutionException |
| | | { |
| | |
| | | * °õ¦æÂà´«¨ä¥L³]p¹ÏÀɪº¤u§@ |
| | | * |
| | | * @param context jobContext |
| | | * @throws org.quartz.JobExecutionException exception |
| | | * @throws org.quartz.JobExecutionException |
| | | * exception |
| | | */ |
| | | private void convertOtherDesignFile(JobExecutionContext context) throws JobExecutionException |
| | | { |