forked from geodmms/xdgnjobs

?? ?
2008-03-13 4232697d04382033c02cc51295da5d1be9e6978f
EOFM-14
1 files deleted
2 files modified
1 files added
251 ■■■■ changed files
.gitattributes 2 ●●● patch | view | raw | blame | history
ximple-spatialjob/pom.xml 185 ●●●●● patch | view | raw | blame | history
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/App.java 13 ●●●●● patch | view | raw | blame | history
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/ConvertDgn2ShpJob.java 51 ●●●●● patch | view | raw | blame | history
.gitattributes
@@ -30,5 +30,5 @@
ximple-jobcarrier/src/main/java/com/ximple/eofms/App.java svneol=native#text/plain
ximple-jobcarrier/src/test/java/com/ximple/eofms/AppTest.java svneol=native#text/plain
ximple-spatialjob/pom.xml svneol=native#text/xml
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/App.java svneol=native#text/plain
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/ConvertDgn2ShpJob.java svneol=native#text/plain
ximple-spatialjob/src/test/java/com/ximple/eofms/jobs/AppTest.java svneol=native#text/plain
ximple-spatialjob/pom.xml
@@ -9,6 +9,8 @@
    <test.maxHeapSize>512M</test.maxHeapSize>
    <src.output>${basedir}/target</src.output>
    <java5>1.5</java5>
    <xdgnio.version>0.0.1</xdgnio.version>
    <gt.version>2.4.1</gt.version>
  </properties>
  
  <profiles>
@@ -97,6 +99,18 @@
  <!-- =========================================================== -->
  <dependencyManagement>
    <dependencies>
      <!-- GeoAPI and its dependencies -->
      <dependency>
        <groupId>org.opengis</groupId>
        <artifactId>geoapi-nogenerics</artifactId>
        <version>2.1.0</version>
      </dependency>
      <dependency>
        <groupId>javax.units</groupId>
        <artifactId>jsr108</artifactId>
        <version>0.01</version>
      </dependency>
      <dependency>
        <groupId>com.vividsolutions</groupId>
        <artifactId>jts</artifactId>
@@ -104,11 +118,13 @@
      </dependency>
      
      <!-- Apache -->
      <!--
      <dependency>
        <groupId>commons-beanutils</groupId>
        <artifactId>commons-beanutils</artifactId>
        <version>1.7</version>
      </dependency>
      -->
      <dependency>
        <groupId>commons-collections</groupId>
        <artifactId>commons-collections</artifactId>
