From 51a623891c321e1d5bc17196043f24c8afdf214b Mon Sep 17 00:00:00 2001 From: Dennis Kao <ulysseskao@gmail.com> Date: Fri, 15 Nov 2013 14:05:57 +0800 Subject: [PATCH] add dyncolor and owner in each feature --- xdgnjobs/ximple-jobcarrier/pom.xml | 6 xdgnjobs/ximple-build/maven/jar-collector/pom.xml | 3 xdgnjobs/ximple-dgnio/pom.xml | 4 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateShapeStrategy.java | 8 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/OracleConvertPostGISJobContext.java | 6 xdgnjobs/ximple-spatialjob/pom.xml | 6 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/edbgeo/AbstractDgnToEdbGeoJobContext.java | 2 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/AbstractOracleToPostGISJobContext.java | 10 + xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateEllipseShapeStrategy.java | 4 xdgnjobs/pom.xml | 4 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateComplexChainStrategy.java | 16 + xdgnjobs/ximple-build/maven/pom.xml | 2 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateArcLineStringStrategy.java | 4 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/GeneralDgnConvertPostGISJobContext.java | 32 +++- xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateTextStrategy.java | 8 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateLineTextStrategy.java | 16 + xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateMultiSymbolStrategy.java | 65 ++++---- xdgnjobs/ximple-build/pom.xml | 4 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/FeatureDgnConvertPostGISJobContext.java | 1 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateSymbolStrategy.java | 2 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateLineStringStrategy.java | 16 + xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/edbgeo/AbstractOracleToEdbGeoJobContext.java | 2 xdgnjobs/ximple-jobcarrier/src/main/resources/quartz_jobs.xml | 4 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/util/FeatureTypeBuilderUtil.java | 118 ++++++++-------- xdgnjobs/ximple-elmparser/pom.xml | 4 xdgnjobs/ximple-jobcarrier/quartz_jobs.xml | 8 xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/AbstractDgnToPostGISJobContext.java | 7 27 files changed, 219 insertions(+), 143 deletions(-) diff --git a/xdgnjobs/pom.xml b/xdgnjobs/pom.xml index 6aa3b9d..e99d776 100644 --- a/xdgnjobs/pom.xml +++ b/xdgnjobs/pom.xml @@ -18,7 +18,7 @@ <test.maxHeapSize>512M</test.maxHeapSize> <src.output>${basedir}/target</src.output> <java5>1.6</java5> - <xdgnio.version>2.0.1</xdgnio.version> + <xdgnio.version>2.1.0</xdgnio.version> <gt.version>10.1.x</gt.version> <failIfNoTests>false</failIfNoTests> <stress.skip.pattern></stress.skip.pattern> @@ -65,7 +65,7 @@ <groupId>com.ximple.eofms</groupId> <artifactId>ximple-dgnjobs</artifactId> <packaging>pom</packaging> - <version>2.0.1</version> + <version>2.1.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 cf59bb9..b51b63f 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>2.0.1</version> + <version>2.1.0</version> </parent> @@ -16,6 +16,7 @@ <!-- =========================================================== --> <groupId>com.ximple.eofms.maven</groupId> <artifactId>ximple-jar-collector</artifactId> + <version>2.1.0</version> <packaging>maven-plugin</packaging> <name>JAR files collector</name> diff --git a/xdgnjobs/ximple-build/maven/pom.xml b/xdgnjobs/ximple-build/maven/pom.xml index e954dd3..7345eb2 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>2.0.1</version> + <version>2.1.0</version> </parent> diff --git a/xdgnjobs/ximple-build/pom.xml b/xdgnjobs/ximple-build/pom.xml index c4dd12b..eb334af 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>2.0.1</version> + <version>2.1.0</version> </parent> @@ -16,7 +16,7 @@ <!-- =========================================================== --> <groupId>com.ximple.eofms.maven</groupId> <artifactId>ximple-build</artifactId> - <version>2.0.1</version> + <version>2.1.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 24e0823..fefa4b9 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>2.0.1</version> + <version>2.1.0</version> </parent> <!-- =========================================================== --> @@ -15,7 +15,7 @@ <!-- =========================================================== --> <groupId>com.ximple.eofms</groupId> <artifactId>ximple-dgnio</artifactId> - <version>2.0.1</version> + <version>2.1.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 39070a3..be5e9e2 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>2.0.1</version> + <version>2.1.0</version> </parent> <groupId>com.ximple.eofms</groupId> <artifactId>ximple-elmparser</artifactId> - <version>2.0.1</version> + <version>2.1.0</version> <packaging>jar</packaging> <name>ximple-elmparser</name> <url>http://maven.apache.org</url> diff --git a/xdgnjobs/ximple-jobcarrier/pom.xml b/xdgnjobs/ximple-jobcarrier/pom.xml index e840c8f..ae931d2 100644 --- a/xdgnjobs/ximple-jobcarrier/pom.xml +++ b/xdgnjobs/ximple-jobcarrier/pom.xml @@ -6,19 +6,19 @@ <parent> <groupId>com.ximple.eofms</groupId> <artifactId>ximple-dgnjobs</artifactId> - <version>2.0.1</version> + <version>2.1.0</version> </parent> <groupId>com.ximple.eofms</groupId> <artifactId>ximple-jobcarrier</artifactId> - <version>2.0.1</version> + <version>2.1.0</version> <packaging>jar</packaging> <name>ximple-jobcarrier</name> <url>http://maven.apache.org</url> <properties> - <xdgnio.version>2.0.1</xdgnio.version> + <xdgnio.version>2.1.0</xdgnio.version> </properties> <scm> diff --git a/xdgnjobs/ximple-jobcarrier/quartz_jobs.xml b/xdgnjobs/ximple-jobcarrier/quartz_jobs.xml index 61f805e..c47943b 100644 --- a/xdgnjobs/ximple-jobcarrier/quartz_jobs.xml +++ b/xdgnjobs/ximple-jobcarrier/quartz_jobs.xml @@ -60,7 +60,7 @@ </entry> <entry> <key>ORAHOST</key> - <value>10.10.1.3</value> + <value>10.10.1.7</value> </entry> <entry> <key>ORAINST</key> @@ -129,7 +129,7 @@ </entry> <entry> <key>GEOSERVER_URL</key> - <value>http://192.168.11.99:8180/geoserver</value> + <value>http://192.168.11.99:8080/geoserver</value> </entry> <entry> <key>GEOSERVER_USER</key> @@ -141,7 +141,7 @@ </entry> <entry> <key>IGNORE_DBETL</key> - <value>true</value> + <value>false</value> </entry> </job-data-map> </job> @@ -152,7 +152,7 @@ <group>DEFAULT</group> <job-name>ConvertDMMS2PostGisWithGeoserver</job-name> <job-group>DEFAULT</job-group> - <start-time>2011-03-01T18:00:00</start-time> + <start-time>2013-03-01T18:00:00</start-time> <!-- repeat indefinitely every 10 seconds --> <repeat-count>0</repeat-count> <repeat-interval>500</repeat-interval> diff --git a/xdgnjobs/ximple-jobcarrier/src/main/resources/quartz_jobs.xml b/xdgnjobs/ximple-jobcarrier/src/main/resources/quartz_jobs.xml index 95903c7..74ede9c 100644 --- a/xdgnjobs/ximple-jobcarrier/src/main/resources/quartz_jobs.xml +++ b/xdgnjobs/ximple-jobcarrier/src/main/resources/quartz_jobs.xml @@ -41,7 +41,7 @@ </entry> <entry> <key>PGDATBASE</key> - <value>pgDMMS</value> + <value>pgDMMS2</value> </entry> <entry> <key>PGPORT</key> @@ -142,7 +142,7 @@ </entry> <entry> <key>IGNORE_DBETL</key> - <value>true</value> + <value>false</value> </entry> </job-data-map> </job> diff --git a/xdgnjobs/ximple-spatialjob/pom.xml b/xdgnjobs/ximple-spatialjob/pom.xml index 1a43df5..670bb58 100644 --- a/xdgnjobs/ximple-spatialjob/pom.xml +++ b/xdgnjobs/ximple-spatialjob/pom.xml @@ -7,18 +7,18 @@ <parent> <groupId>com.ximple.eofms</groupId> <artifactId>ximple-dgnjobs</artifactId> - <version>2.0.1</version> + <version>2.1.0</version> </parent> <groupId>com.ximple.eofms</groupId> <artifactId>ximple-spatialjob</artifactId> - <version>2.0.1</version> + <version>2.1.0</version> <packaging>jar</packaging> <name>ximple-spatialjob</name> <url>http://www.ximple.com.tw</url> <properties> - <xdgnio.version>2.0.1</xdgnio.version> + <xdgnio.version>2.1.0</xdgnio.version> </properties> <description> 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 b2de9ae..450c108 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 @@ -82,8 +82,10 @@ fLinkage.getOccID(), (short) lineStringElement.getLevelIndex(), colorTable.getColorCode(lineStringElement.getColorIndex()), + colorTable.getColorCode(lineStringElement.getColorIndex()), (short) lineStringElement.getWeight(), - (short) lineStringElement.getLineStyle() + (short) lineStringElement.getLineStyle(), + -1 }, null); } return feature; 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 ce0c8b6..353e004 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 @@ -82,8 +82,10 @@ fLinkage.getOccID(), (short) lineStringElement.getLevelIndex(), colorTable.getColorCode(lineStringElement.getColorIndex()), + colorTable.getColorCode(lineStringElement.getColorIndex()), (short) lineStringElement.getWeight(), - (short) lineStringElement.getLineStyle() + (short) lineStringElement.getLineStyle(), + -1 }, null); } else if (element instanceof ComplexChainElement) { ComplexChainElement complexChain = (ComplexChainElement) element; @@ -107,8 +109,10 @@ fLinkage.getOccID(), (short) complexChain.getLevelIndex(), colorTable.getColorCode(complexChain.getColorIndex()), + colorTable.getColorCode(complexChain.getColorIndex()), (short) complexChain.getWeight(), - (short) complexChain.getLineStyle() + (short) complexChain.getLineStyle(), + -1 }, null); } else if (element instanceof LineElement) { LineElement lineElement = (LineElement) element; @@ -133,8 +137,10 @@ fLinkage.getOccID(), (short) lineElement.getLevelIndex(), colorTable.getColorCode(lineElement.getColorIndex()), + colorTable.getColorCode(lineElement.getColorIndex()), (short) lineElement.getWeight(), - (short) lineElement.getLineStyle() + (short) lineElement.getLineStyle(), + -1 }, null); return feature; } else if (element instanceof ArcElement) { @@ -160,8 +166,10 @@ fLinkage.getOccID(), (short) arcElement.getLevelIndex(), colorTable.getColorCode(arcElement.getColorIndex()), + colorTable.getColorCode(arcElement.getColorIndex()), (short) arcElement.getWeight(), - (short) arcElement.getLineStyle() + (short) arcElement.getLineStyle(), + -1 }, null); } 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 1f65012..af2f67c 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 @@ -80,8 +80,10 @@ fLinkage.getOccID(), (short) ellipseElement.getLevelIndex(), colorTable.getColorCode(ellipseElement.getColorIndex()), + colorTable.getColorCode(ellipseElement.getColorIndex()), (short) ellipseElement.getWeight(), - (short) ellipseElement.getLineStyle() + (short) ellipseElement.getLineStyle(), + -1 }, null); } return feature; 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 7d10932..76cb849 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 @@ -80,8 +80,10 @@ fLinkage.getOccID(), (short) lineStringElement.getLevelIndex(), colorTable.getColorCode(lineStringElement.getColorIndex()), + colorTable.getColorCode(lineStringElement.getColorIndex()), (short) lineStringElement.getWeight(), - (short) lineStringElement.getLineStyle() + (short) lineStringElement.getLineStyle(), + -1 }, null); } else if (element instanceof ComplexChainElement) { ComplexChainElement complexChain = (ComplexChainElement) element; @@ -112,8 +114,10 @@ fLinkage.getOccID(), (short) complexChain.getLevelIndex(), colorTable.getColorCode(complexChain.getColorIndex()), + colorTable.getColorCode(complexChain.getColorIndex()), (short) complexChain.getWeight(), - (short) complexChain.getLineStyle() + (short) complexChain.getLineStyle(), + -1 }, null); } else if (element instanceof LineElement) { LineElement lineElement = (LineElement) element; @@ -135,8 +139,10 @@ fLinkage.getOccID(), (short) lineElement.getLevelIndex(), colorTable.getColorCode(lineElement.getColorIndex()), + colorTable.getColorCode(lineElement.getColorIndex()), (short) lineElement.getWeight(), - (short) lineElement.getLineStyle() + (short) lineElement.getLineStyle(), + -1 }, null); return feature; } else if (element instanceof ArcElement) { @@ -159,8 +165,10 @@ fLinkage.getOccID(), (short) arcElement.getLevelIndex(), colorTable.getColorCode(arcElement.getColorIndex()), + colorTable.getColorCode(arcElement.getColorIndex()), (short) arcElement.getWeight(), - (short) arcElement.getLineStyle() + (short) arcElement.getLineStyle(), + -1 }, null); } 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 100bb1b..4e06982 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 @@ -77,8 +77,10 @@ fLinkage.getOccID(), (short) lineStringElement.getLevelIndex(), colorTable.getColorCode(lineStringElement.getColorIndex()), + colorTable.getColorCode(lineStringElement.getColorIndex()), (short) lineStringElement.getWeight(), - (short) lineStringElement.getLineStyle() + (short) lineStringElement.getLineStyle(), + -1 }, null); } else if (element instanceof TextElement) { TextElement txtElement = (TextElement) element; @@ -114,8 +116,10 @@ fLinkage.getOccID(), (short) txtElement.getLevelIndex(), colorTable.getColorCode(txtElement.getColorIndex()), + colorTable.getColorCode(txtElement.getColorIndex()), (short) txtElement.getWeight(), - (short) txtElement.getLineStyle() + (short) txtElement.getLineStyle(), + -1 }, null); } else if (element instanceof ComplexChainElement) { ComplexChainElement complexChain = (ComplexChainElement) element; @@ -148,8 +152,10 @@ fLinkage.getOccID(), (short) complexChain.getLevelIndex(), colorTable.getColorCode(complexChain.getColorIndex()), + colorTable.getColorCode(complexChain.getColorIndex()), (short) complexChain.getWeight(), - (short) complexChain.getLineStyle() + (short) complexChain.getLineStyle(), + -1 }, null); } else if (element instanceof LineElement) { LineElement lineElement = (LineElement) element; @@ -170,8 +176,10 @@ fLinkage.getOccID(), (short) lineElement.getLevelIndex(), colorTable.getColorCode(lineElement.getColorIndex()), + colorTable.getColorCode(lineElement.getColorIndex()), (short) lineElement.getWeight(), - (short) lineElement.getLineStyle() + (short) lineElement.getLineStyle(), + -1 }, null); } 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 5eabbe8..c93b6bc 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 @@ -91,25 +91,26 @@ } if (gobj != null) feature = SimpleFeatureBuilder.build(featureType, new Object[]{ - gobj, - distId, - fLinkage.getFsc(), - (long) fLinkage.getUfid(), - (short) fLinkage.getComponentID(), - fLinkage.getOccID(), - (short) txtElement.getLevelIndex(), - colorTable.getColorCode(txtElement.getColorIndex()), - (short) txtElement.getWeight(), - (short) txtElement.getLineStyle(), - (short) txtElement.getJustification(), - (float) txtElement.getTextHeight(), - (float) txtElement.getTextWidth(), - (float) angle, - sb.toString() + gobj, + distId, + fLinkage.getFsc(), + (long) fLinkage.getUfid(), + (short) fLinkage.getComponentID(), + fLinkage.getOccID(), + (short) txtElement.getLevelIndex(), + colorTable.getColorCode(txtElement.getColorIndex()), + colorTable.getColorCode(txtElement.getColorIndex()), + (short) txtElement.getWeight(), + (short) txtElement.getLineStyle(), + (short) txtElement.getJustification(), + (float) txtElement.getTextHeight(), + (float) txtElement.getTextWidth(), + (float) angle, + sb.toString(), + -1 }, null); } else if (element instanceof TextNodeElement) { TextNodeElement nodeElement = (TextNodeElement) element; - double angle = nodeElement.getRotationAngle(); angle = BigDecimal.valueOf(angle).setScale(3, RoundingMode.HALF_UP).doubleValue(); @@ -154,21 +155,23 @@ if (gobj != null) feature = SimpleFeatureBuilder.build(featureType, new Object[]{ - gobj, - distId, - fLinkage.getFsc(), - (long) fLinkage.getUfid(), - (short) fLinkage.getComponentID(), - fLinkage.getOccID(), - (short) txtChildElement.getLevelIndex(), - colorTable.getColorCode(nodeElement.getColorIndex()), - (short) txtChildElement.getWeight(), - (short) txtChildElement.getLineStyle(), - (short) txtChildElement.getJustification(), - (float) txtChildElement.getTextHeight(), - (float) txtChildElement.getTextWidth(), - (float) angle, - sb.toString() + gobj, + distId, + fLinkage.getFsc(), + (long) fLinkage.getUfid(), + (short) fLinkage.getComponentID(), + fLinkage.getOccID(), + (short) txtChildElement.getLevelIndex(), + colorTable.getColorCode(nodeElement.getColorIndex()), + colorTable.getColorCode(nodeElement.getColorIndex()), + (short) txtChildElement.getWeight(), + (short) txtChildElement.getLineStyle(), + (short) txtChildElement.getJustification(), + (float) txtChildElement.getTextHeight(), + (float) txtChildElement.getTextWidth(), + (float) angle, + sb.toString(), + -1 }, null); } } else { 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 f36679d..f675221 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 @@ -79,8 +79,10 @@ fLinkage.getOccID(), (short) shapeElement.getLevelIndex(), colorTable.getColorCode(shapeElement.getColorIndex()), + colorTable.getColorCode(shapeElement.getColorIndex()), (short) shapeElement.getWeight(), - (short) shapeElement.getLineStyle() + (short) shapeElement.getLineStyle(), + -1 }, null); } else if (element instanceof ComplexShapeElement) { ComplexShapeElement complexShape = (ComplexShapeElement) element; @@ -102,8 +104,10 @@ fLinkage.getOccID(), (short) complexShape.getLevelIndex(), colorTable.getColorCode(complexShape.getColorIndex()), + colorTable.getColorCode(complexShape.getColorIndex()), (short) complexShape.getWeight(), - (short) complexShape.getLineStyle() + (short) complexShape.getLineStyle(), + -1 }, null); } return feature; 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 62daf9b..d631cdc 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 @@ -112,6 +112,7 @@ fLinkage.getOccID(), (short) txtElement.getLevelIndex(), colorTable.getColorCode(txtElement.getColorIndex()), + colorTable.getColorCode(txtElement.getColorIndex()), (short) txtElement.getWeight(), (short) txtElement.getLineStyle(), (short) txtElement.getJustification(), @@ -119,6 +120,7 @@ (float) txtElement.getTextWidth(), (float) angle, sb.toString(), + -1, geomOrigin }, null); } else { 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 826019d..0c440d6 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 @@ -84,13 +84,15 @@ fLinkage.getOccID(), (short) txtElement.getLevelIndex(), colorTable.getColorCode(txtElement.getColorIndex()), + colorTable.getColorCode(txtElement.getColorIndex()), (short) txtElement.getWeight(), (short) txtElement.getLineStyle(), (short) txtElement.getJustification(), (float) txtElement.getTextHeight(), (float) txtElement.getTextWidth(), (float) angle, - content + content, + -1 }, null); } else if (element instanceof TextNodeElement) { TextNodeElement nodeElement = (TextNodeElement) element; @@ -123,13 +125,15 @@ fLinkage.getOccID(), (short) nodeElement.getLevelIndex(), colorTable.getColorCode(nodeElement.getColorIndex()), + colorTable.getColorCode(nodeElement.getColorIndex()), (short) nodeElement.getWeight(), (short) nodeElement.getLineStyle(), (short) nodeElement.getJustification(), (float) nodeElement.getTextNodeHeight(), (float) nodeElement.getTextNodeLength(), (float) angle, - sb.toString() + sb.toString(), + -1 }, null); } return feature; diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/edbgeo/AbstractDgnToEdbGeoJobContext.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/edbgeo/AbstractDgnToEdbGeoJobContext.java index 8bddca6..011c4ab 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/edbgeo/AbstractDgnToEdbGeoJobContext.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/edbgeo/AbstractDgnToEdbGeoJobContext.java @@ -643,7 +643,7 @@ if (bindingType.equals(Short.class)) { pstmt.setShort(i + 1, (Short) attributes.get(i)); } else if (bindingType.equals(Integer.class)) { - pstmt.setInt(i + 1, (Short) attributes.get(i)); + pstmt.setInt(i + 1, (Integer) attributes.get(i)); } else if (bindingType.equals(Long.class)) { pstmt.setLong(i + 1, (Long) attributes.get(i)); } else if (bindingType.equals(String.class)) { diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/edbgeo/AbstractOracleToEdbGeoJobContext.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/edbgeo/AbstractOracleToEdbGeoJobContext.java index 3723cf1..b713ece 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/edbgeo/AbstractOracleToEdbGeoJobContext.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/edbgeo/AbstractOracleToEdbGeoJobContext.java @@ -669,7 +669,7 @@ if (bindingType.equals(Short.class)) { pstmt.setShort(i + 1, (Short) attributes.get(i)); } else if (bindingType.equals(Integer.class)) { - pstmt.setInt(i + 1, (Short) attributes.get(i)); + pstmt.setInt(i + 1, (Integer) attributes.get(i)); } else if (bindingType.equals(Long.class)) { pstmt.setLong(i + 1, (Long) attributes.get(i)); } else if (bindingType.equals(String.class)) { diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/AbstractDgnToPostGISJobContext.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/AbstractDgnToPostGISJobContext.java index 65d59d8..0399f15 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/AbstractDgnToPostGISJobContext.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/AbstractDgnToPostGISJobContext.java @@ -175,7 +175,10 @@ } catch (SchemaNotFoundException e) { return false; } catch (IOException e) { - getLogger().info(e.getMessage(), e); + if (e.getMessage().indexOf("Schema") != -1) + getLogger().info(e.getMessage(), e); + else + getLogger().info(e.getMessage()); return false; } } @@ -667,7 +670,7 @@ if (bindingType.equals(Short.class)) { pstmt.setShort(i + 1, (Short) attributes.get(i)); } else if (bindingType.equals(Integer.class)) { - pstmt.setInt(i + 1, (Short) attributes.get(i)); + pstmt.setInt(i + 1, (Integer) attributes.get(i)); } else if (bindingType.equals(Long.class)) { pstmt.setLong(i + 1, (Long) attributes.get(i)); } else if (bindingType.equals(String.class)) { diff --git a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/AbstractOracleToPostGISJobContext.java b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/AbstractOracleToPostGISJobContext.java index fec33b4..359e949 100644 --- a/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/AbstractOracleToPostGISJobContext.java +++ b/xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/context/postgis/AbstractOracleToPostGISJobContext.java @@ -172,7 +172,10 @@ } catch (SchemaNotFoundException e) { return false; } catch (IOException e) { - getLogger().info(e.getMessage(), e); + if (e.getMessage().indexOf("Schema") != -1) + getLogger().info(e.getMessage(), e); + else + getLogger().info(e.getMessage()); return false; } } @@ -472,7 +475,8 @@ } if (length < 1) { - getLogger().info("FeatureType did not specify string length; defaulted to 512"); + getLogger().info("FeatureType did not specify string length; defaulted to 512 :" + + descriptor.getLocalName()); length = 512; } else if (length > MAX_ALLOWED_VALUE) { length = MAX_ALLOWED_VALUE; @@ -687,7 +691,7 @@ if (bindingType.equals(Short.class)) { pstmt.setShort(i + 1, (Short) attributes.get(i)); } else if (bindingType.equals(Integer.class)) { - pstmt.setInt(i + 1, (Short) attributes.get(i)); + pstmt.setInt(i + 1, (Integer) attributes.get(i)); } else if (bindingType.equals(Long.class)) { pstmt.setLong(i + 1, (Long) attributes.get(i)); } else if (bindingType.equals(String.class)) { 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 e6c41d6..026d6e2 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 @@ -94,7 +94,6 @@ return; } - // �P�_�O�_�ũM��� SimpleFeature feature = elementDispatcher.execute(element, getDistId(), isTransformed()); if (feature == null) { FrammeAttributeData linkage = 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 84993eb..8ee8088 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 @@ -287,12 +287,14 @@ return SimpleFeatureBuilder.build(featureType, new Object[]{ geom, colorTable.getColorCode(textElement.getColorIndex()), + colorTable.getColorCode(textElement.getColorIndex()), textElement.getFontIndex(), textElement.getJustification(), textElement.getTextHeight(), textElement.getTextWidth(), angle, - content + content, + -1 }, null); } else { logger.info("geometry is null." + element.toString()); @@ -318,12 +320,14 @@ return SimpleFeatureBuilder.build(featureType, new Object[]{ geom, colorTable.getColorCode(textNodeElement.getColorIndex()), + colorTable.getColorCode(textNodeElement.getColorIndex()), textNodeElement.getFontIndex(), textNodeElement.getJustification(), textNodeElement.getTextNodeHeight(), textNodeElement.getTextNodeLength(), angle, - sb.toString() + sb.toString(), + -1 }, null); } else { logger.info("geometry is null." + element.toString()); @@ -337,8 +341,10 @@ return SimpleFeatureBuilder.build(featureType, new Object[]{ geom, colorTable.getColorCode(shapeElement.getColorIndex()), + colorTable.getColorCode(shapeElement.getColorIndex()), shapeElement.getWeight(), - shapeElement.getLineStyle() + shapeElement.getLineStyle(), + -1 }, null); } else { logger.info("geometry is null." + element.toString()); @@ -352,8 +358,10 @@ return SimpleFeatureBuilder.build(featureType, new Object[]{ geom, colorTable.getColorCode(linestring.getColorIndex()), + colorTable.getColorCode(linestring.getColorIndex()), linestring.getWeight(), - linestring.getLineStyle() + linestring.getLineStyle(), + -1 }, null); } return null; @@ -365,8 +373,10 @@ return SimpleFeatureBuilder.build(featureType, new Object[]{ geom, colorTable.getColorCode(line.getColorIndex()), + colorTable.getColorCode(line.getColorIndex()), line.getWeight(), - line.getLineStyle() + line.getLineStyle(), + -1 }, null); } return null; @@ -383,8 +393,10 @@ return SimpleFeatureBuilder.build(featureType, new Object[]{ geom, colorTable.getColorCode(arcElement.getColorIndex()), + colorTable.getColorCode(arcElement.getColorIndex()), arcElement.getWeight(), - arcElement.getLineStyle() + arcElement.getLineStyle(), + -1 }, null); } return null; @@ -396,8 +408,10 @@ return SimpleFeatureBuilder.build(featureType, new Object[]{ geom, colorTable.getColorCode(arcElement.getColorIndex()), + colorTable.getColorCode(arcElement.getColorIndex()), arcElement.getWeight(), - arcElement.getLineStyle() + arcElement.getLineStyle(), + -1 }, null); } return null; @@ -409,8 +423,10 @@ return SimpleFeatureBuilder.build(featureType, new Object[]{ geom, colorTable.getColorCode(complexChainElement.getColorIndex()), + colorTable.getColorCode(complexChainElement.getColorIndex()), complexChainElement.getWeight(), - complexChainElement.getLineStyle() + complexChainElement.getLineStyle(), + -1 }, null); } return null; 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 e3c3ff4..f7e718d 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 @@ -227,6 +227,12 @@ } logger.error(e.getServerErrorMessage()); logger.error(e.getMessage(), e); + } catch (NullPointerException e) { + if (bindingStmt != null) { + logger.error("Execute:" + bindingStmt); + } + logger.error(feature.toString()); + logger.error(e.getMessage(), e); } catch (ClassCastException e) { if (bindingStmt != null) { logger.error("Execute:" + bindingStmt); 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 2c6ed77..e144220 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 @@ -102,35 +102,33 @@ attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "geom", createGeometryType(attrBuilder, "PointType", Point.class, false, lookupCRS(defaultSRID)))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("symcolor", String.class, notAllowNull, 12, "")); + attrBuilder = new AttributeTypeBuilder(); + attrDescs.add(attrBuilder.buildDescriptor( + "dyncolor", createAttributeType(attrBuilder, "StringType", String.class, notAllowNull, 12, ""))); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "symcolor", createAttributeType(attrBuilder, "StringType", String.class, notAllowNull, 12, ""))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("font", Short.class, notAllowNull, 1, (short) 0)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "font", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull, 1, (short) 0))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("just", Short.class, notAllowNull, 1, (short) 0)); 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, notAllowNull, 254, "")); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "context", createAttributeType(attrBuilder, "StringType", String.class, notAllowNull, 254, ""))); - + attrBuilder = new AttributeTypeBuilder(); + attrDescs.add(attrBuilder.buildDescriptor( + "fowner", createAttributeType(attrBuilder, "IntegerType", Integer.class, allowNull, 1, -1))); typeBuilder.addAll(attrDescs); return typeBuilder; } @@ -143,22 +141,25 @@ AttributeTypeBuilder attrBuilder; ArrayList<AttributeDescriptor> attrDescs = new ArrayList<AttributeDescriptor>(); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("geom", LineString.class, true)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "geom", createGeometryType(attrBuilder, "LineType", LineString.class, true, lookupCRS(defaultSRID)))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("symcolor", String.class, notAllowNull, 12, "")); + attrBuilder = new AttributeTypeBuilder(); + attrDescs.add(attrBuilder.buildDescriptor( + "dyncolor", createAttributeType(attrBuilder, "StringType", 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))); + attrBuilder = new AttributeTypeBuilder(); + attrDescs.add(attrBuilder.buildDescriptor( + "fowner", createAttributeType(attrBuilder, "IntegerType", Integer.class, allowNull, 1, -1))); + typeBuilder.addAll(attrDescs); return typeBuilder; } @@ -171,22 +172,24 @@ AttributeTypeBuilder attrBuilder; ArrayList<AttributeDescriptor> attrDescs = new ArrayList<AttributeDescriptor>(); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("geom", MultiLineString.class, true)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "geom", createGeometryType(attrBuilder, "MultiLineStringType", MultiLineString.class, true, lookupCRS(defaultSRID)))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("symcolor", String.class, notAllowNull, 12, "")); + attrBuilder = new AttributeTypeBuilder(); + attrDescs.add(attrBuilder.buildDescriptor( + "dyncolor", createAttributeType(attrBuilder, "StringType", 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))); + attrBuilder = new AttributeTypeBuilder(); + attrDescs.add(attrBuilder.buildDescriptor( + "fowner", createAttributeType(attrBuilder, "IntegerType", Integer.class, allowNull, 1, -1))); typeBuilder.addAll(attrDescs); return typeBuilder; } @@ -199,49 +202,34 @@ AttributeTypeBuilder attrBuilder; ArrayList<AttributeDescriptor> attrDescs = new ArrayList<AttributeDescriptor>(); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("geom", Polygon.class, true)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "geom", createGeometryType(attrBuilder, "PolygonType", Polygon.class, true, lookupCRS(defaultSRID)))); - - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("symcolor", String.class, notAllowNull, 12, "")); + attrBuilder = new AttributeTypeBuilder(); + attrDescs.add(attrBuilder.buildDescriptor( + "dyncolor", createAttributeType(attrBuilder, "StringType", 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))); + attrBuilder = new AttributeTypeBuilder(); + attrDescs.add(attrBuilder.buildDescriptor( + "fowner", createAttributeType(attrBuilder, "IntegerType", Integer.class, allowNull, 1, -1))); typeBuilder.addAll(attrDescs); return typeBuilder; } public static SimpleFeatureTypeBuilder createNormalArcFeatureTypeBuilder(String featureName) { return createNormalLineFeatureTypeBuilder(featureName); - /* - FeatureTypeBuilder typeBuilder = FeatureTypeBuilder.newInstance(featureName); - typeBuilder.addType(AttributeTypeFactory.newAttributeType("geom", Geometry.class, false)); - typeBuilder.addType(AttributeTypeFactory.newAttributeType("symcolor", String.class, notAllowNull, 12)); - typeBuilder.addType(AttributeTypeFactory.newAttributeType("symweight", Short.class, false)); - typeBuilder.addType(AttributeTypeFactory.newAttributeType("symstyle", Short.class, false)); - return typeBuilder; - */ } public static SimpleFeatureTypeBuilder createNormalEllipseFeatureTypeBuilder(String featureName) { return createNormalPolygonFeatureTypeBuilder(featureName); - /* - FeatureTypeBuilder typeBuilder = FeatureTypeBuilder.newInstance(featureName); - typeBuilder.addType(AttributeTypeFactory.newAttributeType("geom", Geometry.class, false)); - typeBuilder.addType(AttributeTypeFactory.newAttributeType("symcolor", String.class, notAllowNull, 12)); - typeBuilder.addType(AttributeTypeFactory.newAttributeType("symweight", Short.class, false)); - typeBuilder.addType(AttributeTypeFactory.newAttributeType("symstyle", Short.class, false)); - return typeBuilder; - */ } public static SimpleFeatureTypeBuilder createNormalIndexFeatureTypeBuilder(String featureName) { @@ -252,39 +240,30 @@ AttributeTypeBuilder attrBuilder; ArrayList<AttributeDescriptor> attrDescs = new ArrayList<AttributeDescriptor>(); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("geom", Polygon.class, true)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "geom", createGeometryType(attrBuilder, "PolygonType", Polygon.class, true, lookupCRS(defaultSRID)))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("x1", Double.class, notAllowNull, 1, 0.0)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "x1", createAttributeType(attrBuilder, "DoubleType", Double.class, notAllowNull, 1, 0.0))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("y1", Double.class, notAllowNull, 1, 0.0)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "y1", createAttributeType(attrBuilder, "DoubleType", Double.class, notAllowNull, 1, 0.0))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("x2", Double.class, notAllowNull, 1, 0.0)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "x2", createAttributeType(attrBuilder, "DoubleType", Double.class, notAllowNull, 1, 0.0))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("y2", Double.class, notAllowNull, 1, 0.0)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "y2", createAttributeType(attrBuilder, "DoubleType", Double.class, notAllowNull, 1, 0.0))); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("tpclid", String.class, notAllowNull, 12, "")); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "tpclid", createAttributeType(attrBuilder, "StringType", String.class, notAllowNull, 12, ""))); - // 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))); @@ -301,39 +280,30 @@ AttributeTypeBuilder attrBuilder; ArrayList<AttributeDescriptor> attrDescs = new ArrayList<AttributeDescriptor>(); - // typeBuilder.addType(AttributeTypeFactory.newAttributeType("geom", Point.class, true)); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "geom", createGeometryType(attrBuilder, "PointType", Point.class, true, lookupCRS(defaultSRID)))); - // 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, 1, (short) 0)); 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("tpclid", String.class, notAllowNull, 12, "")); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "tpclid", createAttributeType(attrBuilder, "StringType", String.class, notAllowNull, 12, ""))); @@ -373,6 +343,9 @@ "level", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull))); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( + "dyncolor", createAttributeType(attrBuilder, "StringType", String.class, notAllowNull, 12, ""))); + attrBuilder = new AttributeTypeBuilder(); + attrDescs.add(attrBuilder.buildDescriptor( "symcolor", createAttributeType(attrBuilder, "StringType", String.class, notAllowNull, 12, ""))); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( @@ -394,7 +367,10 @@ "angle", createAttributeType(attrBuilder, "FloatType", Float.class, notAllowNull, 1, (float) 0.0))); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( - "context", createAttributeType(attrBuilder, "StringType", String.class, true, 254))); + "context", createAttributeType(attrBuilder, "StringType", String.class, allowNull, 254, ""))); + attrBuilder = new AttributeTypeBuilder(); + attrDescs.add(attrBuilder.buildDescriptor( + "fowner", createAttributeType(attrBuilder, "IntegerType", Integer.class, allowNull, 1, -1))); typeBuilder.addAll(attrDescs); return typeBuilder; @@ -431,6 +407,9 @@ "level", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull))); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( + "dyncolor", createAttributeType(attrBuilder, "StringType", String.class, notAllowNull, 12, ""))); + attrBuilder = new AttributeTypeBuilder(); + attrDescs.add(attrBuilder.buildDescriptor( "symcolor", createAttributeType(attrBuilder, "StringType", String.class, notAllowNull, 12, ""))); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( @@ -453,6 +432,9 @@ attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "symbol", createAttributeType(attrBuilder, "StringType", String.class, notAllowNull, 20))); + attrBuilder = new AttributeTypeBuilder(); + attrDescs.add(attrBuilder.buildDescriptor( + "fowner", createAttributeType(attrBuilder, "IntegerType", Integer.class, allowNull, 1, -1))); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "origin", createGeometryType(attrBuilder, "PointType", Point.class, notAllowNull, lookupCRS(defaultSRID)))); @@ -492,6 +474,9 @@ "level", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull))); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( + "dyncolor", createAttributeType(attrBuilder, "StringType", String.class, notAllowNull, 12, ""))); + attrBuilder = new AttributeTypeBuilder(); + attrDescs.add(attrBuilder.buildDescriptor( "symcolor", createAttributeType(attrBuilder, "StringType", String.class, notAllowNull, 12, ""))); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( @@ -499,6 +484,9 @@ attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "symstyle", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull, 1, (short) 0))); + attrBuilder = new AttributeTypeBuilder(); + attrDescs.add(attrBuilder.buildDescriptor( + "fowner", createAttributeType(attrBuilder, "IntegerType", Integer.class, allowNull, 1, -1))); typeBuilder.addAll(attrDescs); return typeBuilder; @@ -535,6 +523,9 @@ "level", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull))); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( + "dyncolor", createAttributeType(attrBuilder, "StringType", String.class, notAllowNull, 12, ""))); + attrBuilder = new AttributeTypeBuilder(); + attrDescs.add(attrBuilder.buildDescriptor( "symcolor", createAttributeType(attrBuilder, "StringType", String.class, notAllowNull, 12, ""))); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( @@ -542,6 +533,9 @@ attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "symstyle", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull, 1, (short) 0))); + attrBuilder = new AttributeTypeBuilder(); + attrDescs.add(attrBuilder.buildDescriptor( + "fowner", createAttributeType(attrBuilder, "IntegerType", Integer.class, allowNull, 1, -1))); typeBuilder.addAll(attrDescs); return typeBuilder; @@ -578,6 +572,9 @@ "level", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull))); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( + "dyncolor", createAttributeType(attrBuilder, "StringType", String.class, notAllowNull, 12, ""))); + attrBuilder = new AttributeTypeBuilder(); + attrDescs.add(attrBuilder.buildDescriptor( "symcolor", createAttributeType(attrBuilder, "StringType", String.class, notAllowNull, 12, ""))); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( @@ -585,6 +582,9 @@ attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "symstyle", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull, 1, (short) 0))); + attrBuilder = new AttributeTypeBuilder(); + attrDescs.add(attrBuilder.buildDescriptor( + "fowner", createAttributeType(attrBuilder, "IntegerType", Integer.class, allowNull, 1, -1))); typeBuilder.addAll(attrDescs); return typeBuilder; @@ -629,6 +629,9 @@ "level", createAttributeType(attrBuilder, "ShortType", Short.class, notAllowNull))); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( + "dyncolor", createAttributeType(attrBuilder, "StringType", String.class, notAllowNull, 12, ""))); + attrBuilder = new AttributeTypeBuilder(); + attrDescs.add(attrBuilder.buildDescriptor( "symcolor", createAttributeType(attrBuilder, "StringType", String.class, notAllowNull, 12, ""))); attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( @@ -651,6 +654,9 @@ attrBuilder = new AttributeTypeBuilder(); attrDescs.add(attrBuilder.buildDescriptor( "symbol", createAttributeType(attrBuilder, "StringType", String.class, notAllowNull, 20))); + attrBuilder = new AttributeTypeBuilder(); + attrDescs.add(attrBuilder.buildDescriptor( + "fowner", createAttributeType(attrBuilder, "IntegerType", Integer.class, allowNull, 1, -1))); typeBuilder.addAll(attrDescs); return typeBuilder; -- Gitblit v0.0.0-SNAPSHOT