forked from geodmms/xdgnjobs

?? ?
2008-08-26 cc005923e07c4bfec8ca27ef856355b8c095e390
xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/AbstractOracleToPostGISJobContext.java
@@ -332,10 +332,13 @@
        getLogger().debug(sqlStr);
        result.add(sqlStr);
        String indexName = tableName.replace('-', '_');
        for (AttributeType anAttributeType : attributeType)
        {
            if (!(anAttributeType instanceof GeometryAttributeType))
            {
                String fieldName = anAttributeType.getLocalName().toLowerCase();
                continue;
            }
            GeometryAttributeType geomAttribute = (GeometryAttributeType) anAttributeType;
@@ -347,8 +350,6 @@
            getLogger().debug(sqlStr);
            result.add(sqlStr);
            String indexName = tableName.replace('-', '_');
            //also build a spatial index on each geometry column.
            sql = new StringBuilder("CREATE INDEX \"");
            sql.append("spatial_");
@@ -363,7 +364,29 @@
            sqlStr = sql.toString();
            getLogger().debug(sqlStr);
            result.add(sqlStr);
        }
        if (origintableName.startsWith("fsc"))
        {
            sql = new StringBuilder("CREATE INDEX \"");
            sql.append("oid_");
            sql.append(indexName);
            sql.append("\" ON ");
            sql.append(encodeSchemaTableName(tableName));
            sql.append(" USING BTREE (\"tid\", \"oid\")");
            sqlStr = sql.toString();
            getLogger().debug(sqlStr);
            result.add(sqlStr);
            sql = new StringBuilder("CREATE INDEX \"");
            sql.append("lvwt_");
            sql.append(indexName);
            sql.append("\" ON ");
            sql.append(encodeSchemaTableName(tableName));
            sql.append(" USING BTREE (\"level\", \"symweight\")");
            sqlStr = sql.toString();
            getLogger().debug(sqlStr);
            result.add(sqlStr);
        }