| | |
| | | <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> |
| | |
| | | <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> |
| | | |
| | |
| | | <parent> |
| | | <groupId>com.ximple.eofms.maven</groupId> |
| | | <artifactId>ximple-maven</artifactId> |
| | | <version>1.3.1</version> |
| | | <version>2.0.0</version> |
| | | </parent> |
| | | |
| | | |
| | |
| | | <parent> |
| | | <groupId>com.ximple.eofms.maven</groupId> |
| | | <artifactId>ximple-build</artifactId> |
| | | <version>1.3.1</version> |
| | | <version>2.0.0</version> |
| | | </parent> |
| | | |
| | | |
| | |
| | | <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.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> |
| | | |
| | |
| | | <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-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> |
| | |
| | | <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> |
| | |
| | | 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; |
| | |
| | | return; |
| | | } |
| | | |
| | | // §PÂ_¬O§_²Å©M±ø¥ó |
| | | // �P�_�O�_�ũM��� |
| | | Feature feature = elementDispatcher.execute(element, false); |
| | | if (feature == null) |
| | | { |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | 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; |
| | | |
| | |
| | | } |
| | | |
| | | 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; |
| | |
| | | if (gobj != null) |
| | | feature = SimpleFeatureBuilder.build(featureType, new Object[]{ |
| | | gobj, |
| | | distId, |
| | | fLinkage.getFsc(), |
| | | (long) fLinkage.getUfid(), |
| | | (short) fLinkage.getComponentID(), |
| | |
| | | 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; |
| | | |
| | |
| | | } |
| | | |
| | | 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; |
| | |
| | | if (gobj != null) |
| | | feature = SimpleFeatureBuilder.build(featureType, new Object[]{ |
| | | gobj, |
| | | distId, |
| | | fLinkage.getFsc(), |
| | | (long) fLinkage.getUfid(), |
| | | (short) fLinkage.getComponentID(), |
| | |
| | | if (gobj != null) |
| | | feature = SimpleFeatureBuilder.build(featureType, new Object[]{ |
| | | gobj, |
| | | distId, |
| | | fLinkage.getFsc(), |
| | | (long) fLinkage.getUfid(), |
| | | (short) fLinkage.getComponentID(), |
| | |
| | | if (gobj != null) |
| | | feature = SimpleFeatureBuilder.build(featureType, new Object[]{ |
| | | gobj, |
| | | distId, |
| | | fLinkage.getFsc(), |
| | | (long) fLinkage.getUfid(), |
| | | (short) fLinkage.getComponentID(), |
| | |
| | | if (gobj != null) |
| | | feature = SimpleFeatureBuilder.build(featureType, new Object[]{ |
| | | gobj, |
| | | distId, |
| | | fLinkage.getFsc(), |
| | | (long) fLinkage.getUfid(), |
| | | (short) fLinkage.getComponentID(), |
| | |
| | | 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; |
| | | |
| | |
| | | } |
| | | |
| | | 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; |
| | |
| | | if (gobj != null) |
| | | feature = SimpleFeatureBuilder.build(featureType, new Object[]{ |
| | | gobj, |
| | | distId, |
| | | fLinkage.getFsc(), |
| | | (long) fLinkage.getUfid(), |
| | | (short) fLinkage.getComponentID(), |
| | |
| | | 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; |
| | | |
| | |
| | | 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); |
| | | |
| | |
| | | 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; |
| | | |
| | |
| | | } |
| | | |
| | | 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; |
| | |
| | | if (gobj != null) |
| | | feature = SimpleFeatureBuilder.build(featureType, new Object[]{ |
| | | gobj, |
| | | distId, |
| | | fLinkage.getFsc(), |
| | | (long) fLinkage.getUfid(), |
| | | (short) fLinkage.getComponentID(), |
| | |
| | | if (gobj != null) |
| | | feature = SimpleFeatureBuilder.build(featureType, new Object[]{ |
| | | gobj, |
| | | distId, |
| | | fLinkage.getFsc(), |
| | | (long) fLinkage.getUfid(), |
| | | (short) fLinkage.getComponentID(), |
| | |
| | | if (gobj != null) |
| | | feature = SimpleFeatureBuilder.build(featureType, new Object[]{ |
| | | gobj, |
| | | distId, |
| | | fLinkage.getFsc(), |
| | | (long) fLinkage.getUfid(), |
| | | (short) fLinkage.getComponentID(), |
| | |
| | | if (gobj != null) |
| | | feature = SimpleFeatureBuilder.build(featureType, new Object[]{ |
| | | gobj, |
| | | distId, |
| | | fLinkage.getFsc(), |
| | | (long) fLinkage.getUfid(), |
| | | (short) fLinkage.getComponentID(), |
| | |
| | | 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; |
| | | |
| | |
| | | } |
| | | |
| | | 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; |
| | |
| | | if (gobj != null) |
| | | feature = SimpleFeatureBuilder.build(featureType, new Object[]{ |
| | | gobj, |
| | | distId, |
| | | fLinkage.getFsc(), |
| | | (long) fLinkage.getUfid(), |
| | | (short) fLinkage.getComponentID(), |
| | |
| | | |
| | | feature = SimpleFeatureBuilder.build(featureType, new Object[]{ |
| | | line, |
| | | distId, |
| | | fLinkage.getFsc(), |
| | | (long) fLinkage.getUfid(), |
| | | (short) fLinkage.getComponentID(), |
| | |
| | | if (gobj != null) |
| | | feature = SimpleFeatureBuilder.build(featureType, new Object[]{ |
| | | gobj, |
| | | distId, |
| | | fLinkage.getFsc(), |
| | | (long) fLinkage.getUfid(), |
| | | (short) fLinkage.getComponentID(), |
| | |
| | | } |
| | | feature = SimpleFeatureBuilder.build(featureType, new Object[]{ |
| | | gobj, |
| | | distId, |
| | | fLinkage.getFsc(), |
| | | (long) fLinkage.getUfid(), |
| | | (short) fLinkage.getComponentID(), |
| | |
| | | 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; |
| | | |
| | |
| | | } |
| | | |
| | | 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; |
| | |
| | | if (gobj != null) |
| | | feature = SimpleFeatureBuilder.build(featureType, new Object[]{ |
| | | gobj, |
| | | distId, |
| | | fLinkage.getFsc(), |
| | | (long) fLinkage.getUfid(), |
| | | (short) fLinkage.getComponentID(), |
| | |
| | | if (gobj != null) |
| | | feature = SimpleFeatureBuilder.build(featureType, new Object[]{ |
| | | gobj, |
| | | distId, |
| | | fLinkage.getFsc(), |
| | | (long) fLinkage.getUfid(), |
| | | (short) fLinkage.getComponentID(), |
| | |
| | | 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; |
| | | |
| | |
| | | } |
| | | |
| | | 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; |
| | |
| | | if (gobj != null) |
| | | feature = SimpleFeatureBuilder.build(featureType, new Object[]{ |
| | | gobj, |
| | | distId, |
| | | fLinkage.getFsc(), |
| | | (long) fLinkage.getUfid(), |
| | | (short) fLinkage.getComponentID(), |
| | |
| | | if (gobj != null) |
| | | feature = SimpleFeatureBuilder.build(featureType, new Object[]{ |
| | | gobj, |
| | | distId, |
| | | fLinkage.getFsc(), |
| | | (long) fLinkage.getUfid(), |
| | | (short) fLinkage.getComponentID(), |
| | |
| | | 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; |
| | |
| | | } |
| | | |
| | | 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; |
| | |
| | | if (gobj != null) |
| | | feature = SimpleFeatureBuilder.build(featureType, new Object[]{ |
| | | gobj, |
| | | distId, |
| | | fLinkage.getFsc(), |
| | | (long) fLinkage.getUfid(), |
| | | (short) fLinkage.getComponentID(), |
| | |
| | | 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; |
| | | |
| | |
| | | } |
| | | |
| | | 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; |
| | |
| | | if (gobj != null) |
| | | feature = SimpleFeatureBuilder.build(featureType, new Object[]{ |
| | | gobj, |
| | | distId, |
| | | fLinkage.getFsc(), |
| | | (long) fLinkage.getUfid(), |
| | | (short) fLinkage.getComponentID(), |
| | |
| | | if (gobj != null) |
| | | feature = SimpleFeatureBuilder.build(featureType, new Object[]{ |
| | | gobj, |
| | | distId, |
| | | fLinkage.getFsc(), |
| | | (long) fLinkage.getUfid(), |
| | | (short) fLinkage.getComponentID(), |
| | |
| | | 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); |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | 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; |
| | |
| | | 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; |
| | | |
| | |
| | | (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) { |
| | |
| | | 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; |
| | | |
| | |
| | | (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) { |
| | |
| | | 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; |
| | | |
| | |
| | | (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) { |
| | |
| | | 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; |
| | |
| | | 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 { |
| | | /** |
| | |
| | | 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."); |
| | | } |
| | | } |
| | | } |
| | |
| | | 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; |
| | |
| | | return; |
| | | } |
| | | |
| | | SimpleFeature feature = elementDispatcher.execute(element, isTransformed()); |
| | | SimpleFeature feature = elementDispatcher.execute(element, getDistId(), isTransformed()); |
| | | if (feature == null) { |
| | | FrammeAttributeData linkage = |
| | | AbstractFLinkageDispatchableFilter.getFeatureLinkage(element); |
| | |
| | | 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);
|
| | | }
|
| | |
|
| | |
| | | (((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;
|
| | |
| | | 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++;
|
| | | }
|
| | |
| | | } finally {
|
| | | convertContext.closeFeatureWriter();
|
| | |
|
| | | if (reader != null)
|
| | | {
|
| | | if (reader != null) {
|
| | | try {
|
| | | reader.close();
|
| | | } catch (IOException e) {
|
| | |
| | | } finally {
|
| | | convertContext.closeFeatureWriter();
|
| | |
|
| | | if (reader != null)
|
| | | {
|
| | | if (reader != null) {
|
| | | try {
|
| | | reader.close();
|
| | | } catch (IOException e) {
|
| | |
| | | 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 |
| | |
| | | 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, |
| | |
| | | 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 |
| | |
| | | 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, |
| | |
| | | |
| | | long tStep = System.currentTimeMillis(); |
| | | |
| | | fetchTPData(jobContext); |
| | | logger.info("TPC DIST:" + jobContext.getDistId() + ":" + |
| | | ((jobContext.getDistName() == null) ? "NULL" : jobContext.getDistName())); |
| | | |
| | | if (isCopyConnectivityMode()) { |
| | | copyConnectivity(jobContext); |
| | | } |
| | |
| | | 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, |
| | |
| | | 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; |
| | |
| | | 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, |
| | |
| | | private long _processTimeStart;
|
| | | private long _updateTimeStart;
|
| | |
|
| | | private short distId;
|
| | |
|
| | | // --------------------------- CONSTRUCTORS ---------------------------
|
| | |
|
| | | public AbstractDgnFileJobContext(String dataPath, boolean profileMode,
|
| | |
| | | return _useTransform;
|
| | | }
|
| | |
|
| | | public short getDistId() {
|
| | | return distId;
|
| | | }
|
| | |
|
| | | public void setDistId(short distId) {
|
| | | this.distId = distId;
|
| | | }
|
| | |
|
| | | // -------------------------- OTHER METHODS --------------------------
|
| | |
|
| | | public final void accumulateProcessTime() {
|
| | |
| | | " CACHE 20\n" + |
| | | " NOORDER"; |
| | | |
| | | public static String FETCH_TPDATA = "SELECT TPID, TPNAME FROM BASEDB.TPDATA"; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | |
| | | private Connection connection = null; |
| | | private boolean profileMode; |
| | | private boolean useTransform; |
| | | |
| | | private short distId; |
| | | private String distName; |
| | | |
| | | private long _processTime; |
| | | private long _updateTime; |
| | |
| | | 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; |
| | | } |
| | | } |
| | |
| | | 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;
|
| | |
| | | }
|
| | |
|
| | | // �P�_�O�_�ũM���
|
| | | SimpleFeature feature = elementDispatcher.execute(element, isTransformed());
|
| | | SimpleFeature feature = elementDispatcher.execute(element, getDistId(), isTransformed());
|
| | | if (feature == null) {
|
| | | FrammeAttributeData linkage =
|
| | | AbstractFLinkageDispatchableFilter.getFeatureLinkage(element);
|
| | |
| | | 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;
|
| | |
| | | }
|
| | |
|
| | | // �P�_�O�_�ũM���
|
| | | SimpleFeature feature = elementDispatcher.execute(element, isTransformed());
|
| | | SimpleFeature feature = elementDispatcher.execute(element, getDistId(), isTransformed());
|
| | | if (feature == null) {
|
| | | FrammeAttributeData linkage =
|
| | | AbstractFLinkageDispatchableFilter.getFeatureLinkage(element);
|
| | |
| | | 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;
|
| | |
| | | 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;
|
| | |
| | | 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 =
|
| | |
| | | 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; |
| | |
| | | return; |
| | | } |
| | | |
| | | SimpleFeature feature = elementDispatcher.execute(element, isTransformed()); |
| | | SimpleFeature feature = elementDispatcher.execute(element, getDistId(), isTransformed()); |
| | | if (feature == null) { |
| | | FrammeAttributeData linkage = |
| | | AbstractFLinkageDispatchableFilter.getFeatureLinkage(element); |
| | |
| | | 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; |
| | |
| | | } |
| | | |
| | | // �P�_�O�_�ũM��� |
| | | SimpleFeature feature = elementDispatcher.execute(element, isTransformed()); |
| | | SimpleFeature feature = elementDispatcher.execute(element, getDistId(), isTransformed()); |
| | | if (feature == null) { |
| | | FrammeAttributeData linkage = |
| | | AbstractFLinkageDispatchableFilter.getFeatureLinkage(element); |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | 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 = |
| | |
| | | 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; |
| | |
| | | } |
| | | |
| | | // �P�_�O�_�ũM��� |
| | | SimpleFeature feature = elementDispatcher.execute(element, isTransformed()); |
| | | SimpleFeature feature = elementDispatcher.execute(element, getDistId(), isTransformed()); |
| | | if (feature == null) { |
| | | FrammeAttributeData linkage = |
| | | AbstractFLinkageDispatchableFilter.getFeatureLinkage(element); |
| | |
| | | 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; |
| | |
| | | return; |
| | | } |
| | | |
| | | SimpleFeature feature = elementDispatcher.execute(element, isTransformed()); |
| | | SimpleFeature feature = elementDispatcher.execute(element, getDistId(), isTransformed()); |
| | | if (feature == null) { |
| | | FrammeAttributeData linkage = |
| | | AbstractFLinkageDispatchableFilter.getFeatureLinkage(element); |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | 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 = |
| | |
| | | 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; |
| | |
| | | } |
| | | |
| | | // �P�_�O�_�ũM��� |
| | | SimpleFeature feature = elementDispatcher.execute(element, isTransformed()); |
| | | SimpleFeature feature = elementDispatcher.execute(element, getDistId(), isTransformed()); |
| | | if (feature == null) { |
| | | FrammeAttributeData linkage = |
| | | AbstractFLinkageDispatchableFilter.getFeatureLinkage(element); |
| | |
| | | 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; |
| | |
| | | } |
| | | |
| | | // �P�_�O�_�ũM��� |
| | | SimpleFeature feature = elementDispatcher.execute(element, isTransformed()); |
| | | SimpleFeature feature = elementDispatcher.execute(element, getDistId(), isTransformed()); |
| | | if (feature == null) { |
| | | FrammeAttributeData linkage = |
| | | AbstractFLinkageDispatchableFilter.getFeatureLinkage(element); |
| | |
| | | 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; |
| | |
| | | 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); |
| | |
| | | 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; |
| | |
| | | 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 { |
| | | |
| | |
| | | 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 = |
| | |
| | | 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; |
| | |
| | | } |
| | | |
| | | // �P�_�O�_�ũM��� |
| | | SimpleFeature feature = elementDispatcher.execute(element, isTransformed()); |
| | | SimpleFeature feature = elementDispatcher.execute(element, getDistId(), isTransformed()); |
| | | if (feature == null) { |
| | | FrammeAttributeData linkage = |
| | | AbstractFLinkageDispatchableFilter.getFeatureLinkage(element); |
| | |
| | | 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; |
| | |
| | | } |
| | | |
| | | // �P�_�O�_�ũM��� |
| | | SimpleFeature feature = elementDispatcher.execute(element, isTransformed()); |
| | | SimpleFeature feature = elementDispatcher.execute(element, getDistId(), isTransformed()); |
| | | if (feature == null) { |
| | | FrammeAttributeData linkage = |
| | | AbstractFLinkageDispatchableFilter.getFeatureLinkage(element); |
| | |
| | | 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; |
| | |
| | | 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; |
| | | |
| | |
| | | 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; |
| | |
| | | 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; |
| | | |
| | |
| | | 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; |
| | |
| | | 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 { |
| | |
| | | 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 = |
| | |
| | | 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; |
| | |
| | | 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))); |
| | |
| | | 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))); |
| | |
| | | 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))); |
| | |
| | | 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))); |
| | |
| | | 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))); |
| | |
| | | |
| | | 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) { |
| | |
| | | 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))); |