From 7c489a7b30ed09100ad58fedb7e40281f823e91d Mon Sep 17 00:00:00 2001 From: Dennis Kao <ulysseskao@gmail.com> Date: Thu, 26 Sep 2013 18:51:16 +0800 Subject: [PATCH] update for dist id --- xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/AbstractOracleDatabaseJob.java | 92 ++++++ xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/ElementDispatcher.java | 4 xdgnjobs/ximple-build/maven/jar-collector/pom.xml | 2 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateShapeStrategy.java | 6 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/shapefile/GeneralDgnConvertShpJobContext.java | 28 - xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/mysql/OracleConvertMySQLJobContext.java | 4 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/OracleConvertPostGISJobContext.java | 2 xdgnjobs/ximple-spatialjob/pom.xml | 4 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/orasdo/GeneralDgnConvertOraSDOJobContext.java | 2 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/shapefile/FeatureDgnConvertShpJobContext.java | 4 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateEllipseShapeStrategy.java | 5 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateComplexChainStrategy.java | 8 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateArcLineStringStrategy.java | 5 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/orasdo/OracleConvertOraSDOJobContext.java | 4 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertDgn2MySQLJob.java | 17 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateTextStrategy.java | 6 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/shapefile/IndexDgnConvertShpJobContext.java | 32 +- xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertDgn2OraSDOJob.java | 18 - xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertDgn2ShpJob.java | 17 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/FeatureDgnConvertPostGISJobContext.java | 4 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/orasdo/DummyFeatureConvertOraSDOJobContext.java | 4 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/orasdo/FeatureDgnConvertOraSDOJobContext.java | 4 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateLineStringStrategy.java | 8 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertDgn2PostGISJob.java | 65 ---- xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/mysql/IndexDgnConvertMySQLJobContext.java | 2 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertDgn2EdbGeoJob.java | 100 +----- xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/edbgeo/IndexDgnConvertEdbGeoJobContext.java | 2 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/orasdo/IndexDgnConvertOraSDOJobContext.java | 2 xdgnjobs/ximple-elmparser/src/main/java/com/ximple/eofms/XElementParser.java | 3 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/AbstractDgnFileJobContext.java | 12 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/edbgeo/GeneralDgnConvertEdbGeoJobContext.java | 2 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/util/FeatureTypeBuilderUtil.java | 118 +------- xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/edbgeo/OracleConvertEdbGeoJobContext.java | 2 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/shapefile/OracleConvertShapefilesJobContext.java | 22 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/ElementDispatchableFilter.java | 2 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/mysql/FeatureDgnConvertMySQLJobContext.java | 4 xdgnjobs/ximple-jobcarrier/pom.xml | 4 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/AbstractOracleJobContext.java | 21 + xdgnjobs/ximple-dgnio/pom.xml | 4 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/IndexDgnConvertPostGISJobContext.java | 33 +- xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/mysql/GeneralDgnConvertMySQLJobContext.java | 2 xdgnjobs/pom.xml | 6 xdgnjobs/ximple-build/maven/pom.xml | 2 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/mysql/DummyFeatureConvertMySQlJobContext.java | 4 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/GeneralDgnConvertPostGISJobContext.java | 36 +- xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateLineTextStrategy.java | 8 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/DummyFeatureConvertJobContext.java | 4 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateMultiSymbolStrategy.java | 7 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/shapefile/DummyFeatureConvertShpJobContext.java | 4 xdgnjobs/ximple-build/pom.xml | 4 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateFeatureTypeStrategy.java | 4 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/edbgeo/DummyFeatureConvertEdbGeoJobContext.java | 4 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/TypeIdDispatchableFilter.java | 6 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateSymbolStrategy.java | 4 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/TypeCompLevelIdDispatchableFilter.java | 6 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/DummyFeatureConvertPostGISJobContext.java | 4 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/edbgeo/FeatureDgnConvertEdbGeoJobContext.java | 4 xdgnjobs/ximple-elmparser/pom.xml | 4 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/TypeCompIdDispatchableFilter.java | 6 59 files changed, 337 insertions(+), 460 deletions(-) diff --git a/xdgnjobs/pom.xml b/xdgnjobs/pom.xml index c3c95b1..458e073 100644 --- a/xdgnjobs/pom.xml +++ b/xdgnjobs/pom.xml @@ -18,8 +18,8 @@ <test.maxHeapSize>512M</test.maxHeapSize> <src.output>${basedir}/target</src.output> <java5>1.6</java5> - <xdgnio.version>1.3.1</xdgnio.version> - <gt.version>9.4.x</gt.version> + <xdgnio.version>2.0.0</xdgnio.version> + <gt.version>9.5.x</gt.version> <failIfNoTests>false</failIfNoTests> <stress.skip.pattern></stress.skip.pattern> <online.skip.pattern></online.skip.pattern> @@ -65,7 +65,7 @@ <groupId>com.ximple.eofms</groupId> <artifactId>ximple-dgnjobs</artifactId> <packaging>pom</packaging> - <version>1.3.1</version> + <version>2.0.0</version> <name>ximple-dgnjobs</name> <url>http://www.ximple.com.tw</url> diff --git a/xdgnjobs/ximple-build/maven/jar-collector/pom.xml b/xdgnjobs/ximple-build/maven/jar-collector/pom.xml index 4d063fd..d79f6cb 100644 --- a/xdgnjobs/ximple-build/maven/jar-collector/pom.xml +++ b/xdgnjobs/ximple-build/maven/jar-collector/pom.xml @@ -7,7 +7,7 @@ <parent> <groupId>com.ximple.eofms.maven</groupId> <artifactId>ximple-maven</artifactId> - <version>1.3.1</version> + <version>2.0.0</version> </parent> diff --git a/xdgnjobs/ximple-build/maven/pom.xml b/xdgnjobs/ximple-build/maven/pom.xml index 11829ac..582c130 100644 --- a/xdgnjobs/ximple-build/maven/pom.xml +++ b/xdgnjobs/ximple-build/maven/pom.xml @@ -7,7 +7,7 @@ <parent> <groupId>com.ximple.eofms.maven</groupId> <artifactId>ximple-build</artifactId> - <version>1.3.1</version> + <version>2.0.0</version> </parent> diff --git a/xdgnjobs/ximple-build/pom.xml b/xdgnjobs/ximple-build/pom.xml index b6b0e4b..b2fba94 100644 --- a/xdgnjobs/ximple-build/pom.xml +++ b/xdgnjobs/ximple-build/pom.xml @@ -7,7 +7,7 @@ <parent> <groupId>com.ximple.eofms</groupId> <artifactId>ximple-dgnjobs</artifactId> - <version>1.3.1</version> + <version>2.0.0</version> </parent> @@ -16,7 +16,7 @@ <!-- =========================================================== --> <groupId>com.ximple.eofms.maven</groupId> <artifactId>ximple-build</artifactId> - <version>1.3.1</version> + <version>2.0.0</version> <packaging>pom</packaging> <name>Build tools for Ximple DgnJobs</name> diff --git a/xdgnjobs/ximple-dgnio/pom.xml b/xdgnjobs/ximple-dgnio/pom.xml index 938fdb2..9fbbaac 100644 --- a/xdgnjobs/ximple-dgnio/pom.xml +++ b/xdgnjobs/ximple-dgnio/pom.xml @@ -7,7 +7,7 @@ <parent> <groupId>com.ximple.eofms</groupId> <artifactId>ximple-dgnjobs</artifactId> - <version>1.3.1</version> + <version>2.0.0</version> </parent> <!-- =========================================================== --> @@ -15,7 +15,7 @@ <!-- =========================================================== --> <groupId>com.ximple.eofms</groupId> <artifactId>ximple-dgnio</artifactId> - <version>1.3.1</version> + <version>2.0.0</version> <packaging>jar</packaging> <name>ximple-dgnio</name> <url>http://www.ximple.com.tw</url> diff --git a/xdgnjobs/ximple-elmparser/pom.xml b/xdgnjobs/ximple-elmparser/pom.xml index fdc0712..ec922b0 100644 --- a/xdgnjobs/ximple-elmparser/pom.xml +++ b/xdgnjobs/ximple-elmparser/pom.xml @@ -5,12 +5,12 @@ <parent> <groupId>com.ximple.eofms</groupId> <artifactId>ximple-dgnjobs</artifactId> - <version>1.3.1</version> + <version>2.0.0</version> </parent> <groupId>com.ximple.eofms</groupId> <artifactId>ximple-elmparser</artifactId> - <version>1.3.1</version> + <version>2.0.0</version> <packaging>jar</packaging> <name>ximple-elmparser</name> <url>http://maven.apache.org</url> diff --git a/xdgnjobs/ximple-elmparser/src/main/java/com/ximple/eofms/XElementParser.java b/xdgnjobs/ximple-elmparser/src/main/java/com/ximple/eofms/XElementParser.java index ffecfd9..c2d6ae8 100644 --- a/xdgnjobs/ximple-elmparser/src/main/java/com/ximple/eofms/XElementParser.java +++ b/xdgnjobs/ximple-elmparser/src/main/java/com/ximple/eofms/XElementParser.java @@ -21,7 +21,6 @@ import org.geotools.feature.Feature; import org.geotools.feature.FeatureType; import org.geotools.feature.SimpleFeature; -import org.geotools.feature.IllegalAttributeException; import org.geotools.feature.FeatureCollection; import org.geotools.feature.FeatureCollections; import org.geotools.data.FeatureWriter; @@ -217,7 +216,7 @@ return; } - // �P�_�O�_�ũM���� + // �P�_�O�_�ũM��� Feature feature = elementDispatcher.execute(element, false); if (feature == null) { diff --git a/xdgnjobs/ximple-jobcarrier/pom.xml b/xdgnjobs/ximple-jobcarrier/pom.xml index 40864bc..c47f0ed 100644 --- a/xdgnjobs/ximple-jobcarrier/pom.xml +++ b/xdgnjobs/ximple-jobcarrier/pom.xml @@ -6,13 +6,13 @@ <parent> <groupId>com.ximple.eofms</groupId> <artifactId>ximple-dgnjobs</artifactId> - <version>1.3.1</version> + <version>2.0.0</version> </parent> <groupId>com.ximple.eofms</groupId> <artifactId>ximple-jobcarrier</artifactId> - <version>1.3.1</version> + <version>2.0.0</version> <packaging>jar</packaging> <name>ximple-jobcarrier</name> <url>http://maven.apache.org</url> diff --git a/xdgnjobs/ximple-spatialjob/pom.xml b/xdgnjobs/ximple-spatialjob/pom.xml index 43f4526..f68ad98 100644 --- a/xdgnjobs/ximple-spatialjob/pom.xml +++ b/xdgnjobs/ximple-spatialjob/pom.xml @@ -7,12 +7,12 @@ <parent> <groupId>com.ximple.eofms</groupId> <artifactId>ximple-dgnjobs</artifactId> - <version>1.3.1</version> + <version>2.0.0</version> </parent> <groupId>com.ximple.eofms</groupId> <artifactId>ximple-spatialjob</artifactId> - <version>1.3.1</version> + <version>2.0.0</version> <packaging>jar</packaging> <name>ximple-spatialjob</name> <url>http://www.ximple.com.tw</url> diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateArcLineStringStrategy.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateArcLineStringStrategy.java index 7060c28..b2de9ae 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateArcLineStringStrategy.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateArcLineStringStrategy.java @@ -9,11 +9,11 @@ import com.ximple.io.dgn7.UserAttributeData; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.geotools.feature.IllegalAttributeException; import org.geotools.feature.SchemaException; import org.geotools.feature.simple.SimpleFeatureBuilder; import org.geotools.feature.simple.SimpleFeatureTypeBuilder; import org.geotools.geometry.jts.JTSFactoryFinder; +import org.opengis.feature.IllegalAttributeException; import org.opengis.feature.simple.SimpleFeature; import org.opengis.feature.simple.SimpleFeatureType; @@ -57,7 +57,7 @@ } public SimpleFeature createFeature(SimpleFeatureType featureType, Element element, - boolean useTransform) throws IllegalAttributeException { + short distId, boolean useTransform) throws IllegalAttributeException { DefaultColorTable colorTable = (DefaultColorTable) DefaultColorTable.getInstance(); FrammeAttributeData fLinkage = getFeatureLinkage(element); SimpleFeature feature = null; @@ -75,6 +75,7 @@ if (gobj != null) feature = SimpleFeatureBuilder.build(featureType, new Object[]{ gobj, + distId, fLinkage.getFsc(), (long) fLinkage.getUfid(), (short) fLinkage.getComponentID(), diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateComplexChainStrategy.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateComplexChainStrategy.java index e4baeea..ce0c8b6 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateComplexChainStrategy.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateComplexChainStrategy.java @@ -7,11 +7,11 @@ import com.ximple.io.dgn7.*; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.geotools.feature.IllegalAttributeException; import org.geotools.feature.SchemaException; import org.geotools.feature.simple.SimpleFeatureBuilder; import org.geotools.feature.simple.SimpleFeatureTypeBuilder; import org.geotools.geometry.jts.JTSFactoryFinder; +import org.opengis.feature.IllegalAttributeException; import org.opengis.feature.simple.SimpleFeature; import org.opengis.feature.simple.SimpleFeatureType; @@ -54,7 +54,7 @@ } public SimpleFeature createFeature(SimpleFeatureType featureType, Element element, - boolean useTransform) throws IllegalAttributeException { + short distId, boolean useTransform) throws IllegalAttributeException { DefaultColorTable colorTable = (DefaultColorTable) DefaultColorTable.getInstance(); FrammeAttributeData fLinkage = getFeatureLinkage(element); SimpleFeature feature = null; @@ -75,6 +75,7 @@ if (gobj != null) feature = SimpleFeatureBuilder.build(featureType, new Object[]{ gobj, + distId, fLinkage.getFsc(), (long) fLinkage.getUfid(), (short) fLinkage.getComponentID(), @@ -99,6 +100,7 @@ if (gobj != null) feature = SimpleFeatureBuilder.build(featureType, new Object[]{ gobj, + distId, fLinkage.getFsc(), (long) fLinkage.getUfid(), (short) fLinkage.getComponentID(), @@ -124,6 +126,7 @@ if (gobj != null) feature = SimpleFeatureBuilder.build(featureType, new Object[]{ gobj, + distId, fLinkage.getFsc(), (long) fLinkage.getUfid(), (short) fLinkage.getComponentID(), @@ -150,6 +153,7 @@ if (gobj != null) feature = SimpleFeatureBuilder.build(featureType, new Object[]{ gobj, + distId, fLinkage.getFsc(), (long) fLinkage.getUfid(), (short) fLinkage.getComponentID(), diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateEllipseShapeStrategy.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateEllipseShapeStrategy.java index 8b190cc..1f65012 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateEllipseShapeStrategy.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateEllipseShapeStrategy.java @@ -9,11 +9,11 @@ import com.ximple.io.dgn7.UserAttributeData; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.geotools.feature.IllegalAttributeException; import org.geotools.feature.SchemaException; import org.geotools.feature.simple.SimpleFeatureBuilder; import org.geotools.feature.simple.SimpleFeatureTypeBuilder; import org.geotools.geometry.jts.JTSFactoryFinder; +import org.opengis.feature.IllegalAttributeException; import org.opengis.feature.simple.SimpleFeature; import org.opengis.feature.simple.SimpleFeatureType; @@ -55,7 +55,7 @@ } public SimpleFeature createFeature(SimpleFeatureType featureType, Element element, - boolean useTransform) throws IllegalAttributeException { + short distId, boolean useTransform) throws IllegalAttributeException { DefaultColorTable colorTable = (DefaultColorTable) DefaultColorTable.getInstance(); FrammeAttributeData fLinkage = getFeatureLinkage(element); SimpleFeature feature = null; @@ -73,6 +73,7 @@ if (gobj != null) feature = SimpleFeatureBuilder.build(featureType, new Object[]{ gobj, + distId, fLinkage.getFsc(), (long) fLinkage.getUfid(), (short) fLinkage.getComponentID(), diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateFeatureTypeStrategy.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateFeatureTypeStrategy.java index 5e89277..c88783f 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateFeatureTypeStrategy.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateFeatureTypeStrategy.java @@ -1,8 +1,8 @@ package com.ximple.eofms.filter; import com.ximple.io.dgn7.Element; -import org.geotools.feature.IllegalAttributeException; import org.geotools.feature.SchemaException; +import org.opengis.feature.IllegalAttributeException; import org.opengis.feature.simple.SimpleFeature; import org.opengis.feature.simple.SimpleFeatureType; @@ -10,7 +10,7 @@ public SimpleFeatureType createFeatureElement(String featureName) throws SchemaException; public SimpleFeature createFeature(SimpleFeatureType featureType, Element element, - boolean useTransform) throws IllegalAttributeException; + short distId, boolean useTransform) throws IllegalAttributeException; public void addCreateFeatureTypeEventListener(CreateFeatureTypeEventListener listener); diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateLineStringStrategy.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateLineStringStrategy.java index aaa56c2..7d10932 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateLineStringStrategy.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateLineStringStrategy.java @@ -8,11 +8,11 @@ import com.ximple.io.dgn7.*; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.geotools.feature.IllegalAttributeException; import org.geotools.feature.SchemaException; import org.geotools.feature.simple.SimpleFeatureBuilder; import org.geotools.feature.simple.SimpleFeatureTypeBuilder; import org.geotools.geometry.jts.JTSFactoryFinder; +import org.opengis.feature.IllegalAttributeException; import org.opengis.feature.simple.SimpleFeature; import org.opengis.feature.simple.SimpleFeatureType; @@ -55,7 +55,7 @@ } public SimpleFeature createFeature(SimpleFeatureType featureType, Element element, - boolean useTransform) throws IllegalAttributeException { + short distId, boolean useTransform) throws IllegalAttributeException { DefaultColorTable colorTable = (DefaultColorTable) DefaultColorTable.getInstance(); FrammeAttributeData fLinkage = getFeatureLinkage(element); SimpleFeature feature = null; @@ -73,6 +73,7 @@ if (gobj != null) feature = SimpleFeatureBuilder.build(featureType, new Object[]{ gobj, + distId, fLinkage.getFsc(), (long) fLinkage.getUfid(), (short) fLinkage.getComponentID(), @@ -104,6 +105,7 @@ if (gobj != null) feature = SimpleFeatureBuilder.build(featureType, new Object[]{ gobj, + distId, fLinkage.getFsc(), (long) fLinkage.getUfid(), (short) fLinkage.getComponentID(), @@ -126,6 +128,7 @@ if (gobj != null) feature = SimpleFeatureBuilder.build(featureType, new Object[]{ gobj, + distId, fLinkage.getFsc(), (long) fLinkage.getUfid(), (short) fLinkage.getComponentID(), @@ -149,6 +152,7 @@ if (gobj != null) feature = SimpleFeatureBuilder.build(featureType, new Object[]{ gobj, + distId, fLinkage.getFsc(), (long) fLinkage.getUfid(), (short) fLinkage.getComponentID(), diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateLineTextStrategy.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateLineTextStrategy.java index 0ff87c1..100bb1b 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateLineTextStrategy.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateLineTextStrategy.java @@ -5,11 +5,11 @@ import com.ximple.io.dgn7.*; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.geotools.feature.IllegalAttributeException; import org.geotools.feature.SchemaException; import org.geotools.feature.simple.SimpleFeatureBuilder; import org.geotools.feature.simple.SimpleFeatureTypeBuilder; import org.geotools.geometry.jts.JTSFactoryFinder; +import org.opengis.feature.IllegalAttributeException; import org.opengis.feature.simple.SimpleFeature; import org.opengis.feature.simple.SimpleFeatureType; @@ -52,7 +52,7 @@ } public SimpleFeature createFeature(SimpleFeatureType featureType, Element element, - boolean useTransform) throws IllegalAttributeException { + short distId, boolean useTransform) throws IllegalAttributeException { DefaultColorTable colorTable = (DefaultColorTable) DefaultColorTable.getInstance(); FrammeAttributeData fLinkage = getFeatureLinkage(element); SimpleFeature feature = null; @@ -70,6 +70,7 @@ if (gobj != null) feature = SimpleFeatureBuilder.build(featureType, new Object[]{ gobj, + distId, fLinkage.getFsc(), (long) fLinkage.getUfid(), (short) fLinkage.getComponentID(), @@ -106,6 +107,7 @@ feature = SimpleFeatureBuilder.build(featureType, new Object[]{ line, + distId, fLinkage.getFsc(), (long) fLinkage.getUfid(), (short) fLinkage.getComponentID(), @@ -139,6 +141,7 @@ if (gobj != null) feature = SimpleFeatureBuilder.build(featureType, new Object[]{ gobj, + distId, fLinkage.getFsc(), (long) fLinkage.getUfid(), (short) fLinkage.getComponentID(), @@ -160,6 +163,7 @@ } feature = SimpleFeatureBuilder.build(featureType, new Object[]{ gobj, + distId, fLinkage.getFsc(), (long) fLinkage.getUfid(), (short) fLinkage.getComponentID(), diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateMultiSymbolStrategy.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateMultiSymbolStrategy.java index 1622ddf..5eabbe8 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateMultiSymbolStrategy.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateMultiSymbolStrategy.java @@ -4,17 +4,16 @@ import com.vividsolutions.jts.geom.CoordinateList; import com.vividsolutions.jts.geom.Geometry; import com.vividsolutions.jts.geom.GeometryFactory; -import com.vividsolutions.jts.geom.PrecisionModel; import com.vividsolutions.jts.util.Assert; import com.ximple.eofms.util.*; import com.ximple.io.dgn7.*; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.geotools.feature.IllegalAttributeException; import org.geotools.feature.SchemaException; import org.geotools.feature.simple.SimpleFeatureBuilder; import org.geotools.feature.simple.SimpleFeatureTypeBuilder; import org.geotools.geometry.jts.JTSFactoryFinder; +import org.opengis.feature.IllegalAttributeException; import org.opengis.feature.simple.SimpleFeature; import org.opengis.feature.simple.SimpleFeatureType; @@ -60,7 +59,7 @@ } public SimpleFeature createFeature(SimpleFeatureType featureType, Element element, - boolean useTransform) throws IllegalAttributeException { + short distId, boolean useTransform) throws IllegalAttributeException { DefaultColorTable colorTable = (DefaultColorTable) DefaultColorTable.getInstance(); FrammeAttributeData fLinkage = getFeatureLinkage(element); SimpleFeature feature = null; @@ -93,6 +92,7 @@ if (gobj != null) feature = SimpleFeatureBuilder.build(featureType, new Object[]{ gobj, + distId, fLinkage.getFsc(), (long) fLinkage.getUfid(), (short) fLinkage.getComponentID(), @@ -155,6 +155,7 @@ if (gobj != null) feature = SimpleFeatureBuilder.build(featureType, new Object[]{ gobj, + distId, fLinkage.getFsc(), (long) fLinkage.getUfid(), (short) fLinkage.getComponentID(), diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateShapeStrategy.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateShapeStrategy.java index ea971d0..f36679d 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateShapeStrategy.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateShapeStrategy.java @@ -6,11 +6,11 @@ import com.ximple.io.dgn7.*; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.geotools.feature.IllegalAttributeException; import org.geotools.feature.SchemaException; import org.geotools.feature.simple.SimpleFeatureBuilder; import org.geotools.feature.simple.SimpleFeatureTypeBuilder; import org.geotools.geometry.jts.JTSFactoryFinder; +import org.opengis.feature.IllegalAttributeException; import org.opengis.feature.simple.SimpleFeature; import org.opengis.feature.simple.SimpleFeatureType; @@ -53,7 +53,7 @@ } public SimpleFeature createFeature(SimpleFeatureType featureType, Element element, - boolean useTransform) throws IllegalAttributeException { + short distId, boolean useTransform) throws IllegalAttributeException { DefaultColorTable colorTable = (DefaultColorTable) DefaultColorTable.getInstance(); FrammeAttributeData fLinkage = getFeatureLinkage(element); SimpleFeature feature = null; @@ -72,6 +72,7 @@ if (gobj != null) feature = SimpleFeatureBuilder.build(featureType, new Object[]{ gobj, + distId, fLinkage.getFsc(), (long) fLinkage.getUfid(), (short) fLinkage.getComponentID(), @@ -94,6 +95,7 @@ if (gobj != null) feature = SimpleFeatureBuilder.build(featureType, new Object[]{ gobj, + distId, fLinkage.getFsc(), (long) fLinkage.getUfid(), (short) fLinkage.getComponentID(), diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateSymbolStrategy.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateSymbolStrategy.java index 82d530f..62daf9b 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateSymbolStrategy.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateSymbolStrategy.java @@ -1,7 +1,6 @@ package com.ximple.eofms.filter; import com.vividsolutions.jts.geom.Coordinate; -import com.vividsolutions.jts.geom.CoordinateArrays; import com.vividsolutions.jts.geom.Envelope; import com.vividsolutions.jts.geom.Geometry; import com.vividsolutions.jts.geom.GeometryFactory; @@ -63,7 +62,7 @@ } public SimpleFeature createFeature(SimpleFeatureType featureType, Element element, - boolean useTransform) throws IllegalAttributeException { + short distId, boolean useTransform) throws IllegalAttributeException { DefaultColorTable colorTable = (DefaultColorTable) DefaultColorTable.getInstance(); FrammeAttributeData fLinkage = getFeatureLinkage(element); SimpleFeature feature = null; @@ -106,6 +105,7 @@ if (gobj != null) feature = SimpleFeatureBuilder.build(featureType, new Object[]{ gobj, + distId, fLinkage.getFsc(), (long) fLinkage.getUfid(), (short) fLinkage.getComponentID(), diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateTextStrategy.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateTextStrategy.java index b60ed7b..826019d 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateTextStrategy.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateTextStrategy.java @@ -6,11 +6,11 @@ import com.ximple.io.dgn7.*; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.geotools.feature.IllegalAttributeException; import org.geotools.feature.SchemaException; import org.geotools.feature.simple.SimpleFeatureBuilder; import org.geotools.feature.simple.SimpleFeatureTypeBuilder; import org.geotools.geometry.jts.JTSFactoryFinder; +import org.opengis.feature.IllegalAttributeException; import org.opengis.feature.simple.SimpleFeature; import org.opengis.feature.simple.SimpleFeatureType; @@ -55,7 +55,7 @@ } public SimpleFeature createFeature(SimpleFeatureType featureType, Element element, - boolean useTransform) throws IllegalAttributeException { + short distId, boolean useTransform) throws IllegalAttributeException { DefaultColorTable colorTable = (DefaultColorTable) DefaultColorTable.getInstance(); FrammeAttributeData fLinkage = getFeatureLinkage(element); SimpleFeature feature = null; @@ -77,6 +77,7 @@ if (gobj != null) feature = SimpleFeatureBuilder.build(featureType, new Object[]{ gobj, + distId, fLinkage.getFsc(), (long) fLinkage.getUfid(), (short) fLinkage.getComponentID(), @@ -115,6 +116,7 @@ if (gobj != null) feature = SimpleFeatureBuilder.build(featureType, new Object[]{ gobj, + distId, fLinkage.getFsc(), (long) fLinkage.getUfid(), (short) fLinkage.getComponentID(), diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/ElementDispatchableFilter.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/ElementDispatchableFilter.java index 526f932..e1462e2 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/ElementDispatchableFilter.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/ElementDispatchableFilter.java @@ -6,7 +6,7 @@ public interface ElementDispatchableFilter { public boolean isDispatchable(Element element); - public SimpleFeature execute(Element element, boolean useTransform); + public SimpleFeature execute(Element element, short distId, boolean useTransform); void setUseLongName(boolean useLongName); diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/ElementDispatcher.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/ElementDispatcher.java index dd0f8b3..6e7dd9f 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/ElementDispatcher.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/ElementDispatcher.java @@ -40,10 +40,10 @@ } } - public SimpleFeature execute(Element element, boolean useTransform) { + public SimpleFeature execute(Element element, short distId, boolean useTransform) { for (ElementDispatchableFilter rule : rules) { if (rule.isDispatchable(element)) { - return rule.execute(element, useTransform); + return rule.execute(element, distId, useTransform); } } return null; diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/TypeCompIdDispatchableFilter.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/TypeCompIdDispatchableFilter.java index 2325cb6..2a0a428 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/TypeCompIdDispatchableFilter.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/TypeCompIdDispatchableFilter.java @@ -3,8 +3,8 @@ import com.ximple.eofms.util.StringUtils; import com.ximple.io.dgn7.Element; import com.ximple.io.dgn7.FrammeAttributeData; -import org.geotools.feature.IllegalAttributeException; import org.geotools.feature.SchemaException; +import org.opengis.feature.IllegalAttributeException; import org.opengis.feature.simple.SimpleFeature; import org.opengis.feature.simple.SimpleFeatureType; @@ -75,11 +75,11 @@ (compareType(element) == 0); } - public SimpleFeature execute(Element element, boolean useTransform) { + public SimpleFeature execute(Element element, short distId, boolean useTransform) { try { String ftName = getFeatureTypeName(element); SimpleFeatureType ftype = createStrategy.createFeatureElement(ftName); - return createStrategy.createFeature(ftype, element, useTransform); + return createStrategy.createFeature(ftype, element, distId, useTransform); } catch (SchemaException e) { logger.error(e.getMessage(), e); } catch (IllegalAttributeException e) { diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/TypeCompLevelIdDispatchableFilter.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/TypeCompLevelIdDispatchableFilter.java index 30fb09e..b8e7cd0 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/TypeCompLevelIdDispatchableFilter.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/TypeCompLevelIdDispatchableFilter.java @@ -3,8 +3,8 @@ import com.ximple.eofms.util.StringUtils; import com.ximple.io.dgn7.Element; import com.ximple.io.dgn7.FrammeAttributeData; -import org.geotools.feature.IllegalAttributeException; import org.geotools.feature.SchemaException; +import org.opengis.feature.IllegalAttributeException; import org.opengis.feature.simple.SimpleFeature; import org.opengis.feature.simple.SimpleFeatureType; @@ -85,11 +85,11 @@ (lid == element.getLevelIndex()) && (compareLevel(element) == 0); } - public SimpleFeature execute(Element element, boolean useTransform) { + public SimpleFeature execute(Element element, short distId, boolean useTransform) { try { String ftName = getFeatureTypeName(element); SimpleFeatureType ftype = createStrategy.createFeatureElement(ftName); - return createStrategy.createFeature(ftype, element, useTransform); + return createStrategy.createFeature(ftype, element, distId, useTransform); } catch (SchemaException e) { logger.error(e.getMessage(), e); } catch (IllegalAttributeException e) { diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/TypeIdDispatchableFilter.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/TypeIdDispatchableFilter.java index 1a49206..02a84f2 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/TypeIdDispatchableFilter.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/TypeIdDispatchableFilter.java @@ -3,8 +3,8 @@ import com.ximple.eofms.util.StringUtils; import com.ximple.io.dgn7.Element; import com.ximple.io.dgn7.FrammeAttributeData; -import org.geotools.feature.IllegalAttributeException; import org.geotools.feature.SchemaException; +import org.opengis.feature.IllegalAttributeException; import org.opengis.feature.simple.SimpleFeature; import org.opengis.feature.simple.SimpleFeatureType; @@ -53,11 +53,11 @@ (compareType(element) == 0); } - public SimpleFeature execute(Element element, boolean useTransform) { + public SimpleFeature execute(Element element, short distId, boolean useTransform) { try { String ftName = getFeatureTypeName(element); SimpleFeatureType ftype = createStrategy.createFeatureElement(ftName); - return createStrategy.createFeature(ftype, element, useTransform); + return createStrategy.createFeature(ftype, element, distId, useTransform); } catch (SchemaException e) { logger.error(e.getMessage(), e); } catch (IllegalAttributeException e) { diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/AbstractOracleDatabaseJob.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/AbstractOracleDatabaseJob.java index d063e1c..3e1839e 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/AbstractOracleDatabaseJob.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/AbstractOracleDatabaseJob.java @@ -5,16 +5,21 @@ import java.io.InputStream; import java.nio.BufferOverflowException; import java.nio.ByteBuffer; +import java.sql.Connection; +import java.sql.ResultSet; import java.sql.SQLException; +import java.sql.Statement; import java.util.ArrayList; import java.util.Map; import java.util.StringTokenizer; import java.util.TreeMap; +import com.vividsolutions.jts.util.Assert; +import com.ximple.eofms.jobs.context.AbstractOracleJobContext; import com.ximple.eofms.util.FeatureTypeBuilderUtil; +import oracle.sql.BLOB; import org.apache.commons.logging.Log; import org.geotools.data.DataStore; -import org.geotools.data.DataStoreFinder; import org.geotools.data.oracle.OracleNGDataStoreFactory; import org.geotools.jdbc.JDBCDataStore; import org.quartz.Job; @@ -22,12 +27,6 @@ import org.quartz.JobDetail; import org.quartz.JobExecutionContext; import org.quartz.JobExecutionException; - -import com.vividsolutions.jts.util.Assert; - -import oracle.sql.BLOB; - -import com.ximple.eofms.jobs.context.AbstractOracleJobContext; public abstract class AbstractOracleDatabaseJob implements Job { /** @@ -443,4 +442,83 @@ public final void resetUpdateTime() { _updateTime = 0; } + + /** + * Connectivity (Connectivity) + * + * @param jobContext job context + * @throws java.sql.SQLException sql exception + */ + protected void copyConnectivity(AbstractOracleJobContext jobContext) throws SQLException { + Connection connection = jobContext.getOracleConnection(); + ResultSet rsMeta = connection.getMetaData().getTables(null, "BASEDB", + AbstractOracleJobContext.CONNECTIVITY_WEBCHECK_NAME + "%", + new String[]{"TABLE"}); + + boolean found = false; + try { + while (rsMeta.next()) { + String tablename = rsMeta.getString(3); + if (AbstractOracleJobContext.CONNECTIVITY_WEBCHECK_NAME.equalsIgnoreCase(tablename)) { + found = true; + break; + } + } + // } catch (SQLException e) + } finally { + if (rsMeta != null) { + rsMeta.close(); + rsMeta = null; + } + } + Statement stmt = connection.createStatement(); + if (found) { + stmt.execute(AbstractOracleJobContext.TRUNCATE_CONNECTIVITY_WEBCHECK); + } else { + getLogger().info("Create CONNECTIVITY_WEBCHECK table."); + stmt.execute(AbstractOracleJobContext.CREATE_CONNECTIVITY_WEBCHECK); + stmt.execute(AbstractOracleJobContext.CREATE_CONNECTIVITY_WEBCHECK_INDEX_1); + stmt.execute(AbstractOracleJobContext.CREATE_CONNECTIVITY_WEBCHECK_INDEX_2); + stmt.execute(AbstractOracleJobContext.CREATE_CONNECTIVITY_WEBCHECK_INDEX_3); + stmt.execute(AbstractOracleJobContext.CREATE_CONNECTIVITY_WEBCHECK_INDEX_4); + stmt.execute(AbstractOracleJobContext.CREATE_CONNECTIVITY_WEBCHECK_INDEX_5); + stmt.execute(AbstractOracleJobContext.CREATE_CONNECTIVITY_WEBCHECK_INDEX_6); + stmt.execute(AbstractOracleJobContext.ALTER_CONNECTIVITY_WEBCHECK_1); + stmt.execute(AbstractOracleJobContext.ALTER_CONNECTIVITY_WEBCHECK_2); + } + + stmt.execute(AbstractOracleJobContext.COPY_CONNECTIVITY_TO_WEBCHECK); + stmt.close(); + } + + protected void fetchTPData(AbstractOracleJobContext jobContext) { + Connection connection = jobContext.getOracleConnection(); + + try { + Statement stmt = connection.createStatement(); + ResultSet rs = stmt.executeQuery(AbstractOracleJobContext.FETCH_TPDATA); + short disId = rs.getShort(1); + jobContext.setDistId(disId); + + String distName = rs.getString(2); + jobContext.setDistName(distName); + + rs.close(); + stmt.close(); + } catch (SQLException e) { + getLogger().warn("HIBERNATE_SEQUENCE is already exist."); + } + } + + protected void createHibernateSequence(AbstractOracleJobContext jobContext) throws SQLException { + Connection connection = jobContext.getOracleConnection(); + + try { + Statement stmt = connection.createStatement(); + stmt.execute(AbstractOracleJobContext.CREATE_HIBERNATE_SEQUENCE); + stmt.close(); + } catch (SQLException e) { + getLogger().warn("HIBERNATE_SEQUENCE is already exist."); + } + } } diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/DummyFeatureConvertJobContext.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/DummyFeatureConvertJobContext.java index 765f981..32570d7 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/DummyFeatureConvertJobContext.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/DummyFeatureConvertJobContext.java @@ -34,8 +34,8 @@ import org.geotools.data.shapefile.ShapefileDataStore; import org.geotools.data.shapefile.indexed.IndexType; import org.geotools.data.shapefile.indexed.IndexedShapefileDataStore; -import org.geotools.feature.IllegalAttributeException; import org.geotools.feature.SchemaException; +import org.opengis.feature.IllegalAttributeException; import org.opengis.feature.simple.SimpleFeature; import org.opengis.feature.simple.SimpleFeatureType; import org.xml.sax.SAXException; @@ -103,7 +103,7 @@ return; } - SimpleFeature feature = elementDispatcher.execute(element, isTransformed()); + SimpleFeature feature = elementDispatcher.execute(element, getDistId(), isTransformed()); if (feature == null) { FrammeAttributeData linkage = AbstractFLinkageDispatchableFilter.getFeatureLinkage(element); diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertDgn2EdbGeoJob.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertDgn2EdbGeoJob.java index dee8809..48edd57 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertDgn2EdbGeoJob.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertDgn2EdbGeoJob.java @@ -113,7 +113,7 @@ boolean profileMode, boolean useTransform) { return new OracleConvertEdbGeoJobContext(getDataPath(), - getTargetDataStore(), targetSchemaName, filterPath, profileMode, useTransform); + getTargetDataStore(), targetSchemaName, filterPath, profileMode, useTransform); } protected void extractJobConfiguration(JobDetail jobDetail) throws JobExecutionException { @@ -232,18 +232,20 @@ OracleConvertEdbGeoJobContext jobContext = (OracleConvertEdbGeoJobContext) prepareJobContext(targetSchemaName, _filterPath, - isProfileMode(), isTransformed()); + isProfileMode(), isTransformed()); jobContext.setSourceDataStore(getSourceDataStore()); // jobContext.setConvertElementIn(_convertElementIn); jobContext.setElementLogging(checkElementLogging()); jobContext.setExecutionContext(context); createHibernateSequence(jobContext); + fetchTPData(jobContext); + logger.info("TPC DIST:" + jobContext.getDistId() + ":" + + ((jobContext.getDistName() == null) ? "NULL" : jobContext.getDistName())); long tStep = System.currentTimeMillis(); - if (isCopyConnectivityMode()) - { + if (isCopyConnectivityMode()) { copyConnectivity(jobContext); } @@ -333,73 +335,11 @@ (((int) ((tCurrent - tBefore) % 60000.0)) / 1000) + " sec"); } - /** - * Connectivity�ƻs�@�Ӫ����A�b�d�߹q�y��V�ɥΨӤ��OMS��Ʈw���q���s����(Connectivity) - * - * @param jobContext job context - * @throws SQLException sql exception - */ - private void copyConnectivity(OracleConvertEdbGeoJobContext jobContext) throws SQLException { - Connection connection = jobContext.getOracleConnection(); - ResultSet rsMeta = connection.getMetaData().getTables(null, "BASEDB", - AbstractOracleJobContext.CONNECTIVITY_WEBCHECK_NAME + "%", - new String[]{"TABLE"}); - - boolean found = false; - try { - while (rsMeta.next()) { - String tablename = rsMeta.getString(3); - if (AbstractOracleJobContext.CONNECTIVITY_WEBCHECK_NAME.equalsIgnoreCase(tablename)) { - found = true; - break; - } - } - // } catch (SQLException e) - } finally { - if (rsMeta != null) { - rsMeta.close(); - rsMeta = null; - } - } - Statement stmt = connection.createStatement(); - if (found) { - stmt.execute(AbstractOracleJobContext.TRUNCATE_CONNECTIVITY_WEBCHECK); - } else { - logger.info("Create CONNECTIVITY_WEBCHECK table."); - stmt.execute(AbstractOracleJobContext.CREATE_CONNECTIVITY_WEBCHECK); - stmt.execute(AbstractOracleJobContext.CREATE_CONNECTIVITY_WEBCHECK_INDEX_1); - stmt.execute(AbstractOracleJobContext.CREATE_CONNECTIVITY_WEBCHECK_INDEX_2); - stmt.execute(AbstractOracleJobContext.CREATE_CONNECTIVITY_WEBCHECK_INDEX_3); - stmt.execute(AbstractOracleJobContext.CREATE_CONNECTIVITY_WEBCHECK_INDEX_4); - stmt.execute(AbstractOracleJobContext.CREATE_CONNECTIVITY_WEBCHECK_INDEX_5); - stmt.execute(AbstractOracleJobContext.CREATE_CONNECTIVITY_WEBCHECK_INDEX_6); - stmt.execute(AbstractOracleJobContext.ALTER_CONNECTIVITY_WEBCHECK_1); - stmt.execute(AbstractOracleJobContext.ALTER_CONNECTIVITY_WEBCHECK_2); - } - - stmt.execute(AbstractOracleJobContext.COPY_CONNECTIVITY_TO_WEBCHECK); - stmt.close(); - } - - - private void createHibernateSequence(OracleConvertEdbGeoJobContext jobContext) throws SQLException { - Connection connection = jobContext.getOracleConnection(); - - try { - Statement stmt = connection.createStatement(); - stmt.execute(AbstractOracleJobContext.CREATE_HIBERNATE_SEQUENCE); - stmt.close(); - } catch (SQLException e) - { - logger.warn("HIBERNATE_SEQUENCE is already exist."); - } - } - private void exetcuteConvert(OracleConvertEdbGeoJobContext jobContext, String querySchema, String targetSchemaName) throws SQLException { int order = 0; OrderedMap map = getBlobStorageList(jobContext.getOracleConnection(), - querySchema, "SD$SPACENODES", null); + querySchema, "SD$SPACENODES", null); logger.info("begin convert job:[" + map.size() + "]:testmode=" + _testMode); @@ -407,16 +347,16 @@ int step = total / 100; int current = 0; - if (total == 0) { + if (total == 0) { logger.warn("SELECT COUNT FROM " + querySchema + ".SD$SPACENODES is zero."); return; } - logger.warn("SELECT COUNT FROM " + querySchema + ".SD$SPACENODES is " + map.size() ); + logger.warn("SELECT COUNT FROM " + querySchema + ".SD$SPACENODES is " + map.size()); //jobContext.startTransaction(); jobContext.setCurrentSchema(querySchema); jobContext.getExecutionContext().put("ConvertDgn2EdbGeoJobProgress", 0); - for (OrderedMapIterator it = map.orderedMapIterator(); it.hasNext();) { + for (OrderedMapIterator it = map.orderedMapIterator(); it.hasNext(); ) { it.next(); Pair pair = (Pair) it.getValue(); @@ -442,16 +382,14 @@ System.runFinalization(); } - if( step != 0) - { + if (step != 0) { int now = order % step; if (now != current) { current = now; jobContext.getExecutionContext().put("ConvertDgn2EdbGeoSpatialJob", current); } - }else - { + } else { jobContext.getExecutionContext().put("ConvertDgn2EdbGeoSpatialJob", current); current++; } @@ -725,7 +663,7 @@ if (dgnFile.isDirectory()) continue; IndexDgnConvertEdbGeoJobContext convertContext = new IndexDgnConvertEdbGeoJobContext(getDataPath(), getTargetDataStore(), targetSchemaName, - isProfileMode(), isTransformed()); + isProfileMode(), isTransformed()); logger.info("--- start index dgnfile-" + dgnFile.toString() + " ---"); FileInputStream fs = null; FileChannel fc = null; @@ -772,8 +710,7 @@ } finally { convertContext.closeFeatureWriter(); - if (reader != null) - { + if (reader != null) { try { reader.close(); } catch (IOException e) { @@ -849,7 +786,7 @@ // } //} else { // if (element instanceof ShapeElement) { - convertContext.putFeatureCollection(element); + convertContext.putFeatureCollection(element); // } //} } @@ -884,7 +821,7 @@ GeneralDgnConvertEdbGeoJobContext convertContext = new GeneralDgnConvertEdbGeoJobContext(getDataPath(), getTargetDataStore(), targetSchemaName, - isProfileMode(), isTransformed()); + isProfileMode(), isTransformed()); logger.info("--- start other dgnfile-" + dgnFile.toString() + " ---"); FileInputStream fs = null; FileChannel fc; @@ -930,8 +867,7 @@ } finally { convertContext.closeFeatureWriter(); - if (reader != null) - { + if (reader != null) { try { reader.close(); } catch (IOException e) { @@ -1067,7 +1003,7 @@ for (File dgnFile : dgnFiles) { FeatureDgnConvertEdbGeoJobContext convertContext = new FeatureDgnConvertEdbGeoJobContext(getDataPath(), getTargetDataStore(), targetSchemaName, _filterPath, - isProfileMode(), isTransformed()); + isProfileMode(), isTransformed()); logger.info("--- start dgnfile-" + dgnFile.toString() + " ---"); try { convertContext.setExecutionContext(context); diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertDgn2MySQLJob.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertDgn2MySQLJob.java index 960cbf0..a6c4a1a 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertDgn2MySQLJob.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertDgn2MySQLJob.java @@ -203,6 +203,10 @@ jobContext.setElementLogging(checkElementLogging()); jobContext.setExecutionContext(context); + fetchTPData(jobContext); + logger.info("TPC DIST:" + jobContext.getDistId() + ":" + + ((jobContext.getDistName() == null) ? "NULL" : jobContext.getDistName())); + if (bFirst) copyConnectivity(jobContext); else @@ -246,19 +250,6 @@ throw new JobExecutionException("IO error. " + ex.getMessage(), ex); } logger.warn(jobName + " end at " + new Date()); - } - - /** - * Connectivity�ƻs�@�Ӫ����A�b�d�߹q�y��V�ɥΨӤ��OMS��Ʈw���q���s����(Connectivity) - * - * @param jobContext job context - * @throws SQLException sql exception - */ - private void copyConnectivity(OracleConvertMySQLJobContext jobContext) throws SQLException { - Connection connection = jobContext.getOracleConnection(); - Statement stmt = connection.createStatement(); - stmt.execute(AbstractOracleJobContext.TRUNCATE_CONNECTIVITY_WEBCHECK); - stmt.execute(AbstractOracleJobContext.COPY_CONNECTIVITY_TO_WEBCHECK); } private void exetcuteConvert(OracleConvertMySQLJobContext jobContext, diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertDgn2OraSDOJob.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertDgn2OraSDOJob.java index 1a3a4ee..910cde7 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertDgn2OraSDOJob.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertDgn2OraSDOJob.java @@ -206,6 +206,10 @@ jobContext.setElementLogging(checkElementLogging()); jobContext.setExecutionContext(context); + fetchTPData(jobContext); + logger.info("TPC DIST:" + jobContext.getDistId() + ":" + + ((jobContext.getDistName() == null) ? "NULL" : jobContext.getDistName())); + if (bFirst) copyConnectivity(jobContext); else @@ -249,20 +253,6 @@ throw new JobExecutionException("IO error. " + ex.getMessage(), ex); } logger.warn(jobName + " end at " + new Date()); - } - - /** - * Connectivity�ƻs�@�Ӫ����A�b�d�߹q�y��V�ɥΨӤ��OMS��Ʈw���q���s����(Connectivity) - * - * @param jobContext job context - * @throws SQLException sql exception - */ - private void copyConnectivity(OracleConvertOraSDOJobContext jobContext) throws SQLException { - Connection connection = jobContext.getOracleConnection(); - Statement stmt = connection.createStatement(); - stmt.execute(AbstractOracleJobContext.TRUNCATE_CONNECTIVITY_WEBCHECK); - stmt.execute(AbstractOracleJobContext.COPY_CONNECTIVITY_TO_WEBCHECK); - JDBCUtils.close(stmt); } private void exetcuteConvert(OracleConvertOraSDOJobContext jobContext, diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertDgn2PostGISJob.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertDgn2PostGISJob.java index df6d3b8..c7e0cb9 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertDgn2PostGISJob.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertDgn2PostGISJob.java @@ -249,6 +249,10 @@ long tStep = System.currentTimeMillis(); + fetchTPData(jobContext); + logger.info("TPC DIST:" + jobContext.getDistId() + ":" + + ((jobContext.getDistName() == null) ? "NULL" : jobContext.getDistName())); + if (isCopyConnectivityMode()) { copyConnectivity(jobContext); } @@ -337,67 +341,6 @@ private void logTimeDiff(String message, long tBefore, long tCurrent) { logger.warn(message + ":use time = " + ((int) ((tCurrent - tBefore) / 60000.0)) + " min - " + (((int) ((tCurrent - tBefore) % 60000.0)) / 1000) + " sec"); - } - - /** - * Connectivity�ƻs�@�Ӫ����A�b�d�߹q�y��V�ɥΨӤ��OMS��Ʈw���q���s����(Connectivity) - * - * @param jobContext job context - * @throws SQLException sql exception - */ - private void copyConnectivity(OracleConvertPostGISJobContext jobContext) throws SQLException { - Connection connection = jobContext.getOracleConnection(); - ResultSet rsMeta = connection.getMetaData().getTables(null, "BASEDB", - AbstractOracleJobContext.CONNECTIVITY_WEBCHECK_NAME + "%", - new String[]{"TABLE"}); - - boolean found = false; - try { - while (rsMeta.next()) { - String tablename = rsMeta.getString(3); - if (AbstractOracleJobContext.CONNECTIVITY_WEBCHECK_NAME.equalsIgnoreCase(tablename)) { - found = true; - break; - } - } - // } catch (SQLException e) - } finally { - if (rsMeta != null) { - rsMeta.close(); - rsMeta = null; - } - } - Statement stmt = connection.createStatement(); - if (found) { - stmt.execute(AbstractOracleJobContext.TRUNCATE_CONNECTIVITY_WEBCHECK); - } else { - logger.info("Create CONNECTIVITY_WEBCHECK table."); - stmt.execute(AbstractOracleJobContext.CREATE_CONNECTIVITY_WEBCHECK); - stmt.execute(AbstractOracleJobContext.CREATE_CONNECTIVITY_WEBCHECK_INDEX_1); - stmt.execute(AbstractOracleJobContext.CREATE_CONNECTIVITY_WEBCHECK_INDEX_2); - stmt.execute(AbstractOracleJobContext.CREATE_CONNECTIVITY_WEBCHECK_INDEX_3); - stmt.execute(AbstractOracleJobContext.CREATE_CONNECTIVITY_WEBCHECK_INDEX_4); - stmt.execute(AbstractOracleJobContext.CREATE_CONNECTIVITY_WEBCHECK_INDEX_5); - stmt.execute(AbstractOracleJobContext.CREATE_CONNECTIVITY_WEBCHECK_INDEX_6); - stmt.execute(AbstractOracleJobContext.ALTER_CONNECTIVITY_WEBCHECK_1); - stmt.execute(AbstractOracleJobContext.ALTER_CONNECTIVITY_WEBCHECK_2); - } - - stmt.execute(AbstractOracleJobContext.COPY_CONNECTIVITY_TO_WEBCHECK); - stmt.close(); - } - - - private void createHibernateSequence(OracleConvertPostGISJobContext jobContext) throws SQLException { - Connection connection = jobContext.getOracleConnection(); - - try { - Statement stmt = connection.createStatement(); - stmt.execute(AbstractOracleJobContext.CREATE_HIBERNATE_SEQUENCE); - stmt.close(); - } catch (SQLException e) { - logger.warn("HIBERNATE_SEQUENCE is already exist."); - } } private void exetcuteConvert(OracleConvertPostGISJobContext jobContext, diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertDgn2ShpJob.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertDgn2ShpJob.java index 62660e8..a01d871 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertDgn2ShpJob.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertDgn2ShpJob.java @@ -118,6 +118,10 @@ jobContext.setElementLogging(checkElementLogging()); jobContext.setExecutionContext(context); + fetchTPData(jobContext); + logger.info("TPC DIST:" + jobContext.getDistId() + ":" + + ((jobContext.getDistName() == null) ? "NULL" : jobContext.getDistName())); + if (bFirst) { copyConnectivity(jobContext); bFirst = false; @@ -157,19 +161,6 @@ throw new JobExecutionException("IO error. " + ex.getMessage(), ex); } logger.warn(jobName + " end at " + new Date()); - } - - /** - * Connectivity�ƻs�@�Ӫ����A�b�d�߹q�y��V�ɥΨӤ��OMS��Ʈw���q���s����(Connectivity) - * - * @param jobContext job context - * @throws SQLException sql exception - */ - private void copyConnectivity(OracleConvertShapefilesJobContext jobContext) throws SQLException { - Connection connection = jobContext.getOracleConnection(); - Statement stmt = connection.createStatement(); - stmt.execute(OracleConvertShapefilesJobContext.TRUNCATE_CONNECTIVITY_WEBCHECK); - stmt.execute(OracleConvertShapefilesJobContext.COPY_CONNECTIVITY_TO_WEBCHECK); } private void exetcuteConvert(OracleConvertShapefilesJobContext jobContext, diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/AbstractDgnFileJobContext.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/AbstractDgnFileJobContext.java index 28a05e0..42837f8 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/AbstractDgnFileJobContext.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/AbstractDgnFileJobContext.java @@ -36,6 +36,8 @@ private long _processTimeStart; private long _updateTimeStart; + private short distId; + // --------------------------- CONSTRUCTORS --------------------------- public AbstractDgnFileJobContext(String dataPath, boolean profileMode, @@ -79,7 +81,15 @@ return _useTransform; } -// -------------------------- OTHER METHODS -------------------------- + public short getDistId() { + return distId; + } + + public void setDistId(short distId) { + this.distId = distId; + } + + // -------------------------- OTHER METHODS -------------------------- public final void accumulateProcessTime() { _processTime += System.currentTimeMillis() - _processTimeStart; diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/AbstractOracleJobContext.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/AbstractOracleJobContext.java index 9d0e097..0b72ea5 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/AbstractOracleJobContext.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/AbstractOracleJobContext.java @@ -236,6 +236,8 @@ " CACHE 20\n" + " NOORDER"; + public static String FETCH_TPDATA = "SELECT TPID, TPNAME FROM BASEDB.TPDATA"; + /** * */ @@ -256,6 +258,9 @@ private Connection connection = null; private boolean profileMode; private boolean useTransform; + + private short distId; + private String distName; private long _processTime; private long _updateTime; @@ -364,4 +369,20 @@ public final void resetProcessTime() { _processTime = 0; } + + public short getDistId() { + return distId; + } + + public void setDistId(short distId) { + this.distId = distId; + } + + public String getDistName() { + return distName; + } + + public void setDistName(String distName) { + this.distName = distName; + } } diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/edbgeo/DummyFeatureConvertEdbGeoJobContext.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/edbgeo/DummyFeatureConvertEdbGeoJobContext.java index a486435..00994c7 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/edbgeo/DummyFeatureConvertEdbGeoJobContext.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/edbgeo/DummyFeatureConvertEdbGeoJobContext.java @@ -20,8 +20,8 @@ import org.geotools.data.DataStore; import org.geotools.data.FeatureWriter; import org.geotools.data.Transaction; -import org.geotools.feature.IllegalAttributeException; import org.geotools.feature.SchemaException; +import org.opengis.feature.IllegalAttributeException; import org.opengis.feature.simple.SimpleFeature; import org.opengis.feature.simple.SimpleFeatureType; import org.xml.sax.SAXException; @@ -102,7 +102,7 @@ } // �P�_�O�_�ũM��� - SimpleFeature feature = elementDispatcher.execute(element, isTransformed()); + SimpleFeature feature = elementDispatcher.execute(element, getDistId(), isTransformed()); if (feature == null) { FrammeAttributeData linkage = AbstractFLinkageDispatchableFilter.getFeatureLinkage(element); diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/edbgeo/FeatureDgnConvertEdbGeoJobContext.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/edbgeo/FeatureDgnConvertEdbGeoJobContext.java index dd4f1f0..bbd1b61 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/edbgeo/FeatureDgnConvertEdbGeoJobContext.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/edbgeo/FeatureDgnConvertEdbGeoJobContext.java @@ -26,7 +26,7 @@ import org.geotools.data.DataStore; import org.geotools.data.FeatureWriter; import org.geotools.data.Transaction; -import org.geotools.feature.IllegalAttributeException; +import org.opengis.feature.IllegalAttributeException; import org.geotools.feature.SchemaException; import org.opengis.feature.simple.SimpleFeature; import org.opengis.feature.simple.SimpleFeatureType; @@ -95,7 +95,7 @@ } // �P�_�O�_�ũM��� - SimpleFeature feature = elementDispatcher.execute(element, isTransformed()); + SimpleFeature feature = elementDispatcher.execute(element, getDistId(), isTransformed()); if (feature == null) { FrammeAttributeData linkage = AbstractFLinkageDispatchableFilter.getFeatureLinkage(element); diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/edbgeo/GeneralDgnConvertEdbGeoJobContext.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/edbgeo/GeneralDgnConvertEdbGeoJobContext.java index 71c63e0..b7bf7f1 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/edbgeo/GeneralDgnConvertEdbGeoJobContext.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/edbgeo/GeneralDgnConvertEdbGeoJobContext.java @@ -20,7 +20,7 @@ import org.geotools.data.DataStore; import org.geotools.data.Transaction; import org.geotools.data.jdbc.JDBCUtils; -import org.geotools.feature.IllegalAttributeException; +import org.opengis.feature.IllegalAttributeException; import org.geotools.feature.SchemaException; import org.geotools.feature.simple.SimpleFeatureBuilder; import org.geotools.feature.simple.SimpleFeatureTypeBuilder; diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/edbgeo/IndexDgnConvertEdbGeoJobContext.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/edbgeo/IndexDgnConvertEdbGeoJobContext.java index 8b5b1da..f5c18d2 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/edbgeo/IndexDgnConvertEdbGeoJobContext.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/edbgeo/IndexDgnConvertEdbGeoJobContext.java @@ -20,7 +20,7 @@ import org.geotools.data.DataStore; import org.geotools.data.Transaction; import org.geotools.data.jdbc.JDBCUtils; -import org.geotools.feature.IllegalAttributeException; +import org.opengis.feature.IllegalAttributeException; import org.geotools.feature.SchemaException; import org.geotools.feature.simple.SimpleFeatureBuilder; import org.geotools.feature.simple.SimpleFeatureTypeBuilder; diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/edbgeo/OracleConvertEdbGeoJobContext.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/edbgeo/OracleConvertEdbGeoJobContext.java index 08c0be1..ff59cba 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/edbgeo/OracleConvertEdbGeoJobContext.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/edbgeo/OracleConvertEdbGeoJobContext.java @@ -117,7 +117,7 @@ public void putFeatureCollection(Element element) { assert elementDispatcher != null; // 判斷是否符和條件 - SimpleFeature feature = elementDispatcher.execute(element, isTransformed()); + SimpleFeature feature = elementDispatcher.execute(element, getDistId(), isTransformed()); if (feature == null) { boolean isEmptySize = false; FrammeAttributeData linkage = diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/mysql/DummyFeatureConvertMySQlJobContext.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/mysql/DummyFeatureConvertMySQlJobContext.java index 98c1a11..fed5a05 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/mysql/DummyFeatureConvertMySQlJobContext.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/mysql/DummyFeatureConvertMySQlJobContext.java @@ -30,8 +30,8 @@ import org.geotools.data.DataStore; import org.geotools.data.FeatureWriter; import org.geotools.data.Transaction; -import org.geotools.feature.IllegalAttributeException; import org.geotools.feature.SchemaException; +import org.opengis.feature.IllegalAttributeException; import org.opengis.feature.simple.SimpleFeature; import org.opengis.feature.simple.SimpleFeatureType; import org.xml.sax.SAXException; @@ -100,7 +100,7 @@ return; } - SimpleFeature feature = elementDispatcher.execute(element, isTransformed()); + SimpleFeature feature = elementDispatcher.execute(element, getDistId(), isTransformed()); if (feature == null) { FrammeAttributeData linkage = AbstractFLinkageDispatchableFilter.getFeatureLinkage(element); diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/mysql/FeatureDgnConvertMySQLJobContext.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/mysql/FeatureDgnConvertMySQLJobContext.java index 5c1cef7..5fe25da 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/mysql/FeatureDgnConvertMySQLJobContext.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/mysql/FeatureDgnConvertMySQLJobContext.java @@ -26,7 +26,7 @@ import org.geotools.data.DataStore; import org.geotools.data.FeatureWriter; import org.geotools.data.Transaction; -import org.geotools.feature.IllegalAttributeException; +import org.opengis.feature.IllegalAttributeException; import org.geotools.feature.SchemaException; import org.opengis.feature.simple.SimpleFeature; import org.opengis.feature.simple.SimpleFeatureType; @@ -94,7 +94,7 @@ } // �P�_�O�_�ũM��� - SimpleFeature feature = elementDispatcher.execute(element, isTransformed()); + SimpleFeature feature = elementDispatcher.execute(element, getDistId(), isTransformed()); if (feature == null) { FrammeAttributeData linkage = AbstractFLinkageDispatchableFilter.getFeatureLinkage(element); diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/mysql/GeneralDgnConvertMySQLJobContext.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/mysql/GeneralDgnConvertMySQLJobContext.java index f9d7653..fd6e545 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/mysql/GeneralDgnConvertMySQLJobContext.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/mysql/GeneralDgnConvertMySQLJobContext.java @@ -18,7 +18,7 @@ import org.geotools.data.DataStore; import org.geotools.data.FeatureWriter; import org.geotools.data.Transaction; -import org.geotools.feature.IllegalAttributeException; +import org.opengis.feature.IllegalAttributeException; import org.geotools.feature.SchemaException; import com.vividsolutions.jts.geom.Geometry; diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/mysql/IndexDgnConvertMySQLJobContext.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/mysql/IndexDgnConvertMySQLJobContext.java index fc2cbc3..e3db39c 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/mysql/IndexDgnConvertMySQLJobContext.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/mysql/IndexDgnConvertMySQLJobContext.java @@ -17,7 +17,7 @@ import org.geotools.data.DataStore; import org.geotools.data.FeatureWriter; import org.geotools.data.Transaction; -import org.geotools.feature.IllegalAttributeException; +import org.opengis.feature.IllegalAttributeException; import org.geotools.feature.SchemaException; import com.vividsolutions.jts.geom.Coordinate; diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/mysql/OracleConvertMySQLJobContext.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/mysql/OracleConvertMySQLJobContext.java index c7e0336..b098d69 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/mysql/OracleConvertMySQLJobContext.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/mysql/OracleConvertMySQLJobContext.java @@ -22,7 +22,7 @@ import org.geotools.data.FeatureWriter; import org.geotools.data.Transaction; import org.geotools.data.mysql.MySQLDataStoreFactory; -import org.geotools.feature.IllegalAttributeException; +import org.opengis.feature.IllegalAttributeException; import org.opengis.feature.simple.SimpleFeature; import org.opengis.feature.simple.SimpleFeatureType; import org.quartz.JobExecutionContext; @@ -111,7 +111,7 @@ public void putFeatureCollection(Element element) { assert elementDispatcher != null; - SimpleFeature feature = elementDispatcher.execute(element, isTransformed()); + SimpleFeature feature = elementDispatcher.execute(element, getDistId(), isTransformed()); if (feature == null) { boolean isEmptySize = false; FrammeAttributeData linkage = diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/orasdo/DummyFeatureConvertOraSDOJobContext.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/orasdo/DummyFeatureConvertOraSDOJobContext.java index 70683e1..e614716 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/orasdo/DummyFeatureConvertOraSDOJobContext.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/orasdo/DummyFeatureConvertOraSDOJobContext.java @@ -30,7 +30,7 @@ import org.geotools.data.DataStore; import org.geotools.data.FeatureWriter; import org.geotools.data.Transaction; -import org.geotools.feature.IllegalAttributeException; +import org.opengis.feature.IllegalAttributeException; import org.geotools.feature.SchemaException; import org.opengis.feature.simple.SimpleFeature; import org.opengis.feature.simple.SimpleFeatureType; @@ -101,7 +101,7 @@ } // �P�_�O�_�ũM��� - SimpleFeature feature = elementDispatcher.execute(element, isTransformed()); + SimpleFeature feature = elementDispatcher.execute(element, getDistId(), isTransformed()); if (feature == null) { FrammeAttributeData linkage = AbstractFLinkageDispatchableFilter.getFeatureLinkage(element); diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/orasdo/FeatureDgnConvertOraSDOJobContext.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/orasdo/FeatureDgnConvertOraSDOJobContext.java index c24b318..b3ad10c 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/orasdo/FeatureDgnConvertOraSDOJobContext.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/orasdo/FeatureDgnConvertOraSDOJobContext.java @@ -26,8 +26,8 @@ import org.geotools.data.DataStore; import org.geotools.data.FeatureWriter; import org.geotools.data.Transaction; -import org.geotools.feature.IllegalAttributeException; import org.geotools.feature.SchemaException; +import org.opengis.feature.IllegalAttributeException; import org.opengis.feature.simple.SimpleFeature; import org.opengis.feature.simple.SimpleFeatureType; import org.xml.sax.SAXException; @@ -93,7 +93,7 @@ return; } - SimpleFeature feature = elementDispatcher.execute(element, isTransformed()); + SimpleFeature feature = elementDispatcher.execute(element, getDistId(), isTransformed()); if (feature == null) { FrammeAttributeData linkage = AbstractFLinkageDispatchableFilter.getFeatureLinkage(element); diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/orasdo/GeneralDgnConvertOraSDOJobContext.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/orasdo/GeneralDgnConvertOraSDOJobContext.java index 917fe6e..aa49733 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/orasdo/GeneralDgnConvertOraSDOJobContext.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/orasdo/GeneralDgnConvertOraSDOJobContext.java @@ -18,7 +18,7 @@ import org.geotools.data.DataStore; import org.geotools.data.FeatureWriter; import org.geotools.data.Transaction; -import org.geotools.feature.IllegalAttributeException; +import org.opengis.feature.IllegalAttributeException; import org.geotools.feature.SchemaException; import com.vividsolutions.jts.geom.Geometry; diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/orasdo/IndexDgnConvertOraSDOJobContext.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/orasdo/IndexDgnConvertOraSDOJobContext.java index a44df88..ad05038 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/orasdo/IndexDgnConvertOraSDOJobContext.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/orasdo/IndexDgnConvertOraSDOJobContext.java @@ -17,7 +17,7 @@ import org.geotools.data.DataStore; import org.geotools.data.FeatureWriter; import org.geotools.data.Transaction; -import org.geotools.feature.IllegalAttributeException; +import org.opengis.feature.IllegalAttributeException; import org.geotools.feature.SchemaException; import com.vividsolutions.jts.geom.Coordinate; diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/orasdo/OracleConvertOraSDOJobContext.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/orasdo/OracleConvertOraSDOJobContext.java index 09d4d6b..ef84d07 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/orasdo/OracleConvertOraSDOJobContext.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/orasdo/OracleConvertOraSDOJobContext.java @@ -29,7 +29,7 @@ import org.geotools.data.FeatureWriter; import org.geotools.data.Transaction; import org.geotools.data.oracle.OracleNGDataStoreFactory; -import org.geotools.feature.IllegalAttributeException; +import org.opengis.feature.IllegalAttributeException; import org.opengis.feature.simple.SimpleFeature; import org.opengis.feature.simple.SimpleFeatureType; import org.quartz.JobExecutionContext; @@ -109,7 +109,7 @@ public void putFeatureCollection(Element element) { assert elementDispatcher != null; - SimpleFeature feature = elementDispatcher.execute(element, isTransformed()); + SimpleFeature feature = elementDispatcher.execute(element, getDistId(), isTransformed()); if (feature == null) { boolean isEmptySize = false; FrammeAttributeData linkage = diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/DummyFeatureConvertPostGISJobContext.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/DummyFeatureConvertPostGISJobContext.java index 85319ca..5130597 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/DummyFeatureConvertPostGISJobContext.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/DummyFeatureConvertPostGISJobContext.java @@ -30,8 +30,8 @@ import org.geotools.data.DataStore; import org.geotools.data.FeatureWriter; import org.geotools.data.Transaction; -import org.geotools.feature.IllegalAttributeException; import org.geotools.feature.SchemaException; +import org.opengis.feature.IllegalAttributeException; import org.opengis.feature.simple.SimpleFeature; import org.opengis.feature.simple.SimpleFeatureType; import org.xml.sax.SAXException; @@ -101,7 +101,7 @@ } // �P�_�O�_�ũM��� - SimpleFeature feature = elementDispatcher.execute(element, isTransformed()); + SimpleFeature feature = elementDispatcher.execute(element, getDistId(), isTransformed()); if (feature == null) { FrammeAttributeData linkage = AbstractFLinkageDispatchableFilter.getFeatureLinkage(element); diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/FeatureDgnConvertPostGISJobContext.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/FeatureDgnConvertPostGISJobContext.java index 27be640..e6c41d6 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/FeatureDgnConvertPostGISJobContext.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/FeatureDgnConvertPostGISJobContext.java @@ -26,7 +26,7 @@ import org.geotools.data.DataStore; import org.geotools.data.FeatureWriter; import org.geotools.data.Transaction; -import org.geotools.feature.IllegalAttributeException; +import org.opengis.feature.IllegalAttributeException; import org.geotools.feature.SchemaException; import org.opengis.feature.simple.SimpleFeature; import org.opengis.feature.simple.SimpleFeatureType; @@ -95,7 +95,7 @@ } // �P�_�O�_�ũM��� - SimpleFeature feature = elementDispatcher.execute(element, isTransformed()); + SimpleFeature feature = elementDispatcher.execute(element, getDistId(), isTransformed()); if (feature == null) { FrammeAttributeData linkage = AbstractFLinkageDispatchableFilter.getFeatureLinkage(element); diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/GeneralDgnConvertPostGISJobContext.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/GeneralDgnConvertPostGISJobContext.java index d1ab3cc..84993eb 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/GeneralDgnConvertPostGISJobContext.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/GeneralDgnConvertPostGISJobContext.java @@ -13,30 +13,9 @@ import java.util.List; import java.util.TreeMap; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.apache.commons.transaction.util.CommonsLoggingLogger; -import org.apache.commons.transaction.util.LoggerFacade; -import org.geotools.data.DataStore; -import org.geotools.data.Transaction; -import org.geotools.data.jdbc.JDBCUtils; -import org.geotools.feature.IllegalAttributeException; -import org.geotools.feature.SchemaException; -import org.geotools.feature.simple.SimpleFeatureBuilder; -import org.geotools.feature.simple.SimpleFeatureTypeBuilder; -import org.geotools.feature.type.FeatureTypeImpl; -import org.geotools.geometry.jts.JTSFactoryFinder; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.feature.simple.SimpleFeatureType; -import org.opengis.feature.type.FeatureType; -import org.postgresql.util.PSQLException; - import com.vividsolutions.jts.geom.Geometry; import com.vividsolutions.jts.geom.GeometryFactory; - import com.ximple.eofms.util.DefaultColorTable; -import com.ximple.eofms.util.EPSG3825GeometryConverterDecorator; -import com.ximple.eofms.util.EPSG3826GeometryConverterDecorator; import com.ximple.eofms.util.FeatureTypeBuilderUtil; import com.ximple.eofms.util.GeometryConverterDecorator; import com.ximple.io.dgn7.ArcElement; @@ -50,6 +29,21 @@ import com.ximple.io.dgn7.TextElement; import com.ximple.io.dgn7.TextNodeElement; import com.ximple.io.dgn7.UserAttributeData; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.commons.transaction.util.CommonsLoggingLogger; +import org.apache.commons.transaction.util.LoggerFacade; +import org.geotools.data.DataStore; +import org.geotools.data.Transaction; +import org.geotools.data.jdbc.JDBCUtils; +import org.geotools.feature.SchemaException; +import org.geotools.feature.simple.SimpleFeatureBuilder; +import org.geotools.feature.simple.SimpleFeatureTypeBuilder; +import org.geotools.geometry.jts.JTSFactoryFinder; +import org.opengis.feature.IllegalAttributeException; +import org.opengis.feature.simple.SimpleFeature; +import org.opengis.feature.simple.SimpleFeatureType; +import org.postgresql.util.PSQLException; public class GeneralDgnConvertPostGISJobContext extends AbstractDgnToPostGISJobContext { static final Log logger = LogFactory.getLog(GeneralDgnConvertPostGISJobContext.class); diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/IndexDgnConvertPostGISJobContext.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/IndexDgnConvertPostGISJobContext.java index 484ee30..8c612ca 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/IndexDgnConvertPostGISJobContext.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/IndexDgnConvertPostGISJobContext.java @@ -13,29 +13,11 @@ import java.util.Iterator; import java.util.List; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.apache.commons.transaction.util.CommonsLoggingLogger; -import org.apache.commons.transaction.util.LoggerFacade; -import org.geotools.data.DataStore; -import org.geotools.data.Transaction; -import org.geotools.data.jdbc.JDBCUtils; -import org.geotools.feature.IllegalAttributeException; -import org.geotools.feature.SchemaException; -import org.geotools.feature.simple.SimpleFeatureBuilder; -import org.geotools.feature.simple.SimpleFeatureTypeBuilder; -import org.geotools.feature.type.FeatureTypeImpl; -import org.geotools.geometry.jts.JTSFactoryFinder; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.feature.simple.SimpleFeatureType; -import org.postgresql.util.PSQLException; - import com.vividsolutions.jts.geom.Coordinate; import com.vividsolutions.jts.geom.Envelope; import com.vividsolutions.jts.geom.Geometry; import com.vividsolutions.jts.geom.GeometryFactory; import com.vividsolutions.jts.geom.Polygon; - import com.ximple.eofms.util.DefaultColorTable; import com.ximple.eofms.util.FeatureTypeBuilderUtil; import com.ximple.eofms.util.GeometryConverterDecorator; @@ -46,6 +28,21 @@ import com.ximple.io.dgn7.ShapeElement; import com.ximple.io.dgn7.TextElement; import com.ximple.io.dgn7.UserAttributeData; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.commons.transaction.util.CommonsLoggingLogger; +import org.apache.commons.transaction.util.LoggerFacade; +import org.geotools.data.DataStore; +import org.geotools.data.Transaction; +import org.geotools.data.jdbc.JDBCUtils; +import org.geotools.feature.SchemaException; +import org.geotools.feature.simple.SimpleFeatureBuilder; +import org.geotools.feature.simple.SimpleFeatureTypeBuilder; +import org.geotools.geometry.jts.JTSFactoryFinder; +import org.opengis.feature.IllegalAttributeException; +import org.opengis.feature.simple.SimpleFeature; +import org.opengis.feature.simple.SimpleFeatureType; +import org.postgresql.util.PSQLException; public class IndexDgnConvertPostGISJobContext extends AbstractDgnToPostGISJobContext { diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/OracleConvertPostGISJobContext.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/OracleConvertPostGISJobContext.java index 853f72e..e3c3ff4 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/OracleConvertPostGISJobContext.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/OracleConvertPostGISJobContext.java @@ -115,7 +115,7 @@ public void putFeatureCollection(Element element) { assert elementDispatcher != null; // 判斷是否符和條件 - SimpleFeature feature = elementDispatcher.execute(element, isTransformed()); + SimpleFeature feature = elementDispatcher.execute(element, getDistId(), isTransformed()); if (feature == null) { boolean isEmptySize = false; FrammeAttributeData linkage = diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/shapefile/DummyFeatureConvertShpJobContext.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/shapefile/DummyFeatureConvertShpJobContext.java index d2f85db..294ec52 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/shapefile/DummyFeatureConvertShpJobContext.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/shapefile/DummyFeatureConvertShpJobContext.java @@ -33,8 +33,8 @@ import org.geotools.data.shapefile.ShapefileDataStore; import org.geotools.data.shapefile.indexed.IndexType; import org.geotools.data.shapefile.indexed.IndexedShapefileDataStore; -import org.geotools.feature.IllegalAttributeException; import org.geotools.feature.SchemaException; +import org.opengis.feature.IllegalAttributeException; import org.opengis.feature.simple.SimpleFeature; import org.opengis.feature.simple.SimpleFeatureType; import org.xml.sax.SAXException; @@ -104,7 +104,7 @@ } // �P�_�O�_�ũM��� - SimpleFeature feature = elementDispatcher.execute(element, isTransformed()); + SimpleFeature feature = elementDispatcher.execute(element, getDistId(), isTransformed()); if (feature == null) { FrammeAttributeData linkage = AbstractFLinkageDispatchableFilter.getFeatureLinkage(element); diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/shapefile/FeatureDgnConvertShpJobContext.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/shapefile/FeatureDgnConvertShpJobContext.java index ffc965e..6134e18 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/shapefile/FeatureDgnConvertShpJobContext.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/shapefile/FeatureDgnConvertShpJobContext.java @@ -29,8 +29,8 @@ import org.geotools.data.shapefile.ShapefileDataStore; import org.geotools.data.shapefile.indexed.IndexType; import org.geotools.data.shapefile.indexed.IndexedShapefileDataStore; -import org.geotools.feature.IllegalAttributeException; import org.geotools.feature.SchemaException; +import org.opengis.feature.IllegalAttributeException; import org.opengis.feature.simple.SimpleFeature; import org.opengis.feature.simple.SimpleFeatureType; import org.xml.sax.SAXException; @@ -102,7 +102,7 @@ } // �P�_�O�_�ũM��� - SimpleFeature feature = elementDispatcher.execute(element, isTransformed()); + SimpleFeature feature = elementDispatcher.execute(element, getDistId(), isTransformed()); if (feature == null) { FrammeAttributeData linkage = AbstractFLinkageDispatchableFilter.getFeatureLinkage(element); diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/shapefile/GeneralDgnConvertShpJobContext.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/shapefile/GeneralDgnConvertShpJobContext.java index a7df08f..b290c17 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/shapefile/GeneralDgnConvertShpJobContext.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/shapefile/GeneralDgnConvertShpJobContext.java @@ -12,25 +12,9 @@ import java.util.List; import java.util.TreeMap; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.apache.commons.transaction.memory.PessimisticMapWrapper; -import org.apache.commons.transaction.util.CommonsLoggingLogger; -import org.apache.commons.transaction.util.LoggerFacade; -import org.geotools.data.FeatureWriter; -import org.geotools.data.Transaction; -import org.geotools.data.shapefile.ShapefileDataStore; -import org.geotools.data.shapefile.indexed.IndexType; -import org.geotools.data.shapefile.indexed.IndexedShapefileDataStore; -import org.geotools.feature.IllegalAttributeException; -import org.geotools.feature.SchemaException; - import com.vividsolutions.jts.geom.Geometry; import com.vividsolutions.jts.geom.GeometryFactory; - import com.ximple.eofms.util.DefaultColorTable; -import com.ximple.eofms.util.EPSG3825GeometryConverterDecorator; -import com.ximple.eofms.util.EPSG3826GeometryConverterDecorator; import com.ximple.eofms.util.FeatureTypeBuilderUtil; import com.ximple.eofms.util.GeometryConverterDecorator; import com.ximple.io.dgn7.ArcElement; @@ -44,9 +28,21 @@ import com.ximple.io.dgn7.TextElement; import com.ximple.io.dgn7.TextNodeElement; import com.ximple.io.dgn7.UserAttributeData; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.commons.transaction.memory.PessimisticMapWrapper; +import org.apache.commons.transaction.util.CommonsLoggingLogger; +import org.apache.commons.transaction.util.LoggerFacade; +import org.geotools.data.FeatureWriter; +import org.geotools.data.Transaction; +import org.geotools.data.shapefile.ShapefileDataStore; +import org.geotools.data.shapefile.indexed.IndexType; +import org.geotools.data.shapefile.indexed.IndexedShapefileDataStore; +import org.geotools.feature.SchemaException; import org.geotools.feature.simple.SimpleFeatureBuilder; import org.geotools.feature.simple.SimpleFeatureTypeBuilder; import org.geotools.geometry.jts.JTSFactoryFinder; +import org.opengis.feature.IllegalAttributeException; import org.opengis.feature.simple.SimpleFeature; import org.opengis.feature.simple.SimpleFeatureType; diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/shapefile/IndexDgnConvertShpJobContext.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/shapefile/IndexDgnConvertShpJobContext.java index 21ef699..24e39d4 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/shapefile/IndexDgnConvertShpJobContext.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/shapefile/IndexDgnConvertShpJobContext.java @@ -12,6 +12,19 @@ import java.util.Iterator; import java.util.List; +import com.vividsolutions.jts.geom.Coordinate; +import com.vividsolutions.jts.geom.Envelope; +import com.vividsolutions.jts.geom.Geometry; +import com.vividsolutions.jts.geom.GeometryFactory; +import com.ximple.eofms.util.DefaultColorTable; +import com.ximple.eofms.util.FeatureTypeBuilderUtil; +import com.ximple.eofms.util.GeometryConverterDecorator; +import com.ximple.eofms.util.TPCLIDConverter; +import com.ximple.eofms.util.TWDDatumConverter; +import com.ximple.io.dgn7.Element; +import com.ximple.io.dgn7.FrammeAttributeData; +import com.ximple.io.dgn7.TextElement; +import com.ximple.io.dgn7.UserAttributeData; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.commons.transaction.memory.PessimisticMapWrapper; @@ -22,28 +35,11 @@ import org.geotools.data.shapefile.ShapefileDataStore; import org.geotools.data.shapefile.indexed.IndexType; import org.geotools.data.shapefile.indexed.IndexedShapefileDataStore; -import org.geotools.feature.IllegalAttributeException; import org.geotools.feature.SchemaException; - -import com.vividsolutions.jts.geom.Coordinate; -import com.vividsolutions.jts.geom.Envelope; -import com.vividsolutions.jts.geom.Geometry; -import com.vividsolutions.jts.geom.GeometryFactory; - -import com.ximple.eofms.util.DefaultColorTable; -import com.ximple.eofms.util.EPSG3825GeometryConverterDecorator; -import com.ximple.eofms.util.EPSG3826GeometryConverterDecorator; -import com.ximple.eofms.util.FeatureTypeBuilderUtil; -import com.ximple.eofms.util.GeometryConverterDecorator; -import com.ximple.eofms.util.TPCLIDConverter; -import com.ximple.eofms.util.TWDDatumConverter; -import com.ximple.io.dgn7.Element; -import com.ximple.io.dgn7.FrammeAttributeData; -import com.ximple.io.dgn7.TextElement; -import com.ximple.io.dgn7.UserAttributeData; import org.geotools.feature.simple.SimpleFeatureBuilder; import org.geotools.feature.simple.SimpleFeatureTypeBuilder; import org.geotools.geometry.jts.JTSFactoryFinder; +import org.opengis.feature.IllegalAttributeException; import org.opengis.feature.simple.SimpleFeature; import org.opengis.feature.simple.SimpleFeatureType; diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/shapefile/OracleConvertShapefilesJobContext.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/shapefile/OracleConvertShapefilesJobContext.java index 8beaf47..f611fa4 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/shapefile/OracleConvertShapefilesJobContext.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/shapefile/OracleConvertShapefilesJobContext.java @@ -13,7 +13,15 @@ import java.util.Iterator; import java.util.Properties; +import com.vividsolutions.jts.util.Assert; +import com.ximple.eofms.filter.AbstractFLinkageDispatchableFilter; +import com.ximple.eofms.filter.ElementDispatcher; +import com.ximple.eofms.jobs.OracleElementLogger; +import com.ximple.eofms.jobs.context.AbstractOracleJobContext; import com.ximple.eofms.util.ElementDigesterUtils; +import com.ximple.io.dgn7.ComplexElement; +import com.ximple.io.dgn7.Element; +import com.ximple.io.dgn7.FrammeAttributeData; import org.apache.commons.digester3.Digester; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -25,21 +33,11 @@ import org.geotools.data.shapefile.ShapefileDataStore; import org.geotools.data.shapefile.indexed.IndexType; import org.geotools.data.shapefile.indexed.IndexedShapefileDataStore; -import org.geotools.feature.IllegalAttributeException; +import org.opengis.feature.IllegalAttributeException; import org.opengis.feature.simple.SimpleFeature; import org.opengis.feature.simple.SimpleFeatureType; import org.quartz.JobExecutionContext; import org.xml.sax.SAXException; - -import com.vividsolutions.jts.util.Assert; - -import com.ximple.eofms.filter.AbstractFLinkageDispatchableFilter; -import com.ximple.eofms.filter.ElementDispatcher; -import com.ximple.eofms.jobs.OracleElementLogger; -import com.ximple.eofms.jobs.context.AbstractOracleJobContext; -import com.ximple.io.dgn7.ComplexElement; -import com.ximple.io.dgn7.Element; -import com.ximple.io.dgn7.FrammeAttributeData; public class OracleConvertShapefilesJobContext extends AbstractOracleJobContext { @@ -122,7 +120,7 @@ public void putFeatureCollection(Element element) { assert elementDispatcher != null; // �P�_�O�_�ũM��� - SimpleFeature feature = elementDispatcher.execute(element, isTransformed()); + SimpleFeature feature = elementDispatcher.execute(element, getDistId(), isTransformed()); if (feature == null) { boolean isEmptySize = false; FrammeAttributeData linkage = diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/util/FeatureTypeBuilderUtil.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/util/FeatureTypeBuilderUtil.java index 5ab01fc..2c6ed77 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/util/FeatureTypeBuilderUtil.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/util/FeatureTypeBuilderUtil.java @@ -8,10 +8,6 @@ import com.vividsolutions.jts.geom.MultiPoint; import com.vividsolutions.jts.geom.Point; import com.vividsolutions.jts.geom.Polygon; -import com.ximple.eofms.filter.ElementDispatcher; -import org.apache.commons.digester3.Digester; -import org.apache.commons.digester3.binder.DigesterLoader; -import org.apache.commons.digester3.xmlrules.FromXmlRulesModule; import org.apache.log4j.LogManager; import org.apache.log4j.Logger; import org.geotools.feature.AttributeTypeBuilder; @@ -354,59 +350,48 @@ AttributeTypeBuilder attrBuilder; ArrayList<AttributeDescriptor> attrDescs = new ArrayList<AttributeDescriptor>(); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("geom", Point.class, notAllowNull)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "geom", createGeometryType(attrBuilder, "PointType", Point.class, notAllowNull, lookupCRS(defaultSRID)))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("tid", Short.class, notAllowNull)); + attrBuilder = new AttributeTypeBuilder(); + attrDescs.add(attrBuilder.buildDescriptor( + "did", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull))); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "tid", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("oid", Long.class, notAllowNull)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "oid", createAttributeType(attrBuilder, "LongType", Long.class, notAllowNull))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("cid", Short.class, notAllowNull)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "cid", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("lid", Short.class, notAllowNull)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "lid", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("level", Short.class, notAllowNull)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "level", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("symcolor", String.class, notAllowNull, 12, "")); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "symcolor", createAttributeType(attrBuilder, "StringType", String.class, notAllowNull, 12, ""))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("symweight", Short.class, notAllowNull, 1, (short) 0)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "symweight", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull, 1, (short) 0))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("symstyle", Short.class, notAllowNull, 1, (short) 0)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "symstyle", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull, 1, (short) 0))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("just", Short.class, notAllowNull)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "just", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull, 1, (short) 0))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("height", Float.class, notAllowNull, 1, (float) 1.0)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "height", createAttributeType(attrBuilder, "FloatType", Float.class, notAllowNull, 1, (float) 1.0))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("width", Float.class, notAllowNull, 1, (float) 1.0)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "width", createAttributeType(attrBuilder, "FloatType", Float.class, notAllowNull, 1, (float) 1.0))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("angle", Float.class, notAllowNull, 1, (float) 0.0)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "angle", createAttributeType(attrBuilder, "FloatType", Float.class, notAllowNull, 1, (float) 0.0))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("context", String.class, true, 254)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "context", createAttributeType(attrBuilder, "StringType", String.class, true, 254))); @@ -423,60 +408,48 @@ AttributeTypeBuilder attrBuilder; ArrayList<AttributeDescriptor> attrDescs = new ArrayList<AttributeDescriptor>(); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("geom", Point.class, notAllowNull)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( - // "geom", createGeometryType(attrBuilder, "PointType", Point.class, notAllowNull, lookupCRS(defaultSRID)))); "geom", createGeometryType(attrBuilder, "PolygonType", Polygon.class, notAllowNull, lookupCRS(defaultSRID)))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("tid", Short.class, notAllowNull)); + attrBuilder = new AttributeTypeBuilder(); + attrDescs.add(attrBuilder.buildDescriptor( + "did", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull))); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "tid", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("oid", Long.class, notAllowNull)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "oid", createAttributeType(attrBuilder, "LongType", Long.class, notAllowNull))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("cid", Short.class, notAllowNull)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "cid", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("lid", Short.class, notAllowNull)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "lid", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("level", Short.class, notAllowNull)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "level", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("symcolor", String.class, notAllowNull, 12, "")); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "symcolor", createAttributeType(attrBuilder, "StringType", String.class, notAllowNull, 12, ""))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("symweight", Short.class, notAllowNull, 1, (short) 0)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "symweight", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull, 1, (short) 0))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("symstyle", Short.class, notAllowNull, 1, (short) 0)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "symstyle", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull, 1, (short) 0))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("just", Short.class, notAllowNull)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "just", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull, 1, (short) 0))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("height", Float.class, notAllowNull, 1, (float) 1.0)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "height", createAttributeType(attrBuilder, "FloatType", Float.class, notAllowNull, 1, (float) 1.0))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("width", Float.class, notAllowNull, 1, (float) 1.0)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "width", createAttributeType(attrBuilder, "FloatType", Float.class, notAllowNull, 1, (float) 1.0))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("angle", Float.class, notAllowNull, 1, (float) 0.0)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "angle", createAttributeType(attrBuilder, "FloatType", Float.class, notAllowNull, 1, (float) 0.0))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("symbol", String.class, notAllowNull, 20)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "symbol", createAttributeType(attrBuilder, "StringType", String.class, notAllowNull, 20))); @@ -496,39 +469,33 @@ AttributeTypeBuilder attrBuilder; ArrayList<AttributeDescriptor> attrDescs = new ArrayList<AttributeDescriptor>(); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("geom", Polygon.class, notAllowNull)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "geom", createGeometryType(attrBuilder, "PolygonType", Polygon.class, notAllowNull, lookupCRS(defaultSRID)))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("tid", Short.class, notAllowNull)); + attrBuilder = new AttributeTypeBuilder(); + attrDescs.add(attrBuilder.buildDescriptor( + "did", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull))); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "tid", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("oid", Long.class, notAllowNull)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "oid", createAttributeType(attrBuilder, "LongType", Long.class, notAllowNull))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("cid", Short.class, notAllowNull)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "cid", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("lid", Short.class, notAllowNull)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "lid", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("level", Short.class, notAllowNull)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "level", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("symcolor", String.class, notAllowNull, 12, "")); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "symcolor", createAttributeType(attrBuilder, "StringType", String.class, notAllowNull, 12, ""))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("symweight", Short.class, notAllowNull, 1, (short) 0)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "symweight", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull, 1, (short) 0))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("symstyle", Short.class, notAllowNull, 1, (short) 0)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "symstyle", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull, 1, (short) 0))); @@ -545,39 +512,33 @@ AttributeTypeBuilder attrBuilder; ArrayList<AttributeDescriptor> attrDescs = new ArrayList<AttributeDescriptor>(); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("geom", LineString.class, notAllowNull)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "geom", createGeometryType(attrBuilder, "LineStringType", LineString.class, notAllowNull, lookupCRS(defaultSRID)))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("tid", Short.class, notAllowNull)); + attrBuilder = new AttributeTypeBuilder(); + attrDescs.add(attrBuilder.buildDescriptor( + "did", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull))); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "tid", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("oid", Long.class, notAllowNull)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "oid", createAttributeType(attrBuilder, "LongType", Long.class, notAllowNull))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("cid", Short.class, notAllowNull)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "cid", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("lid", Short.class, notAllowNull)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "lid", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("level", Short.class, notAllowNull)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "level", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("symcolor", String.class, notAllowNull, 12, "")); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "symcolor", createAttributeType(attrBuilder, "StringType", String.class, notAllowNull, 12, ""))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("symweight", Short.class, notAllowNull, 1, (short) 0)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "symweight", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull, 1, (short) 0))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("symstyle", Short.class, notAllowNull, 1, (short) 0)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "symstyle", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull, 1, (short) 0))); @@ -594,39 +555,33 @@ AttributeTypeBuilder attrBuilder; ArrayList<AttributeDescriptor> attrDescs = new ArrayList<AttributeDescriptor>(); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("geom", MultiLineString.class, notAllowNull)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "geom", createGeometryType(attrBuilder, "MultiLineStringType", MultiLineString.class, notAllowNull, lookupCRS(defaultSRID)))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("tid", Short.class, notAllowNull)); + attrBuilder = new AttributeTypeBuilder(); + attrDescs.add(attrBuilder.buildDescriptor( + "did", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull))); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "tid", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("oid", Long.class, notAllowNull)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "oid", createAttributeType(attrBuilder, "LongType", Long.class, notAllowNull))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("cid", Short.class, notAllowNull)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "cid", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("lid", Short.class, notAllowNull)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "lid", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("level", Short.class, notAllowNull)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "level", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("symcolor", String.class, notAllowNull, 12, "")); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "symcolor", createAttributeType(attrBuilder, "StringType", String.class, notAllowNull, 12, ""))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("symweight", Short.class, notAllowNull, 1, (short) 0)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "symweight", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull, 1, (short) 0))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("symstyle", Short.class, notAllowNull, 1, (short) 0)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "symstyle", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull, 1, (short) 0))); @@ -637,36 +592,10 @@ public static SimpleFeatureTypeBuilder createEllipseFeatureTypeBuilder(String featureName) { return createPolygonFeatureTypeBuilder(featureName); - /* - FeatureTypeBuilder typeBuilder = FeatureTypeBuilder.newInstance(featureName); - typeBuilder.addType(AttributeTypeFactory.newAttributeType("geom", Geometry.class, notAllowNull)); - typeBuilder.addType(AttributeTypeFactory.newAttributeType("tid", Short.class, notAllowNull)); - typeBuilder.addType(AttributeTypeFactory.newAttributeType("oid", Long.class)); - typeBuilder.addType(AttributeTypeFactory.newAttributeType("cid", Short.class, notAllowNull)); - typeBuilder.addType(AttributeTypeFactory.newAttributeType("lid", Short.class, notAllowNull)); - typeBuilder.addType(AttributeTypeFactory.newAttributeType("level", Short.class, notAllowNull)); - typeBuilder.addType(AttributeTypeFactory.newAttributeType("symcolor", String.class, notAllowNull, 12)); - typeBuilder.addType(AttributeTypeFactory.newAttributeType("symweight", Short.class, notAllowNull)); - typeBuilder.addType(AttributeTypeFactory.newAttributeType("symstyle", Short.class, notAllowNull)); - return typeBuilder; - */ } public static SimpleFeatureTypeBuilder createArcFeatureTypeBuilder(String featureName) { return createLineFeatureTypeBuilder(featureName); - /* - FeatureTypeBuilder typeBuilder = FeatureTypeBuilder.newInstance(featureName); - typeBuilder.addType(AttributeTypeFactory.newAttributeType("geom", Geometry.class, notAllowNull)); - typeBuilder.addType(AttributeTypeFactory.newAttributeType("tid", Short.class, notAllowNull)); - typeBuilder.addType(AttributeTypeFactory.newAttributeType("oid", Long.class)); - typeBuilder.addType(AttributeTypeFactory.newAttributeType("cid", Short.class, notAllowNull)); - typeBuilder.addType(AttributeTypeFactory.newAttributeType("lid", Short.class, notAllowNull)); - typeBuilder.addType(AttributeTypeFactory.newAttributeType("level", Short.class, notAllowNull)); - typeBuilder.addType(AttributeTypeFactory.newAttributeType("symcolor", String.class, notAllowNull, 12)); - typeBuilder.addType(AttributeTypeFactory.newAttributeType("symweight", Short.class, notAllowNull)); - typeBuilder.addType(AttributeTypeFactory.newAttributeType("symstyle", Short.class, notAllowNull)); - return typeBuilder; - */ } public static SimpleFeatureTypeBuilder createMultiSymbolFeatureTypeBuilder(String featureName) { @@ -677,59 +606,48 @@ AttributeTypeBuilder attrBuilder; ArrayList<AttributeDescriptor> attrDescs = new ArrayList<AttributeDescriptor>(); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("geom", MultiPoint.class, notAllowNull)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "geom", createGeometryType(attrBuilder, "MultiPointType", MultiPoint.class, notAllowNull, lookupCRS(defaultSRID)))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("tid", Short.class, notAllowNull)); + attrBuilder = new AttributeTypeBuilder(); + attrDescs.add(attrBuilder.buildDescriptor( + "did", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull))); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "tid", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("oid", Long.class, notAllowNull)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "oid", createAttributeType(attrBuilder, "LongType", Long.class, notAllowNull))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("cid", Short.class, notAllowNull)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "cid", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("lid", Short.class, notAllowNull)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "lid", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("level", Short.class, notAllowNull)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "level", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("symcolor", String.class, notAllowNull, 12, "")); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "symcolor", createAttributeType(attrBuilder, "StringType", String.class, notAllowNull, 12, ""))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("symweight", Short.class, notAllowNull, 1, (short) 0)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "symweight", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull, 1, (short) 0))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("symstyle", Short.class, notAllowNull, 1, (short) 0)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "symstyle", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull, 1, (short) 0))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("just", Short.class, notAllowNull)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "just", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull, 1, (short) 0))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("height", Float.class, notAllowNull, 1, (float) 1.0)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "height", createAttributeType(attrBuilder, "FloatType", Float.class, notAllowNull, 1, (float) 1.0))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("width", Float.class, notAllowNull, 1, (float) 1.0)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "width", createAttributeType(attrBuilder, "FloatType", Float.class, notAllowNull, 1, (float) 1.0))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("angle", Float.class, notAllowNull, 1, (float) 0.0)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "angle", createAttributeType(attrBuilder, "FloatType", Float.class, notAllowNull, 1, (float) 0.0))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("symbol", String.class, notAllowNull, 20)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "symbol", createAttributeType(attrBuilder, "StringType", String.class, notAllowNull, 20))); -- Gitblit v0.0.0-SNAPSHOT