-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for parameter metaConfig (#162)
* [Ili2pgImportSchema] Add support for metaConfig * [Ili2pgImportSchema] Remove remote dependencies in integration tests * start-gretl.sh: use tagged version --------- Co-authored-by: Stefan Ziegler <[email protected]>
- Loading branch information
1 parent
d36ba0b
commit 0bae5a9
Showing
11 changed files
with
250 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
gretl/src/integrationTest/jobs/Ili2pgImportSchema_MetaConfigFile/SimpleTable.ili
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
INTERLIS 2.3; | ||
|
||
MODEL SimpleTable (de) | ||
AT "mailto:[email protected]" | ||
VERSION "2024-05-02" = | ||
|
||
DOMAIN | ||
|
||
LKoord = COORD 2460000.000 .. 2870000.000 [INTERLIS.M], 1045000.000 .. 1310000.000 [INTERLIS.M] ,ROTATION 2 -> 1; | ||
|
||
TOPIC SimpleTopic = | ||
|
||
CLASS Table = | ||
Anzahl : MANDATORY 1 .. 1000; | ||
Bezeichnung : MANDATORY MTEXT*64; | ||
Geometrie : MANDATORY SimpleTable.LKoord; | ||
END Table; | ||
|
||
END SimpleTopic; | ||
|
||
END SimpleTable. |
18 changes: 18 additions & 0 deletions
18
gretl/src/integrationTest/jobs/Ili2pgImportSchema_MetaConfigFile/build.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import ch.so.agi.gretl.tasks.* | ||
|
||
apply plugin: 'ch.so.agi.gretl' | ||
|
||
def GRETLTEST_DBURI = 'gretltest_dburi_pg' | ||
def db_uri = findProperty(GRETLTEST_DBURI) != null ? findProperty(GRETLTEST_DBURI) : 'jdbc:postgresql://localhost:5432/gretl' | ||
|
||
def db_user = "ddluser" | ||
def db_pass = "ddluser" | ||
|
||
defaultTasks 'ili2pgschemaimport' | ||
|
||
task ili2pgschemaimport(type: Ili2pgImportSchema){ | ||
database = [db_uri, db_user, db_pass] | ||
dbschema = "simple_table_metaconfigfile" | ||
modeldir = "%ILI_FROM_DB;" + rootProject.projectDir.toString() + ";https://geo.so.ch/models;http://models.interlis.ch" | ||
metaConfig = "simple_table_ini_20240502.ini" | ||
} |
Empty file.
24 changes: 24 additions & 0 deletions
24
.../src/integrationTest/jobs/Ili2pgImportSchema_MetaConfigFile/simple_table_ini_20240502.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
[ch.ehi.ili2db] | ||
models = SimpleTable | ||
beautifyEnumDispName = True | ||
coalesceArray = True | ||
coalesceCatalogueRef = True | ||
coalesceMultiLine = True | ||
coalesceMultiPoint = True | ||
coalesceMultiSurface = True | ||
createBasketCol = False | ||
createEnumTabs = True | ||
createEnumTabsWithId = False | ||
createNumChecks = False | ||
createUnique = False | ||
createFk = True | ||
createFkIdx = True | ||
createMetaInfo = True | ||
createTidCol = True | ||
createTypeConstraint = False | ||
defaultSrsAuth = EPSG | ||
defaultSrsCode = 2056 | ||
expandMultilingual = True | ||
smart2Inheritance = True | ||
sqlEnableNull = True | ||
strokeArcs = True |
21 changes: 21 additions & 0 deletions
21
gretl/src/integrationTest/jobs/Ili2pgImportSchema_MetaConfigIliData/SimpleTable.ili
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
INTERLIS 2.3; | ||
|
||
MODEL SimpleTable (de) | ||
AT "mailto:[email protected]" | ||
VERSION "2024-05-02" = | ||
|
||
DOMAIN | ||
|
||
LKoord = COORD 2460000.000 .. 2870000.000 [INTERLIS.M], 1045000.000 .. 1310000.000 [INTERLIS.M] ,ROTATION 2 -> 1; | ||
|
||
TOPIC SimpleTopic = | ||
|
||
CLASS Table = | ||
Anzahl : MANDATORY 1 .. 1000; | ||
Bezeichnung : MANDATORY MTEXT*64; | ||
Geometrie : MANDATORY SimpleTable.LKoord; | ||
END Table; | ||
|
||
END SimpleTopic; | ||
|
||
END SimpleTable. |
18 changes: 18 additions & 0 deletions
18
gretl/src/integrationTest/jobs/Ili2pgImportSchema_MetaConfigIliData/build.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import ch.so.agi.gretl.tasks.* | ||
|
||
apply plugin: 'ch.so.agi.gretl' | ||
|
||
def GRETLTEST_DBURI = 'gretltest_dburi_pg' | ||
def db_uri = findProperty(GRETLTEST_DBURI) != null ? findProperty(GRETLTEST_DBURI) : 'jdbc:postgresql://localhost:5432/gretl' | ||
|
||
def db_user = "ddluser" | ||
def db_pass = "ddluser" | ||
|
||
defaultTasks 'ili2pgschemaimport' | ||
|
||
task ili2pgschemaimport(type: Ili2pgImportSchema){ | ||
database = [db_uri, db_user, db_pass] | ||
dbschema = "simple_table_ilidata" | ||
modeldir = "%ILI_FROM_DB;" + rootProject.projectDir.toString() + ";https://geo.so.ch/models;http://models.interlis.ch" | ||
metaConfig = "ilidata:metaconfig_simple_table_ini_20240502" | ||
} |
24 changes: 24 additions & 0 deletions
24
...grationTest/jobs/Ili2pgImportSchema_MetaConfigIliData/files/simple_table_ini_20240502.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
[ch.ehi.ili2db] | ||
models = SimpleTable | ||
beautifyEnumDispName = True | ||
coalesceArray = True | ||
coalesceCatalogueRef = True | ||
coalesceMultiLine = True | ||
coalesceMultiPoint = True | ||
coalesceMultiSurface = True | ||
createBasketCol = False | ||
createEnumTabs = True | ||
createEnumTabsWithId = False | ||
createNumChecks = False | ||
createUnique = False | ||
createFk = True | ||
createFkIdx = True | ||
createMetaInfo = True | ||
createTidCol = True | ||
createTypeConstraint = False | ||
defaultSrsAuth = EPSG | ||
defaultSrsCode = 2056 | ||
expandMultilingual = True | ||
smart2Inheritance = True | ||
sqlEnableNull = True | ||
strokeArcs = True |
53 changes: 53 additions & 0 deletions
53
gretl/src/integrationTest/jobs/Ili2pgImportSchema_MetaConfigIliData/ilidata.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?xml version="1.0" encoding="UTF-8"?><TRANSFER xmlns="http://www.interlis.ch/INTERLIS2.3"> | ||
<HEADERSECTION SENDER="SOGIS-INTERLIS-REPOSITORY-CREATOR" VERSION="2.3"> | ||
<MODELS> | ||
<MODEL NAME="DatasetIdx16" VERSION="2022-10-10" URI="mailto:[email protected]"></MODEL> | ||
</MODELS> | ||
</HEADERSECTION> | ||
<DATASECTION> | ||
<DatasetIdx16.DataIndex BID="b1"> | ||
<DatasetIdx16.DataIndex.DatasetMetadata TID="037f8229-ac14-42de-a299-81038f229790"> | ||
<id>metaconfig_simple_table_ini_20240502</id> | ||
<version>2024-02-18</version> | ||
<publishingDate>2024-02-18</publishingDate> | ||
<owner>mailto:bjsvwweb</owner> | ||
<title> | ||
<DatasetIdx16.MultilingualText> | ||
<LocalisedText> | ||
<DatasetIdx16.LocalisedText> | ||
<Text>simple_table_ini_20240502</Text> | ||
</DatasetIdx16.LocalisedText> | ||
</LocalisedText> | ||
</DatasetIdx16.MultilingualText> | ||
</title> | ||
<shortDescription> | ||
<DatasetIdx16.MultilingualMText> | ||
<LocalisedText> | ||
<DatasetIdx16.LocalisedMText> | ||
<Text>Metaconfig file for simple_table_ini_20240502 - ('simple_table_ini_20240502', '.ini')</Text> | ||
</DatasetIdx16.LocalisedMText> | ||
</LocalisedText> | ||
</DatasetIdx16.MultilingualMText> | ||
</shortDescription> | ||
<categories> | ||
<DatasetIdx16.Code_> | ||
<value>http://codes.interlis.ch/type/metaconfig</value> | ||
</DatasetIdx16.Code_> | ||
<DatasetIdx16.Code_> | ||
<value>http://codes.interlis.ch/model/SO_AFU_Schutzbauten_20231212</value> | ||
</DatasetIdx16.Code_> | ||
</categories> | ||
<files> | ||
<DatasetIdx16.DataFile> | ||
<fileFormat>text/plain</fileFormat> | ||
<file> | ||
<DatasetIdx16.File> | ||
<path>files/simple_table_ini_20240502.ini</path> | ||
</DatasetIdx16.File> | ||
</file> | ||
</DatasetIdx16.DataFile> | ||
</files> | ||
</DatasetIdx16.DataIndex.DatasetMetadata> | ||
</DatasetIdx16.DataIndex> | ||
</DATASECTION> | ||
</TRANSFER> |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters