Search in sources :

Example 1 with MasterListJob

use of net.geoprism.registry.etl.MasterListJob in project geoprism-registry by terraframe.

the class MasterList method delete.

@Override
@Transaction
public void delete() {
    // Delete all jobs
    List<MasterListJob> jobs = this.getJobs();
    for (MasterListJob job : jobs) {
        job.delete();
    }
    List<MasterListVersion> versions = this.getVersions(null);
    for (MasterListVersion version : versions) {
        version.delete();
    }
    super.delete();
    final File directory = this.getShapefileDirectory();
    if (directory.exists()) {
        try {
            FileUtils.deleteDirectory(directory);
        } catch (IOException e) {
            throw new ProgrammingErrorException(e);
        }
    }
}
Also used : IOException(java.io.IOException) File(java.io.File) ProgrammingErrorException(com.runwaysdk.dataaccess.ProgrammingErrorException) MasterListJob(net.geoprism.registry.etl.MasterListJob) Transaction(com.runwaysdk.dataaccess.transaction.Transaction)

Aggregations

ProgrammingErrorException (com.runwaysdk.dataaccess.ProgrammingErrorException)1 Transaction (com.runwaysdk.dataaccess.transaction.Transaction)1 File (java.io.File)1 IOException (java.io.IOException)1 MasterListJob (net.geoprism.registry.etl.MasterListJob)1