forked from geodmms/xdgnjobs

?? ?
2008-06-12 d2986858ad69383e3b06188b4cebe9c2f714f2dd
xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertDgn2ShpJob.java
@@ -13,6 +13,7 @@
import java.sql.SQLException;
import java.sql.Statement;
import java.sql.Types;
import java.sql.Connection;
import java.util.Date;
import org.apache.commons.collections.OrderedMap;
@@ -59,7 +60,6 @@
    final static Log logger = LogFactory.getLog(OracleConvertDgn2ShpJob.class);
    private static final int FETCHSIZE = 30;
    private static final int BATCHSIZE = 25;
    private static final int COMMITSIZE = 20;
    class Pair
@@ -112,7 +112,7 @@
        {
            logger.info("-- step:clearOutputDirectory --");
            clearOutputDirectory();
            boolean bFirst = true;
            boolean bFirst = isCopyConnectivityMode();
            if (checkConvertDB())
            {
                logger.info("-- step:convertOracleDB --");
@@ -127,9 +127,10 @@
                    jobContext.setExecutionContext(context);
                    if (bFirst)
                    {
                        copyConnectivity(jobContext);
                    else
                        bFirst = false;
                    }
                    logger.info("----- start schema:" + orgSchema + " -----");
                    exetcuteConvert(jobContext, orgSchema, _dataPath);
@@ -180,7 +181,7 @@
     */
    private void copyConnectivity(OracleConvertShapefilesJobContext jobContext) throws SQLException
    {
        OracleConnection connection = jobContext.getOracleConnection();
        Connection connection = jobContext.getOracleConnection();
        Statement stmt = connection.createStatement();
        stmt.execute(OracleConvertShapefilesJobContext.TRUNCATE_CONNECTIVITY_WEBCHECK);
        stmt.execute(OracleConvertShapefilesJobContext.COPY_CONNECTIVITY_TO_WEBCHECK);
@@ -245,7 +246,7 @@
        System.gc();
    }
    protected OrderedMap getBlobStorageList(OracleConnection connection, String schemaSrc, String tableSrc,
    protected OrderedMap getBlobStorageList(Connection connection, String schemaSrc, String tableSrc,
                                            OrderedMap orderedMap) throws SQLException
    {
        if (orderedMap == null)
@@ -338,7 +339,7 @@
    protected void queryIgsetElement(OracleConvertShapefilesJobContext jobContext,
                                     String srcschema, String srctable) throws SQLException
    {
        OracleConnection connection = jobContext.getOracleConnection();
        Connection connection = jobContext.getOracleConnection();
        String fetchSrcStmtFmt = "SELECT IGDSELM FROM \"%s\".\"%s\" ORDER BY ROWID";
        PrintfFormat spf = new PrintfFormat(fetchSrcStmtFmt);
        String fetchSrcStmt = spf.sprintf(new Object[]{srcschema, srctable});
@@ -380,7 +381,7 @@
    protected void queryRawElement(OracleConvertShapefilesJobContext jobContext,
                                   String srcschema, String srctable) throws SQLException
    {
        OracleConnection connection = jobContext.getOracleConnection();
        Connection connection = jobContext.getOracleConnection();
        String fetchDestStmtFmt = "SELECT ELEMENT FROM \"%s\".\"%s\" ORDER BY ROWID";
        PrintfFormat spf = new PrintfFormat(fetchDestStmtFmt);
        String fetchDestStmt = spf.sprintf(new Object[]{srcschema, srctable});