xdgnjobs/pom.xml
@@ -20,6 +20,7 @@ <java5>1.5</java5> <xdgnio.version>0.0.1</xdgnio.version> <gt.version>2.4.1</gt.version> <failIfNoTests>false</failIfNoTests> </properties> <profiles> xdgnjobs/ximple-jobcarrier/src/main/resources/quartz_jobs.xml
@@ -52,6 +52,10 @@ <key>TESTMODE</key> <value>true</value> </entry> <entry> <key>TESTCOUNT</key> <value>2</value> </entry> </job-data-map> </job-detail> xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/AbstractDispatchableFilter.java
@@ -7,6 +7,7 @@ { private String name; private String description; private int elmtype; protected Log logger = LogFactory.getLog(AbstractFLinkageDispatchableFilter.class); @@ -33,4 +34,14 @@ { this.description = description; } public int getElmtype() { return elmtype; } public void setElmtype(int elmtype) { this.elmtype = elmtype; } } xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/AbstractFLinkageDispatchableFilter.java
@@ -8,7 +8,7 @@ public abstract class AbstractFLinkageDispatchableFilter extends AbstractDispatchableFilter { protected FrammeAttributeData getFeatureLinkage(Element element) public static FrammeAttributeData getFeatureLinkage(Element element) { if (!element.hasUserAttributeData()) return null; @@ -18,8 +18,7 @@ { if (anUsrData instanceof FrammeAttributeData) { FrammeAttributeData featureLinkage = (FrammeAttributeData) anUsrData; return featureLinkage; return (FrammeAttributeData) anUsrData; } } return null; xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/CreateLineStringStrategy.java
@@ -47,7 +47,7 @@ { if (typeBuilder == null) { FeatureTypeBuilder typeBuilder = FeatureTypeBuilder.newInstance(featureName); typeBuilder = FeatureTypeBuilder.newInstance(featureName); typeBuilder.addType(AttributeTypeFactory.newAttributeType("GEOM", Geometry.class)); typeBuilder.addType(AttributeTypeFactory.newAttributeType("TID", Integer.class)); typeBuilder.addType(AttributeTypeFactory.newAttributeType("OID", Long.class)); xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/TypeCompIdDispatchableFilter.java
@@ -62,7 +62,7 @@ { FrammeAttributeData featureLinkage = getFeatureLinkage(element); return featureLinkage != null && tid == featureLinkage.getFsc() && (cid == featureLinkage.getComponentID()); (cid == featureLinkage.getComponentID() && (getElmtype() == element.getElementType().id)); } public Feature execute(Element element) xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/TypeCompLevelIdDispatchableFilter.java
@@ -75,7 +75,8 @@ FrammeAttributeData featureLinkage = getFeatureLinkage(element); return featureLinkage != null && tid == featureLinkage.getFsc() && (cid == featureLinkage.getComponentID()) && (lid == element.getLevelIndex()); (lid == element.getLevelIndex()) && (getElmtype() == element.getElementType().id); } public Feature execute(Element element) xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/filter/TypeIdDispatchableFilter.java
@@ -48,7 +48,8 @@ public boolean isDispatchable(Element element) { FrammeAttributeData featureLinkage = getFeatureLinkage(element); return featureLinkage != null && tid == featureLinkage.getFsc(); return featureLinkage != null && tid == featureLinkage.getFsc() && (getElmtype() == element.getElementType().id); } public Feature execute(Element element) xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/AbstractOracleDatabaseJob.java
@@ -20,6 +20,7 @@ public abstract class AbstractOracleDatabaseJob implements Job { private static final String SHPDATA_DIR = "SHPDATA_DIR"; private static final String CONFSHPFILTER = "SHPFILTER_CONF"; private static final String SPATAILSCHEMA = "ORGSCHEMA"; private static final String ORAHOST = "ORAHOST"; private static final String ORAINST = "ORAINST"; @@ -27,8 +28,10 @@ private static final String ORAUSER = "ORAUSER"; private static final String ORAPASS = "ORAPASS"; private static final String TESTMODE = "TESTMODE"; private static final String TESTCOUNT = "TESTCOUNT"; protected String _dataPath; protected String _filterPath; protected String _oracleHost; protected String _oracleInstance; protected String _oraclePort; @@ -36,6 +39,7 @@ protected String _password; protected String _orgSchema; protected boolean _testMode = false; protected int _testCount = -1; public abstract void execute(JobExecutionContext context) throws JobExecutionException; @@ -46,6 +50,7 @@ // The directory to scan is stored in the job map JobDataMap dataMap = jobDetail.getJobDataMap(); _dataPath = dataMap.getString(SHPDATA_DIR); _filterPath = dataMap.getString(CONFSHPFILTER); _oracleHost = dataMap.getString(ORAHOST); _oracleInstance = dataMap.getString(ORAINST); _oraclePort = dataMap.getString(ORAPORT); @@ -53,6 +58,7 @@ _password = dataMap.getString(ORAPASS); _orgSchema = dataMap.getString(SPATAILSCHEMA); _testMode = dataMap.getBooleanFromString(TESTMODE); _testCount = dataMap.getIntFromString(TESTCOUNT); // Validate the required input if (_dataPath == null) xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertDgn2ShpJob.java
@@ -99,12 +99,12 @@ OrderedMap map = getBlobStorageList(jobContext.getOracleConnection(), querySchema, "SD$SPACENODES" , null); logger.info("begin convert job:[" + map.size() + "]:testmode=" + _testMode); for (OrderedMapIterator it = map.orderedMapIterator(); it.hasNext();) { it.next(); Pair pair = (Pair) it.getValue(); String tableSrc = (String) pair.first; logger.info("begin convert:[" + order + "]-" + tableSrc); @@ -112,7 +112,11 @@ order++; if (_testMode) break; if (_testMode) { if ((_testCount < 0) || (order >= _testCount)) break; } if ((order % COMMITSIZE) == 0) { @@ -123,6 +127,7 @@ } } jobContext.commitTransaction(); logger.info("end convert job:[" + order + "]"); System.gc(); } xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertJobContext.java
@@ -2,7 +2,11 @@ import java.io.File; import java.io.IOException; import java.io.FileNotFoundException; import java.io.UnsupportedEncodingException; import java.net.MalformedURLException; import java.net.URL; import java.net.URLDecoder; import java.sql.DriverManager; import java.sql.SQLException; import java.util.ArrayList; @@ -15,6 +19,8 @@ import org.apache.commons.transaction.memory.PessimisticMapWrapper; import org.apache.commons.transaction.util.CommonsLoggingLogger; import org.apache.commons.transaction.util.LoggerFacade; import org.apache.commons.digester.Digester; import org.apache.commons.digester.xmlrules.DigesterLoader; import org.geotools.data.FeatureWriter; import org.geotools.data.Transaction; import org.geotools.data.shapefile.ShapefileDataStore; @@ -22,6 +28,8 @@ import org.geotools.feature.FeatureType; import org.geotools.feature.IllegalAttributeException; import org.geotools.feature.SimpleFeature; import org.geotools.TestData; import org.xml.sax.SAXException; import com.vividsolutions.jts.util.Assert; @@ -30,7 +38,9 @@ import com.ximple.eofms.filter.CreateLineStringStrategy; import com.ximple.eofms.filter.ElementDispatcher; import com.ximple.eofms.filter.TypeCompIdDispatchableFilter; import com.ximple.eofms.filter.AbstractFLinkageDispatchableFilter; import com.ximple.io.dgn7.Element; import com.ximple.io.dgn7.FrammeAttributeData; public class OracleConvertJobContext { @@ -226,6 +236,11 @@ protected static final long TIMEOUT = Long.MAX_VALUE; /** * Encoding of URL path. */ private static final String ENCODING = "UTF-8"; static { try @@ -252,6 +267,7 @@ } private String _oracleHost; private String _filterConfig; private String _oracleInstance; private String _oraclePort; private String _dataPath; @@ -264,9 +280,10 @@ private HashMap featuresContext = new HashMap(); private PessimisticMapWrapper txFeaturesContext; public OracleConvertJobContext() public OracleConvertJobContext(String filterConfig) { properties = new Properties(); _filterConfig = filterConfig; elementDispatcher = createElementDispatcher(); txFeaturesContext = new PessimisticMapWrapper(featuresContext, sLogger); @@ -274,9 +291,40 @@ private ElementDispatcher createElementDispatcher() { ElementDispatcher dispatcher = new ElementDispatcher(); dispatcher.addRule(new TypeCompIdDispatchableFilter("Conductor", new CreateLineStringStrategy(), 106, 0)); return dispatcher; URL rulesURL = getClass().getResource("ElementDispatcherRules.xml"); File rulesFile = null; try { rulesFile = new File(URLDecoder.decode(rulesURL.getPath(), ENCODING)); if (!rulesFile.exists()) { throw new FileNotFoundException("Could not locate test-data: " + rulesFile); } Digester digester = DigesterLoader.createDigester(rulesFile.toURI().toURL()); File config = new File(_filterConfig); if (!config.exists()) { config = new File("conf\\DefaultConvertShpFilter.xml"); } ElementDispatcher dispatcher = (ElementDispatcher) digester.parse(config); return dispatcher; } catch (UnsupportedEncodingException e) { logger.info(e.getMessage(), e); throw new RuntimeException(e.getMessage(), e); } catch (MalformedURLException e) { logger.info(e.getMessage(), e); throw new RuntimeException(e.getMessage(), e); } catch (IOException e) { logger.info(e.getMessage(), e); throw new RuntimeException(e.getMessage(), e); } catch (SAXException e) { logger.info(e.getMessage(), e); throw new RuntimeException(e.getMessage(), e); } } public void setLogin(String userName, String password) @@ -338,7 +386,15 @@ { Feature feature = elementDispatcher.execute(element); if (feature == null) { FrammeAttributeData linkage = AbstractFLinkageDispatchableFilter.getFeatureLinkage(element); logger.debug("Unknown Element:" + element.getElementType().toString() + ":type=" + element.getType() + ":lv=" + element.getLevelIndex() + ":id=" + (linkage == null ? "NULL" : (linkage.getFsc() + "|" +linkage.getComponentID()))); return; } if (!txFeaturesContext.containsKey(feature.getFeatureType())) { @@ -355,7 +411,13 @@ public void commitTransaction() { txFeaturesContext.commitTransaction(); if (!txFeaturesContext.isEmpty()) { logger.debug("Transaction size = " + txFeaturesContext.size()); txFeaturesContext.commitTransaction(); } else logger.debug("Transaction is empty."); if (!featuresContext.isEmpty()) { updateDataStore(); @@ -382,6 +444,8 @@ { FeatureType featureType = (FeatureType) it.next(); File sfile = new File(_dataPath + "\\" + featureType.getTypeName()); logger.debug("Begin Save shapefile:" + sfile.toURI()); ShapefileDataStore shapefileDataStore = new ShapefileDataStore(sfile.toURL()); shapefileDataStore.createSchema(featureType); FeatureWriter writer = shapefileDataStore.getFeatureWriter(featureType.getTypeName(), Transaction.AUTO_COMMIT); @@ -393,6 +457,7 @@ ((SimpleFeature) writer.next()).setAttributes(feature.getAttributes(null)); } writer.close(); logger.debug("End Save shapefile:" + sfile.toURI()); } featuresContext.clear(); } catch (MalformedURLException e) xdgnjobs/ximple-spatialjob/src/main/resources/com/ximple/eofms/filter/ElementDispatcherRules.xml
@@ -10,6 +10,7 @@ <set-properties-rule/> <bean-property-setter-rule pattern="name"/> <bean-property-setter-rule pattern="description"/> <bean-property-setter-rule pattern="elmtype"/> <bean-property-setter-rule pattern="tid"/> <pattern value="LineCreateStrategy"> <object-create-rule classname="com.ximple.eofms.filter.CreateLineStringStrategy"/> @@ -28,6 +29,7 @@ <set-properties-rule/> <bean-property-setter-rule pattern="name"/> <bean-property-setter-rule pattern="description"/> <bean-property-setter-rule pattern="elmtype"/> <bean-property-setter-rule pattern="tid"/> <bean-property-setter-rule pattern="cid"/> <pattern value="LineCreateStrategy"> @@ -47,6 +49,7 @@ <set-properties-rule/> <bean-property-setter-rule pattern="name"/> <bean-property-setter-rule pattern="description"/> <bean-property-setter-rule pattern="elmtype"/> <bean-property-setter-rule pattern="tid"/> <bean-property-setter-rule pattern="cid"/> <bean-property-setter-rule pattern="lid"/> xdgnjobs/ximple-spatialjob/src/main/resources/conf/DefaultConvertShpFilter.xml
@@ -5,222 +5,259 @@ <tid>106</tid> <cid>0</cid> <description>¥D°ªÀ£½u</description> <elmtype>12</elmtype> <LineCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-402.C-0"> <tid>402</tid> <cid>0</cid> <description>Åܹq©Ò</description> <elmtype>17</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-402.C-1"> <tid>402</tid> <cid>1</cid> <description>Åܹq©Òµù°O</description> <elmtype>7</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-402.C-2"> <tid>402</tid> <cid>2</cid> <description>Åܹq©Ò¤¤¤åµù°O</description> <elmtype>7</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-411.C-0"> <tid>411</tid> <cid>0</cid> <description>°t¹q³õ</description> <elmtype>17</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-411.C-1"> <tid>411</tid> <cid>1</cid> <description>°t¹q³õµù°O</description> <elmtype>7</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-411.C-2"> <tid>411</tid> <cid>2</cid> <description>°t¹q³õ-1/600</description> <elmtype>17</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-411.C-3"> <tid>411</tid> <cid>3</cid> <description>°t¹q³õµù°O-1/600</description> <elmtype>7</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-407.C-0"> <tid>407</tid> <cid>0</cid> <description>¹q±ì</description> <elmtype>17</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-407.C-1"> <tid>407</tid> <cid>1</cid> <description>¹q±ìµù°O</description> <elmtype>7</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-407.C-2"> <tid>407</tid> <cid>2</cid> <description>¹q±ì-1/600</description> <elmtype>17</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-407.C-3"> <tid>407</tid> <cid>3</cid> <description>¹q±ì-1/600</description> <description>¹q±ì-1/600µù°O</description> <elmtype>7</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-114.C-0"> <tid>114</tid> <cid>0</cid> <description>¶}Ãö</description> <elmtype>17</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-114.C-1"> <tid>114</tid> <cid>1</cid> <description>¶}Ãöµù°O</description> <elmtype>7</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-122.C-0"> <tid>122</tid> <cid>0</cid> <description>ª½±µ³s±µ</description> <elmtype>17</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-122.C-1"> <tid>122</tid> <cid>1</cid> <description>ª½±µ³s±µ</description> <description>ª½±µ³s±µµù°O</description> <elmtype>7</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-107.C-0"> <tid>107</tid> <cid>0</cid> <description>°ªÀ£¥Î¤á</description> <elmtype>17</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-107.C-2"> <tid>107</tid> <cid>2</cid> <description>°ªÀ£¥Î¤á¤¤¤åµù°O</description> <elmtype>7</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-117.C-0"> <tid>117</tid> <cid>0</cid> <description>TieÅÜÀ£¾¹</description> <elmtype>17</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-105.C-0"> <tid>105</tid> <cid>0</cid> <description>ª½¸ô±µÀY</description> <elmtype>17</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-105.C-1"> <tid>105</tid> <cid>1</cid> <description>ª½¸ô±µÀY</description> <description>ª½¸ô±µÀYµù°O</description> <elmtype>7</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-101.C-0"> <tid>101</tid> <cid>0</cid> <description>¶×¬y±Æ</description> <elmtype>3</elmtype> <LineCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-120.C-0"> <tid>120</tid> <cid>0</cid> <description>¸`ÂI</description> <elmtype>17</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-150.C-0"> <tid>150</tid> <cid>0</cid> <description>¨â¸ô¶}Ãö</description> <elmtype>17</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-130.C-0"> <tid>130</tid> <cid>0</cid> <description>¾É½u¥æ¤e</description> <elmtype>17</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-131.C-0"> <tid>131</tid> <cid>0</cid> <description>¾É½uÅܧó</description> <elmtype>17</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-109.C-0"> <tid>109</tid> <cid>0</cid> <description>¸õ½u³s±µ</description> <elmtype>17</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-116.C-0"> <tid>116</tid> <cid>0</cid> <description>°ªÀ£²×ºÝ</description> <elmtype>17</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-108.C-0"> <tid>108</tid> <cid>0</cid> <description>Â_¸ô¾¹</description> <elmtype>17</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-108.C-1"> <tid>108</tid> <cid>1</cid> <description>Â_¸ô¾¹µù°O</description> <elmtype>7</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-119.C-0"> <tid>119</tid> <cid>0</cid> <description>¹qÅæ</description> <elmtype>17</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-115.C-0"> <tid>115</tid> <cid>0</cid> <description>ÅÜÀ£¾¹</description> <elmtype>17</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-115.C-1"> <tid>115</tid> <cid>1</cid> <description>ÅÜÀ£¾¹µù°O</description> <elmtype>7</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-102.C-0"> <tid>102</tid> <cid>0</cid> <description>¹q®e¾¹</description> <elmtype>17</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-100.C-0"> <tid>100</tid> <cid>0</cid> <description>Á×¹p¾¹</description> <elmtype>17</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-140.C-0"> <tid>140</tid> <cid>0</cid> <description>°ªÀ£½u¸ô</description> <elmtype>12</elmtype> <LineCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-151.C-0"> <tid>150</tid> <cid>0</cid> <description>±`³¬¶}Ãö</description> <elmtype>17</elmtype> <TextCreateStrategy/> </TypeCompFilter> <!-- Low Voltage Features --> @@ -228,97 +265,113 @@ <tid>200</tid> <cid>0</cid> <description>§CÀ£¸`ÂI</description> <elmtype>17</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-201.C-0"> <tid>201</tid> <cid>0</cid> <description>±µ¤á½u</description> <elmtype>12</elmtype> <LineCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-201.C-1"> <tid>201</tid> <cid>1</cid> <description>±µ¤á½uµù°O</description> <elmtype>7</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-201.C-2"> <tid>201</tid> <cid>2</cid> <description>±µ¤á½uªø«×µù°O</description> <elmtype>7</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-202.C-0"> <tid>202</tid> <cid>0</cid> <description>±µ¤áÂI</description> <elmtype>17</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-202.C-1"> <tid>202</tid> <cid>1</cid> <description>±µ¤áÂIªùµPµù°O</description> <elmtype>7</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-203.C-0"> <tid>203</tid> <cid>0</cid> <description>¸ô¿O³d¥ô¤À¬ÉÂI</description> <elmtype>17</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-203.C-1"> <tid>203</tid> <cid>1</cid> <description>¸ô¿O³d¥ô¤À¬ÉÂIµù°O</description> <elmtype>7</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-204.C-0"> <tid>204</tid> <cid>0</cid> <description>§CÀ£¸õ½u</description> <elmtype>17</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-205.C-0"> <tid>205</tid> <cid>0</cid> <description>§CÀ£¾É½u</description> <elmtype>12</elmtype> <LineCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-205.C-1"> <tid>205</tid> <cid>1</cid> <description>§CÀ£¾É½uµù°O</description> <elmtype>7</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-205.C-2"> <tid>205</tid> <cid>2</cid> <description>§CÀ£¾É½uªø«×µù°O</description> <elmtype>7</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-206.C-0"> <tid>206</tid> <cid>0</cid> <description>§CÀ£»»±±½c</description> <LineCreateStrategy/> <elmtype>17</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-207.C-0"> <tid>207</tid> <cid>0</cid> <description>§CÀ£Äµ³ø¾¹</description> <LineCreateStrategy/> <elmtype>17</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-208.C-0"> <tid>208</tid> <cid>0</cid> <description>§CÀ£²×ºÝ</description> <LineCreateStrategy/> <elmtype>17</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompFilter name="FSC-209.C-0"> <tid>209</tid> <cid>0</cid> <description>§CÀ£¥æ³q¸¹»x</description> <LineCreateStrategy/> <elmtype>17</elmtype> <TextCreateStrategy/> </TypeCompFilter> <!-- Dummy xdgnjobs/ximple-spatialjob/src/test/java/com/ximple/eofms/filter/ElementDispatcherTest.java
@@ -40,6 +40,7 @@ TypeIdDispatchableFilter tFilter = (TypeIdDispatchableFilter) filter; Assert.assertEquals(tFilter.getName(), "DemoFeature1"); Assert.assertEquals(tFilter.getTid(), 106); Assert.assertEquals(tFilter.getElmtype(), 7); Assert.assertNotNull(tFilter.getCreateStrategy()); Assert.assertTrue(tFilter.getCreateStrategy() instanceof CreateLineStringStrategy); @@ -48,7 +49,7 @@ TypeCompIdDispatchableFilter tcFilter = (TypeCompIdDispatchableFilter) filter; Assert.assertEquals(tcFilter.getName(), "DemoFeature2"); Assert.assertEquals(tcFilter.getTid(), 107); Assert.assertEquals(tcFilter.getCid(), 1); Assert.assertEquals(tcFilter.getCid(), 11); Assert.assertNotNull(tcFilter.getCreateStrategy()); Assert.assertTrue(tcFilter.getCreateStrategy() instanceof CreateTextStrategy); xdgnjobs/ximple-spatialjob/src/test/resources/com/ximple/eofms/filter/test-data/testElementFilter.xml
@@ -3,18 +3,21 @@ <TypeFilter name="DemoFeature1"> <tid>106</tid> <description>DemoFilter for DemoFeature</description> <elmtype>7</elmtype> <LineCreateStrategy/> </TypeFilter> <TypeCompFilter name="DemoFeature2"> <tid>107</tid> <cid>1</cid> <cid>11</cid> <description>DemoFilter for DemoFeature</description> <elmtype>7</elmtype> <TextCreateStrategy/> </TypeCompFilter> <TypeCompLevelFilter name="DemoFeature3"> <tid>108</tid> <cid>2</cid> <lid>34</lid> <elmtype>17</elmtype> <description>DemoFilter for DemoFeature</description> <TextCreateStrategy-None/> </TypeCompLevelFilter> xdgnjobs/ximple-spatialjob/src/test/resources/com/ximple/eofms/filter/test-data/testRules.xml
@@ -10,6 +10,7 @@ <set-properties-rule/> <bean-property-setter-rule pattern="name"/> <bean-property-setter-rule pattern="description"/> <bean-property-setter-rule pattern="elmtype"/> <bean-property-setter-rule pattern="tid"/> <pattern value="LineCreateStrategy"> <object-create-rule classname="com.ximple.eofms.filter.CreateLineStringStrategy"/> @@ -28,6 +29,7 @@ <set-properties-rule/> <bean-property-setter-rule pattern="name"/> <bean-property-setter-rule pattern="description"/> <bean-property-setter-rule pattern="elmtype"/> <bean-property-setter-rule pattern="tid"/> <bean-property-setter-rule pattern="cid"/> <pattern value="LineCreateStrategy"> @@ -47,6 +49,7 @@ <set-properties-rule/> <bean-property-setter-rule pattern="name"/> <bean-property-setter-rule pattern="description"/> <bean-property-setter-rule pattern="elmtype"/> <bean-property-setter-rule pattern="tid"/> <bean-property-setter-rule pattern="cid"/> <bean-property-setter-rule pattern="lid"/>