forked from geodmms/xdgnjobs

?? ?
2008-06-04 5066d63bfe9907360ce14875a7b7639984e464cd
xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/OracleConvertDgn2PostGISJob.java
@@ -47,9 +47,9 @@
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 OracleConvertDgn2PostGISJob extends AbstractOracleDatabaseJob
@@ -609,7 +609,7 @@
        for (File dgnFile : dgnFiles)
        {
            IndexDgnConvertJobContext convertContext = new IndexDgnConvertJobContext(getDataPath());
            IndexDgnConvertShpJobContext convertContext = new IndexDgnConvertShpJobContext(getDataPath());
            logger.debug("--- start dgnfile-" + dgnFile.toString() + " ---");
            try
            {
@@ -656,7 +656,7 @@
        }
    }
    protected void scanIndexDgnElement(IndexDgnConvertJobContext convertContext)
    protected void scanIndexDgnElement(IndexDgnConvertShpJobContext convertContext)
            throws Dgn7fileException, IOException, IllegalAttributeException, SchemaException
    {
        Dgn7fileReader reader = convertContext.getReader();
@@ -699,7 +699,7 @@
        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)
        {
@@ -738,7 +738,7 @@
        for (File dgnFile : dgnFiles)
        {
            GeneralDgnConvertJobContext convertContext = new GeneralDgnConvertJobContext(getDataPath());
            GeneralDgnConvertShpJobContext convertContext = new GeneralDgnConvertShpJobContext(getDataPath());
            logger.info("--- start dgnfile-" + dgnFile.toString() + " ---");
            try
            {
@@ -785,7 +785,7 @@
        }
    }
    public void scanOtherDgnElement(GeneralDgnConvertJobContext convertContext)
    public void scanOtherDgnElement(GeneralDgnConvertShpJobContext convertContext)
            throws Dgn7fileException, IOException, IllegalAttributeException, SchemaException
    {
        Dgn7fileReader reader = convertContext.getReader();
@@ -828,7 +828,7 @@
        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);
@@ -841,12 +841,12 @@
        {
            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);
@@ -911,7 +911,7 @@
        for (File dgnFile : dgnFiles)
        {
            FeatureDgnConvertJobContext convertContext = new FeatureDgnConvertJobContext(getDataPath(), _filterPath);
            FeatureDgnConvertShpJobContext convertContext = new FeatureDgnConvertShpJobContext(getDataPath(), _filterPath);
            logger.info("--- start dgnfile-" + dgnFile.toString() + " ---");
            try
            {
@@ -958,7 +958,7 @@
        }
    }
    public void scanFeatureDgnElement(FeatureDgnConvertJobContext convertContext)
    public void scanFeatureDgnElement(FeatureDgnConvertShpJobContext convertContext)
            throws Dgn7fileException, IOException, IllegalAttributeException, SchemaException
    {
        Dgn7fileReader reader = convertContext.getReader();
@@ -1001,7 +1001,7 @@
        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);
@@ -1010,7 +1010,7 @@
    private void createDummyFeatureFile(JobExecutionContext context) throws JobExecutionException
    {
        /*
        DummyFeatureConvertJobContext convertContext = new DummyFeatureConvertJobContext(getDataPath(), _filterPath);
        DummyFeatureConvertShpJobContext convertContext = new DummyFeatureConvertShpJobContext(getDataPath(), _filterPath);
        try {
            convertContext.startTransaction();
            convertContext.commitTransaction();