@@ -141,6 +157,61 @@
        <version>3.0.1-FINAL</version>
      </dependency>
      
      <!-- geotools -->
      <dependency>
        <groupId>org.geotools</groupId>
        <artifactId>gt2</artifactId>
        <version>${gt.version}</version>
      </dependency>
      <dependency>
        <groupId>org.geotools</groupId>
        <artifactId>gt2-api</artifactId>
        <version>${gt.version}</version>
      </dependency>
      <dependency>
        <groupId>org.geotools</groupId>
        <artifactId>gt2-main</artifactId>
        <version>${gt.version}</version>
      </dependency>
      <dependency>
        <groupId>org.geotools</groupId>
        <artifactId>gt2-sample-data</artifactId>
        <version>${gt.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.geotools</groupId>
        <artifactId>gt2-data</artifactId>
        <version>${gt.version}</version>
      </dependency>
      <!-- because main and sample-data depend on referencing we need a tie breaker -->
      <dependency>
        <groupId>org.geotools</groupId>
        <artifactId>gt2-referencing</artifactId>
        <version>${gt.version}</version>
      </dependency>
      <dependency>
        <groupId>jdom</groupId>
        <artifactId>jdom</artifactId>
        <version>1.0</version>
      </dependency>
      <dependency>
        <groupId>velocity</groupId>
        <artifactId>velocity</artifactId>
        <version>1.4</version>
      </dependency>
      <!-- We need this to make the referencing module useful -->
      <dependency>
        <groupId>org.geotools</groupId>
        <artifactId>gt2-epsg-hsql</artifactId>
        <version>${gt.version}</version>
        <scope>test</scope>
      </dependency>
      <!-- ORACLE -->
      <!-- Download and install into your own repo -->
      <dependency>
@@ -160,22 +231,113 @@
      <dependency>
        <artifactId>ximple-dgnio</artifactId>
        <groupId>com.ximple</groupId>
        <version>{$project.version}</version>
        <version>${xdgnio.version}</version>
      </dependency>
      
      <!-- Tests or legacy -->
      <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <!--
          <classifier>jdk15</classifier>
          <version>5.7</version>
        -->
        <version>5.5</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <!-- =========================================================== -->
  <!--     Dependencies to be inherited by all modules.            -->
  <!-- =========================================================== -->
  <dependencies>
    <dependency>
      <artifactId>geoapi-nogenerics</artifactId>
      <groupId>org.opengis</groupId>
    </dependency>
    <dependency>
      <artifactId>jsr108</artifactId>
      <groupId>javax.units</groupId>
    </dependency>
    <dependency>
      <groupId>com.vividsolutions</groupId>
      <artifactId>jts</artifactId>
    </dependency>
    <!-- Apache -->
    <dependency>
      <artifactId>commons-collections</artifactId>
      <groupId>commons-collections</groupId>
    </dependency>
    <dependency>
      <artifactId>log4j</artifactId>
      <groupId>log4j</groupId>
    </dependency>
    <dependency>
      <artifactId>gt2-api</artifactId>
      <groupId>org.geotools</groupId>
    </dependency>
    <dependency>
      <artifactId>gt2-main</artifactId>
      <groupId>org.geotools</groupId>
    </dependency>
    <dependency>
      <artifactId>gt2-sample-data</artifactId>
      <groupId>org.geotools</groupId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <artifactId>gt2-data</artifactId>
      <groupId>org.geotools</groupId>
    </dependency>
    <!-- because main and sample-data depend on referencing we need a tie breaker -->
    <dependency>
      <artifactId>gt2-referencing</artifactId>
      <groupId>org.geotools</groupId>
    </dependency>
    <dependency>
      <artifactId>jdom</artifactId>
      <groupId>jdom</groupId>
    </dependency>
    <dependency>
      <artifactId>velocity</artifactId>
      <groupId>velocity</groupId>
    </dependency>
    <!-- We need this to make the referencing module useful -->
    <dependency>
      <artifactId>gt2-epsg-hsql</artifactId>
      <groupId>org.geotools</groupId>
      <scope>test</scope>
    </dependency>
    <!-- ORACLE -->
    <dependency>
      <artifactId>ojdbc5</artifactId>
      <groupId>com.oracle</groupId>
    </dependency>
    <dependency>
      <artifactId>quartz</artifactId>
      <groupId>opensymphony</groupId>
    </dependency>
    <!-- Ximple Library -->
    <dependency>
      <artifactId>ximple-dgnio</artifactId>
      <groupId>com.ximple</groupId>
    </dependency>
    <dependency>
      <artifactId>testng</artifactId>
      <groupId>org.testng</groupId>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <!-- =========================================================== -->
  <!--     Build Configuration                                     -->
@@ -263,21 +425,12 @@
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.2</version>
          <!-- Current version is 2.3, but it cause the following exception:
                    Running org.geotools.gce.imagepyramid.ImagePyramidReaderTest
                    Error: Could not find mediaLib accelerator wrapper classes. Continuing in pure Java mode.
                    Occurs in: com.sun.media.jai.mlib.MediaLibAccessor
                    java.lang.NoClassDefFoundError: com/sun/medialib/mlib/Image
                        at com.sun.media.jai.mlib.MediaLibAccessor.setUseMlib(MediaLibAccessor.java:245)
                        at com.sun.media.jai.mlib.MlibAffineRIF.create(MlibAffineRIF.java:71)
                    -->
          <version>2.4.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-report-plugin</artifactId>
          <version>2.3</version>
          <version>2.4.2</version>
        </plugin>
        <!-- http://www.ibiblio.org/maven2/org/codehaus/mojo/ -->
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/App.java
File was deleted
ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/ConvertDgn2ShpJob.java
New file
@@ -0,0 +1,51 @@
package com.ximple.eofms.jobs;
import java.io.File;
import java.util.Date;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.quartz.Job;
import org.quartz.JobDataMap;
import org.quartz.JobDetail;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
/**
 *
 */
public class ConvertDgn2ShpJob implements Job
{
    static Log logger = LogFactory.getLog(ConvertDgn2ShpJob.class);
    public void execute(JobExecutionContext context) throws JobExecutionException
    {
        // Every job has its own job detail
        JobDetail jobDetail = context.getJobDetail();
        // The name is defined in the job definition
        String jobName = jobDetail.getName();
        // Log the time the job started
        logger.info(jobName + " fired at " + new Date());
        // The directory to scan is stored in the job map
        JobDataMap dataMap = jobDetail.getJobDataMap();
        String dirName = dataMap.getString("SHPDATA_DIR");
        // Validate the required input
        if (dirName == null)
        {
            throw new JobExecutionException("Directory not configured");
        }
        // Make sure the directory exists
        File dir = new File(dirName);
        if (!dir.exists())
        {
            throw new JobExecutionException("Invalid Dir " + dirName);
        }
    }
}