| | |
| | | static Log logger = LogFactory.getLog(OracleConvertJobContext.class); |
| | | static final LoggerFacade sLogger = new CommonsLoggingLogger(logger); |
| | | |
| | | private static final String SHPOUTPATH = "shpout"; |
| | | |
| | | static |
| | | { |
| | | try |
| | |
| | | private PessimisticMapWrapper txFeaturesContext; |
| | | |
| | | private JobExecutionContext executionContext; |
| | | |
| | | private String dataOut = null; |
| | | |
| | | public OracleConvertJobContext(String filterConfig) |
| | | { |
| | |
| | | |
| | | public void putFeatureCollection(Element element) |
| | | { |
| | | //§PÂ_¬O§_²Å©M±ø¥ó |
| | | // §PÂ_¬O§_²Å©M±ø¥ó |
| | | Feature feature = elementDispatcher.execute(element); |
| | | if (feature == null) |
| | | { |
| | |
| | | |
| | | private void updateDataStore() |
| | | { |
| | | // todo: |
| | | Iterator it = featuresContext.keySet().iterator(); |
| | | Iterator it = featuresContext.keySet().iterator(); |
| | | |
| | | try |
| | | { |
| | | while (it.hasNext()) |
| | | { |
| | | FeatureType featureType = (FeatureType) it.next(); |
| | | File sfile = new File(_dataPath + "\\" + featureType.getTypeName()); |
| | | File sfile = new File(getDataOutPath() + "\\" + featureType.getTypeName()); |
| | | logger.debug("Begin Save shapefile:" + sfile.toURI()); |
| | | |
| | | FeatureWriter writer = null; |
| | |
| | | executionContext = context; |
| | | } |
| | | |
| | | /** |
| | | * Ãö³¬³]³Æ¼g¤J¾¹ |
| | | * @throws IOException IOµo¥Í¿ù»~ |
| | | */ |
| | | public void closeFeatureWrite() throws IOException { |
| | | Iterator iter = this.featuresWriterContext.values().iterator(); |
| | | |
| | |
| | | |
| | | this.featuresWriterContext = null; |
| | | } |
| | | |
| | | /** |
| | | * ¨ú±o¸ê®Æ¿é¥X¸ô®| |
| | | * @return ¸ô®|ªº¦r¦ê |
| | | */ |
| | | public String getDataOutPath() |
| | | { |
| | | if (dataOut == null) |
| | | { |
| | | File outPath = new File(getDataPath(), SHPOUTPATH); |
| | | if (!outPath.exists()) |
| | | { |
| | | outPath.mkdir(); |
| | | } else if (!outPath.isDirectory()) |
| | | { |
| | | outPath.mkdir(); |
| | | } |
| | | dataOut = getDataPath() + SHPOUTPATH; |
| | | } |
| | | return dataOut; |
| | | } |
| | | } |