Dennis Kao
2014-01-07 bb3e35238db4783a1e81043918dd5bd0a3791057
update for flow mark
1 files modified
37 ■■■■■ changed files
xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/OracleIncrementPostGISJobContext.java 37 ●●●●● patch | view | raw | blame | history
xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/OracleIncrementPostGISJobContext.java
@@ -44,7 +44,7 @@
public class OracleIncrementPostGISJobContext extends AbstractOracleToPostGISJobContext
    implements CreateFeatureTypeEventListener {
    static Log logger = LogFactory.getLog(OracleConvertPostGISJobContext.class);
    static Log logger = LogFactory.getLog(OracleIncrementPostGISJobContext.class);
    static final LoggerFacade sLogger = new CommonsLoggingLogger(logger);
    // static PostgisNGDataStoreFactory dataStoreFactory = new PostgisNGDataStoreFactory();
@@ -71,6 +71,17 @@
    private boolean schemaChanged = false;
    private boolean dropTableMode = true;
    private int accumulate = 0;
    public static class ElementTransactionContext {
        public int transcationType;
        public short cid;
        public int oid;
        public short compid;
        public short occid;
        public int taskid;
        public Element element;
        public int result;
    };
    public OracleIncrementPostGISJobContext(String dataPath, DataStore pgDS, String targetSchema, String filterConfig,
                                          boolean profileMode, boolean useTransform) {
@@ -113,7 +124,29 @@
        }
    }
    public void putFeatureCollection(Element element) {
    /**
     * STATUS 欄位 :0:新增  2:編輯  3:刪除設備   4:刪除元件
     * @param context
     */
    public void putFeatureCollection(ElementTransactionContext context) {
        assert elementDispatcher != null;
        if (context == null) {
            logger.warn("putFeatureCollection context is null");
            return;
        }
        if (context.transcationType == 0) {
            // insert Element
            putFeatureCollection(context.element);
        } else if (context.transcationType == 2) {
            // Update Element
        } else if (context.transcationType == 3) {
            // Remove Whole Feature
        } else if (context.transcationType == 4) {
            // Remove Feature Part
        }
    }
    protected void putFeatureCollection(Element element) {
        assert elementDispatcher != null;
        // 判斷是否符和條件
        SimpleFeature feature = elementDispatcher.execute(element, getDistId(), isTransformed());