Skip to content

Commit

Permalink
[Ili2pgValidate] minor rewrites
Browse files Browse the repository at this point in the history
  • Loading branch information
webrian committed Mar 14, 2024
1 parent 9d39097 commit 478536f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,14 @@ tasks.register('schemaimport', Ili2pgImportSchema) {
strokeArcs = true
}

tasks.register('importdataset1', Ili2pgImport) {
tasks.register('importdatasets', Ili2pgImport) {
dependsOn 'schemaimport'
database = [db_uri, db_user, db_pass]
models = "SO_AFU_Schutzbauten_20231212"
modeldir = rootProject.projectDir.toString() + ";http://models.interlis.ch"
dbschema = db_schema
dataFile = file("ch.so.agi.testeinzelobjekt_valid.xtf")
dataset = "agi.testeinzelobjekt1"
}

tasks.register('importdataset2', Ili2pgImport) {
dependsOn 'importdataset1'
database = [db_uri, db_user, db_pass]
models = "SO_AFU_Schutzbauten_20231212"
modeldir = rootProject.projectDir.toString() + ";http://models.interlis.ch"
dbschema = db_schema
dataFile = file("ch.so.agi.testeinzelobjekt_valid.xtf")
dataset = "agi.testeinzelobjekt2"
dataFile = ["ch.so.agi.testeinzelobjekt_valid.xtf","ch.so.agi.testeinzelobjekt_valid.xtf"]
dataset = ["agi.testeinzelobjekt1","agi.testeinzelobjekt2"]
}

/**
Expand All @@ -54,7 +44,7 @@ tasks.register('importdataset2', Ili2pgImport) {
* Die Daten sind nur innerhalb ihres eigenen Datasets valide.
*/
tasks.register('validate', Ili2pgValidate) {
dependsOn 'importdataset2'
dependsOn 'importdatasets'
database = [db_uri, db_user, db_pass]
models = "SO_AFU_Schutzbauten_20231212"
modeldir = rootProject.projectDir.toString() + ";http://models.interlis.ch"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,14 @@ tasks.register('schemaimport', Ili2pgImportSchema) {
strokeArcs = true
}

tasks.register('importdataset1', Ili2pgImport) {
tasks.register('importdatasets', Ili2pgImport) {
dependsOn 'schemaimport'
database = [db_uri, db_user, db_pass]
models = "SO_AFU_Schutzbauten_20231212"
modeldir = rootProject.projectDir.toString() + ";http://models.interlis.ch"
dbschema = db_schema
dataFile = file("ch.so.agi.testeinzelobjekt_valid.xtf")
dataset = "agi.testeinzelobjekt1"
}

tasks.register('importdataset2', Ili2pgImport) {
dependsOn 'importdataset1'
database = [db_uri, db_user, db_pass]
models = "SO_AFU_Schutzbauten_20231212"
modeldir = rootProject.projectDir.toString() + ";http://models.interlis.ch"
dbschema = db_schema
dataFile = file("ch.so.agi.testeinzelobjekt_valid.xtf")
dataset = "agi.testeinzelobjekt2"
dataFile = ["ch.so.agi.testeinzelobjekt_valid.xtf","ch.so.agi.testeinzelobjekt_valid.xtf"]
dataset = ["agi.testeinzelobjekt1","agi.testeinzelobjekt2"]
}

/**
Expand All @@ -53,7 +43,7 @@ tasks.register('importdataset2', Ili2pgImport) {
* einzeln geprüft werden.
*/
tasks.register('validate', Ili2pgValidate) {
dependsOn 'importdataset2'
dependsOn 'importdatasets'
database = [db_uri, db_user, db_pass]
modeldir = rootProject.projectDir.toString() + ";http://models.interlis.ch"
dbschema = db_schema
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,14 @@ tasks.register('schemaimport', Ili2pgImportSchema) {
strokeArcs = true
}

tasks.register('importdataset1', Ili2pgImport) {
tasks.register('importdatasets', Ili2pgImport) {
dependsOn 'schemaimport'
database = [db_uri, db_user, db_pass]
models = "SO_AFU_Schutzbauten_20231212"
modeldir = rootProject.projectDir.toString() + ";http://models.interlis.ch"
dbschema = db_schema
dataFile = file("ch.so.agi.testeinzelobjekt_valid.xtf")
dataset = "agi.testeinzelobjekt1"
}

tasks.register('importdataset2', Ili2pgImport) {
dependsOn 'importdataset1'
database = [db_uri, db_user, db_pass]
models = "SO_AFU_Schutzbauten_20231212"
modeldir = rootProject.projectDir.toString() + ";http://models.interlis.ch"
dbschema = db_schema
dataFile = file("ch.so.agi.testeinzelobjekt_valid.xtf")
dataset = "agi.testeinzelobjekt2"
dataFile = ["ch.so.agi.testeinzelobjekt_valid.xtf","ch.so.agi.testeinzelobjekt_valid.xtf"]
dataset = ["agi.testeinzelobjekt1","agi.testeinzelobjekt2"]
}

/**
Expand All @@ -53,7 +43,7 @@ tasks.register('importdataset2', Ili2pgImport) {
* einzeln geprüft werden.
*/
tasks.register('validate', Ili2pgValidate) {
dependsOn 'importdataset2'
dependsOn 'importdatasets'
database = [db_uri, db_user, db_pass]
modeldir = rootProject.projectDir.toString() + ";http://models.interlis.ch"
dbschema = db_schema
Expand Down
4 changes: 2 additions & 2 deletions gretl/src/main/java/ch/so/agi/gretl/tasks/Ili2pgValidate.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public void validateData() {
settings.setDatasetName(ds);
run(function, settings);
}
} else {
run(function, settings);
return;
}
run(function, settings);
}
}

0 comments on commit 478536f

Please sign in to comment.