Skip to content

Commit

Permalink
code lists multiple versions
Browse files Browse the repository at this point in the history
  • Loading branch information
dragos-eu committed Mar 14, 2024
1 parent f90c3f7 commit 314d1b1
Show file tree
Hide file tree
Showing 53 changed files with 534,148 additions and 75 deletions.
56 changes: 38 additions & 18 deletions ESPD/codelists/codelist.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,40 @@
{
"code_lists": [
"access-right",
"boolean-gui-control-type",
"country",
"criterion",
"criterion-element-type",
"currency",
"docrefcontent-type",
"economic-operator-size",
"eoid-type",
"eo-role-type",
"financial-ratio-type",
"language",
"occupation",
"profile-execution-id",
"property-group-type",
"response-data-type"
]
"code_lists": {
"v3.3.0": [
"access-right",
"boolean-gui-control-type",
"country",
"criterion",
"criterion-element-type",
"currency",
"docrefcontent-type",
"economic-operator-size",
"eoid-type",
"eo-role-type",
"financial-ratio-type",
"language",
"occupation",
"profile-execution-id",
"property-group-type",
"response-data-type"
],
"v3.2.0": [
"access-right",
"boolean-gui-control-type",
"country",
"criterion",
"criterion-element-type",
"currency",
"docrefcontent-type",
"economic-operator-size",
"eoid-type",
"eo-role-type",
"financial-ratio-type",
"language",
"occupation",
"profile-execution-id",
"property-group-type",
"response-data-type"
]
}
}
86 changes: 68 additions & 18 deletions ESPD/codelists/getExternalCodeLists.ps1
Original file line number Diff line number Diff line change
@@ -1,63 +1,113 @@
$extCL = '[
#PowerShell tool for downloading external files v1.1
#
#This tool downloads external Code List files from EU Vocabulary
#specified in a JSON object
#

$extCL = '[
{
"folder" : "access-right",
"folder" : "v3.3.0\\access-right",
"filename": "AccessRight.gc",
"uri": "http://publications.europa.eu/resource/distribution/access-right/20220316-0/xml/gc/AccessRight.gc"
},
{
"folder" : "country",
"folder" : "v3.3.0\\country",
"filename": "Country.gc",
"uri": "http://publications.europa.eu/resource/distribution/country/20220928-0/xml/gc/Country.gc"
},
{
"folder" : "criterion",
"folder" : "v3.3.0\\criterion",
"filename": "Criterion.gc",
"uri": "http://publications.europa.eu/resource/distribution/criterion/20230315-0/xml/gc/Criterion.gc"
},
{
"folder" : "currency",
"folder" : "v3.3.0\\currency",
"filename": "Currency.gc",
"uri": "http://publications.europa.eu/resource/distribution/currency/20220928-0/xml/gc/Currency.gc"
},
{
"folder" : "docrefcontent-type",
"folder" : "v3.3.0\\docrefcontent-type",
"filename": "DocRefContentType.gc",
"uri": "http://publications.europa.eu/resource/distribution/docrefcontent-type/20220928-0/xml/gc/DocrefcontentType.gc"
},
{
"folder" : "economic-operator-size",
"folder" : "v3.3.0\\economic-operator-size",
"filename": "EconomicOperatorSize.gc",
"uri": "http://publications.europa.eu/resource/distribution/economic-operator-size/20220316-0/xml/gc/EconomicOperatorSize.gc"
},
{
"folder" : "eo-role-type",
"folder" : "v3.3.0\\eo-role-type",
"filename": "EoRoleType.gc",
"uri": "http://publications.europa.eu/resource/distribution/eo-role-type/20211208-0/xml/gc/EoRoleType.gc"
},
{
"folder" : "language",
"folder" : "v3.3.0\\language",
"filename": "Language.gc",
"uri": "http://publications.europa.eu/resource/distribution/language/20220928-0/xml/gc/Language.gc"
},
{
"folder" : "occupation",
"folder" : "v3.3.0\\occupation",
"filename": "Occupation.gc",
"uri": "http://publications.europa.eu/resource/distribution/occupation/20221214-0/xml/gc/Occupation.gc"
},
{
"folder": "v3.2.0\\access-right",
"filename":"AccessRight.gc",
"uri":"http://publications.europa.eu/resource/distribution/access-right/20220316-0/xml/gc/AccessRight.gc"
},
{
"folder": "v3.2.0\\country",
"filename":"Country.gc",
"uri":"http://publications.europa.eu/resource/distribution/country/20220928-0/xml/gc/Country.gc"
},
{
"folder": "v3.2.0\\criterion",
"filename":"Criterion.gc",
"uri":"http://publications.europa.eu/resource/distribution/criterion/20230315-0/xml/gc/Criterion.gc"
},
{
"folder": "v3.2.0\\currency",
"filename":"Currency.gc",
"uri":"http://publications.europa.eu/resource/distribution/currency/20220928-0/xml/gc/Currency.gc"
},
{
"folder": "v3.2.0\\docrefcontent-type",
"filename":"DocRefContentType.gc",
"uri":"http://publications.europa.eu/resource/distribution/docrefcontent-type/20220928-0/xml/gc/DocrefcontentType.gc"
},
{
"folder": "v3.2.0\\economic-operator-size",
"filename":"EconomicOperatorSize.gc",
"uri":"http://publications.europa.eu/resource/distribution/economic-operator-size/20220316-0/xml/gc/EconomicOperatorSize.gc"
},
{
"folder": "v3.2.0\\eo-role-type",
"filename":"EoRoleType.gc",
"uri":"http://publications.europa.eu/resource/distribution/eo-role-type/20211208-0/xml/gc/EoRoleType.gc"
},
{
"folder": "v3.2.0\\language",
"filename":"Language.gc",
"uri":"http://publications.europa.eu/resource/distribution/language/20220928-0/xml/gc/Language.gc"
},
{
"folder": "v3.2.0\\occupation",
"filename":"Occupation.gc",
"uri":"http://publications.europa.eu/resource/distribution/occupation/20221214-0/xml/gc/Occupation.gc"
}
]';

# Convert String to Pwershell Array
$externalCL = ConvertFrom-Json -InputObject $extCL;

# Loop thorough each external Code List and get the right version
Foreach($ecl in $externalCL)
{
Foreach ($ecl in $externalCL) {
Write-Host "entering " $ecl.folder
cd $ecl.folder
if(Test-Path $ecl.filename)
{
rm $ecl.filename
Set-Location $ecl.folder
if (Test-Path $ecl.filename) {
Remove-Item $ecl.filename
}
wget -OutFile $ecl.filename -Uri $ecl.uri
cd ..
Invoke-WebRequest -OutFile $ecl.filename -Uri $ecl.uri
Set-Location ..\..
}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
{
"name": "boolean-gui-control-type",
"type": "technical",
"ShortName": "BooleanGUIControlType",
"ListID": "boolean-gui-control-type",
"Version": "3.2.0",
"CanonicalUri": "https://github.com/ESPD/ESPD-EDM",
"CanonicalVersionUri": "https://github.com/OP-TED/ESPD-EDM/tree/3.2.0/",
"LocationUri": "https://github.com/ESPD/ESPD-EDM/tree/v3.2.0/codelists/gc/BooleanGUIControlType.gc",
"fields": {
"RADIO_BUTTON_TRUE": {
"Code": "RADIO_BUTTON_TRUE",
"Name": "Radio Button TRUE",
"Description": "Radio Button is in state TRUE",
"Status": "ACTIVE",
"bul": "",
"spa": "",
"ces": "",
"dan": "",
"deu": "",
"est": "",
"ell": "",
"eng": "Radio Button TRUE",
"fra": "",
"gle": "",
"hrv": "",
"ita": "",
"lav": "",
"lit": "",
"hun": "",
"mlt": "",
"nld": "",
"pol": "",
"por": "",
"ron": "",
"slk": "",
"slv": "",
"fin": "",
"swe": ""
},
"RADIO_BUTTON_FALSE": {
"Code": "RADIO_BUTTON_FALSE",
"Name": "Radio Button FALSE",
"Description": "Radio Button is in state FALSE",
"Status": "ACTIVE",
"bul": "",
"spa": "",
"ces": "",
"dan": "",
"deu": "",
"est": "",
"ell": "",
"eng": "Radio Button FALSE",
"fra": "",
"gle": "",
"hrv": "",
"ita": "",
"lav": "",
"lit": "",
"hun": "",
"mlt": "",
"nld": "",
"pol": "",
"por": "",
"ron": "",
"slk": "",
"slv": "",
"fin": "",
"swe": ""
},
"RADIO_BUTTON_UNSELECTED": {
"Code": "RADIO_BUTTON_UNSELECTED",
"Name": "Radio Button UNSELECTED",
"Description": "Radio Button is in state UNSELECTED",
"Status": "ACTIVE",
"bul": "",
"spa": "",
"ces": "",
"dan": "",
"deu": "",
"est": "",
"ell": "",
"eng": "Radio Button UNSELECTED",
"fra": "",
"gle": "",
"hrv": "",
"ita": "",
"lav": "",
"lit": "",
"hun": "",
"mlt": "",
"nld": "",
"pol": "",
"por": "",
"ron": "",
"slk": "",
"slv": "",
"fin": "",
"swe": ""
},
"CHECK_BOX_TRUE": {
"Code": "CHECK_BOX_TRUE",
"Name": "Check Box TRUE",
"Description": "Check-box is in state TRUE",
"Status": "ACTIVE",
"bul": "",
"spa": "",
"ces": "",
"dan": "",
"deu": "",
"est": "",
"ell": "",
"eng": "Check Box TRUE",
"fra": "",
"gle": "",
"hrv": "",
"ita": "",
"lav": "",
"lit": "",
"hun": "",
"mlt": "",
"nld": "",
"pol": "",
"por": "",
"ron": "",
"slk": "",
"slv": "",
"fin": "",
"swe": ""
},
"CHECK_BOX_FALSE": {
"Code": "CHECK_BOX_FALSE",
"Name": "Check Box FALSE",
"Description": "Check-box is in state FALSE",
"Status": "ACTIVE",
"bul": "",
"spa": "",
"ces": "",
"dan": "",
"deu": "",
"est": "",
"ell": "",
"eng": "Check Box FALSE",
"fra": "",
"gle": "",
"hrv": "",
"ita": "",
"lav": "",
"lit": "",
"hun": "",
"mlt": "",
"nld": "",
"pol": "",
"por": "",
"ron": "",
"slk": "",
"slv": "",
"fin": "",
"swe": ""
},
"CHECK_BOX_UNCHECKED": {
"Code": "CHECK_BOX_UNCHECKED",
"Name": "Check Box UNSELECTED",
"Description": "Check-box is in state UNCHECKED",
"Status": "ACTIVE",
"bul": "",
"spa": "",
"ces": "",
"dan": "",
"deu": "",
"est": "",
"ell": "",
"eng": "Check Box UNSELECTED",
"fra": "",
"gle": "",
"hrv": "",
"ita": "",
"lav": "",
"lit": "",
"hun": "",
"mlt": "",
"nld": "",
"pol": "",
"por": "",
"ron": "",
"slk": "",
"slv": "",
"fin": "",
"swe": ""
}
}
}
File renamed without changes.
13 changes: 13 additions & 0 deletions ESPD/codelists/v3.2.0/country/country.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "country",
"type": "external",
"ShortName": "Country",
"LongName": "country",
"ListID": "http://publications.europa.eu/resource/authority/country",
"Version": "20220928-0",
"CanonicalUri": "http://publications.europa.eu/resource/dataset/country",
"CanonicalVersionUri": "http://publications.europa.eu/resource/dataset/country/20220928-0",
"LocationUri": "http://publications.europa.eu/resource/distribution/country/20220928-0/xml/gc/Country.gc",
"AgencyLongName": "Publications Office of the European Union",
"AgencyIdentifier": "OP"
}
Loading

0 comments on commit 314d1b1

Please sign in to comment.