| | |
| | | import com.ximple.eofms.filter.ElementDispatcher; |
| | | import com.ximple.io.dgn7.Element; |
| | | import com.ximple.io.dgn7.FrammeAttributeData; |
| | | import com.ximple.io.dgn7.ComplexElement; |
| | | |
| | | |
| | | public class OracleConvertJobContext extends AbstractOracleJobContext |
| | |
| | | private String _convertFile = null; |
| | | private String currentSchema = null; |
| | | private boolean schemaChanged = false; |
| | | private String _convertElementIn = null; |
| | | |
| | | public OracleConvertJobContext(String filterConfig) |
| | | { |
| | |
| | | Feature feature = elementDispatcher.execute(element); |
| | | if (feature == null) |
| | | { |
| | | boolean isEmptySize = false; |
| | | FrammeAttributeData linkage = |
| | | AbstractFLinkageDispatchableFilter.getFeatureLinkage(element); |
| | | logger.warn("Unknown Element:" + element.getElementType().toString() + |
| | | ":type=" + element.getType() + ":lv=" + element.getLevelIndex() + ":id=" + |
| | | (linkage == null ? "NULL" : (linkage.getFsc() + "|" + linkage.getComponentID()))); |
| | | |
| | | if (getElementLogging()) |
| | | if (element instanceof ComplexElement) |
| | | { |
| | | ComplexElement complex = (ComplexElement) element; |
| | | logger.warn("----Complex Element size=" + complex.size() + ":" + |
| | | (linkage == null ? "NULL" : (linkage.getUfid()))); |
| | | isEmptySize = true; |
| | | } |
| | | |
| | | if (getElementLogging() && (!isEmptySize)) |
| | | { |
| | | getElementLogger().logElement(element, getCurrentSchema()); |
| | | } |
| | | return; |
| | | } |
| | | |
| | |
| | | ShapefileDataStore shapefileDataStore = new ShapefileDataStore(sfile.toURI().toURL(), |
| | | true, Charset.forName("UTF-8")); |
| | | */ |
| | | ShapefileDataStore shapefileDataStore = new IndexedShapefileDataStore(sfile.toURI().toURL(), |
| | | null, true, true, IndexedShapefileDataStore.TREE_QIX, Charset.forName("UTF-8")); |
| | | shapefileDataStore.createSchema(featureType); |
| | | writer = shapefileDataStore.getFeatureWriter(featureType.getTypeName(), Transaction.AUTO_COMMIT); |
| | | if (!sfile.exists()) |
| | | { |
| | | ShapefileDataStore shapefileDataStore = new IndexedShapefileDataStore(sfile.toURI().toURL(), |
| | | null, true, true, IndexedShapefileDataStore.TREE_QIX, Charset.forName("UTF-8")); |
| | | shapefileDataStore.createSchema(featureType); |
| | | writer = shapefileDataStore.getFeatureWriter(featureType.getTypeName(), |
| | | Transaction.AUTO_COMMIT); |
| | | } else { |
| | | ShapefileDataStore shapefileDataStore = new IndexedShapefileDataStore(sfile.toURI().toURL(), |
| | | null, true, true, IndexedShapefileDataStore.TREE_QIX, Charset.forName("UTF-8")); |
| | | writer = shapefileDataStore.getFeatureWriterAppend(featureType.getTypeName(), |
| | | Transaction.AUTO_COMMIT); |
| | | } |
| | | featuresWriterContext.put(featureType.getTypeName(), writer); |
| | | } |
| | | |
| | |
| | | this.currentSchema = querySchema; |
| | | this.schemaChanged = true; |
| | | } |
| | | |
| | | public void setConvertElementIn(String convertElementIn) |
| | | { |
| | | _convertElementIn = convertElementIn; |
| | | } |
| | | } |