| | |
| | | import com.ximple.eofms.util.ByteArrayCompressor; |
| | | import com.ximple.eofms.util.StringUtils; |
| | | import com.ximple.eofms.jobs.context.AbstractOracleJobContext; |
| | | import com.ximple.eofms.jobs.context.FeatureDgnConvertJobContext; |
| | | import com.ximple.eofms.jobs.context.GeneralDgnConvertJobContext; |
| | | import com.ximple.eofms.jobs.context.IndexDgnConvertJobContext; |
| | | import com.ximple.eofms.jobs.context.FeatureDgnConvertShpJobContext; |
| | | import com.ximple.eofms.jobs.context.GeneralDgnConvertShpJobContext; |
| | | import com.ximple.eofms.jobs.context.IndexDgnConvertShpJobContext; |
| | | import com.ximple.eofms.jobs.context.OracleConvertShapefilesJobContext; |
| | | |
| | | public class OracleConvertDgn2OraSDOJob extends AbstractOracleDatabaseJob |
| | |
| | | |
| | | for (File dgnFile : dgnFiles) |
| | | { |
| | | IndexDgnConvertJobContext convertContext = new IndexDgnConvertJobContext(getDataPath()); |
| | | IndexDgnConvertShpJobContext convertContext = new IndexDgnConvertShpJobContext(getDataPath()); |
| | | logger.debug("--- start dgnfile-" + dgnFile.toString() + " ---"); |
| | | try |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | protected void scanIndexDgnElement(IndexDgnConvertJobContext convertContext) |
| | | protected void scanIndexDgnElement(IndexDgnConvertShpJobContext convertContext) |
| | | throws Dgn7fileException, IOException, IllegalAttributeException, SchemaException |
| | | { |
| | | Dgn7fileReader reader = convertContext.getReader(); |
| | |
| | | logger.debug("ElementRecord Count=" + count); |
| | | } |
| | | |
| | | private void processIndexElement(Element element, IndexDgnConvertJobContext convertContext) throws IllegalAttributeException, SchemaException |
| | | private void processIndexElement(Element element, IndexDgnConvertShpJobContext convertContext) throws IllegalAttributeException, SchemaException |
| | | { |
| | | if (element instanceof TextElement) |
| | | { |
| | |
| | | |
| | | for (File dgnFile : dgnFiles) |
| | | { |
| | | GeneralDgnConvertJobContext convertContext = new GeneralDgnConvertJobContext(getDataPath()); |
| | | GeneralDgnConvertShpJobContext convertContext = new GeneralDgnConvertShpJobContext(getDataPath()); |
| | | logger.info("--- start dgnfile-" + dgnFile.toString() + " ---"); |
| | | try |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | public void scanOtherDgnElement(GeneralDgnConvertJobContext convertContext) |
| | | public void scanOtherDgnElement(GeneralDgnConvertShpJobContext convertContext) |
| | | throws Dgn7fileException, IOException, IllegalAttributeException, SchemaException |
| | | { |
| | | Dgn7fileReader reader = convertContext.getReader(); |
| | |
| | | logger.debug("ElementRecord Count=" + count); |
| | | } |
| | | |
| | | private void processOtherElement(Element element, GeneralDgnConvertJobContext convertContext) |
| | | private void processOtherElement(Element element, GeneralDgnConvertShpJobContext convertContext) |
| | | throws IllegalAttributeException, SchemaException |
| | | { |
| | | convertContext.putFeatureCollection(element); |
| | |
| | | { |
| | | deleteFilesInPath(outDataPath); |
| | | } |
| | | outDataPath = new File(getDataPath(), IndexDgnConvertJobContext.SHPOUTPATH); |
| | | outDataPath = new File(getDataPath(), IndexDgnConvertShpJobContext.SHPOUTPATH); |
| | | if (outDataPath.exists() && outDataPath.isDirectory()) |
| | | { |
| | | deleteFilesInPath(outDataPath); |
| | | } |
| | | outDataPath = new File(getDataPath(), GeneralDgnConvertJobContext.SHPOUTPATH); |
| | | outDataPath = new File(getDataPath(), GeneralDgnConvertShpJobContext.SHPOUTPATH); |
| | | if (outDataPath.exists() && outDataPath.isDirectory()) |
| | | { |
| | | deleteFilesInPath(outDataPath); |
| | |
| | | |
| | | for (File dgnFile : dgnFiles) |
| | | { |
| | | FeatureDgnConvertJobContext convertContext = new FeatureDgnConvertJobContext(getDataPath(), _filterPath); |
| | | FeatureDgnConvertShpJobContext convertContext = new FeatureDgnConvertShpJobContext(getDataPath(), _filterPath); |
| | | logger.info("--- start dgnfile-" + dgnFile.toString() + " ---"); |
| | | try |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | public void scanFeatureDgnElement(FeatureDgnConvertJobContext convertContext) |
| | | public void scanFeatureDgnElement(FeatureDgnConvertShpJobContext convertContext) |
| | | throws Dgn7fileException, IOException, IllegalAttributeException, SchemaException |
| | | { |
| | | Dgn7fileReader reader = convertContext.getReader(); |
| | |
| | | logger.debug("ElementRecord Count=" + count); |
| | | } |
| | | |
| | | private void processFeatureElement(Element element, FeatureDgnConvertJobContext convertContext) |
| | | private void processFeatureElement(Element element, FeatureDgnConvertShpJobContext convertContext) |
| | | throws IllegalAttributeException, SchemaException |
| | | { |
| | | convertContext.putFeatureCollection(element); |
| | |
| | | private void createDummyFeatureFile(JobExecutionContext context) throws JobExecutionException |
| | | { |
| | | /* |
| | | DummyFeatureConvertJobContext convertContext = new DummyFeatureConvertJobContext(getDataPath(), _filterPath); |
| | | DummyFeatureConvertShpJobContext convertContext = new DummyFeatureConvertShpJobContext(getDataPath(), _filterPath); |
| | | try { |
| | | convertContext.startTransaction(); |
| | | convertContext.commitTransaction(); |