forked from geodmms/xdgnjobs

Dennis Kao
2013-12-23 5b261e3bb6b78f60993243a653caf0e35fc5fb34
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
package com.ximple.eofms.jobs;
 
import java.util.Map;
 
import com.ximple.eofms.jobs.context.AbstractOracleJobContext;
import com.ximple.eofms.jobs.context.postgis.OracleIncrementPostGISJobContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.geotools.data.DataStore;
import org.geotools.data.postgis.PostgisNGDataStoreFactory;
import org.geotools.jdbc.JDBCDataStore;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
 
public class OracleIncrementDgn2PostGISJob extends AbstractOracleDatabaseJob {
    final static Log logger = LogFactory.getLog(OracleIncrementDgn2PostGISJob.class);
 
    private static final String PGHOST = "PGHOST";
    private static final String PGDATBASE = "PGDATBASE";
    private static final String PGPORT = "PGPORT";
    private static final String PGSCHEMA = "PGSCHEMA";
    private static final String PGUSER = "PGUSER";
    private static final String PGPASS = "PGPASS";
    private static final String USEWKB = "USEWKB";
 
    private static final int FETCHSIZE = 30;
    private static final int COMMITSIZE = 100;
 
    protected static PostgisNGDataStoreFactory dataStoreFactory = new PostgisNGDataStoreFactory();
 
    protected String _pgHost;
    protected String _pgDatabase;
    protected String _pgPort;
    protected String _pgSchema;
    protected String _pgUsername;
    protected String _pgPassword;
    protected String _pgUseWKB;
 
    protected Map<String, String> pgProperties;
    protected JDBCDataStore targetDataStore;
 
    private long queryTime = 0;
    private long queryTimeStart = 0;
 
    @Override
    public Log getLogger() {
        return logger;
    }
 
    public DataStore getTargetDataStore() {
        return targetDataStore;
    }
 
    @Override
    protected AbstractOracleJobContext prepareJobContext(String targetSchemaName, String filterPath, boolean profileMode, boolean useTransform) {
        return new OracleIncrementPostGISJobContext(getDataPath(),
            getTargetDataStore(), targetSchemaName, filterPath, profileMode, useTransform);
    }
 
    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
 
    }
 
}