From d2557cdba1b9fff0e41e1d33dd37b849439086b6 Mon Sep 17 00:00:00 2001 From: Georg Schwarz Date: Tue, 29 Oct 2024 18:11:09 +0100 Subject: [PATCH 1/3] Add country code value types to std lib --- .../src/stdlib/domain/geo/ContryCode.jv | 14 + .../stdlib/domain/geo/CountryCodeAlpha2.jv | 260 ++++++++++++++++++ .../stdlib/domain/geo/CountryCodeAlpha3.jv | 260 ++++++++++++++++++ .../stdlib/domain/geo/CountryCodeNumeric.jv | 260 ++++++++++++++++++ 4 files changed, 794 insertions(+) create mode 100644 libs/language-server/src/stdlib/domain/geo/ContryCode.jv create mode 100644 libs/language-server/src/stdlib/domain/geo/CountryCodeAlpha2.jv create mode 100644 libs/language-server/src/stdlib/domain/geo/CountryCodeAlpha3.jv create mode 100644 libs/language-server/src/stdlib/domain/geo/CountryCodeNumeric.jv diff --git a/libs/language-server/src/stdlib/domain/geo/ContryCode.jv b/libs/language-server/src/stdlib/domain/geo/ContryCode.jv new file mode 100644 index 00000000..0a5f0224 --- /dev/null +++ b/libs/language-server/src/stdlib/domain/geo/ContryCode.jv @@ -0,0 +1,14 @@ +use * from "./CountryCodeAlpha2.jv"; +use * from "./CountryCodeAlpha3.jv"; +use * from "./CountryCodeNumeric.jv"; + +/** +* Any code (alppha2, alpha3, numeric) for countries as defined by ISO 3166. +*/ +publish valuetype CountryCode oftype text { + constraints: [ + CountryCodeAlpha2Constraint, + CountryCodeAlpha3Constraint, + CountryCodeNumericConstraint + ]; +} \ No newline at end of file diff --git a/libs/language-server/src/stdlib/domain/geo/CountryCodeAlpha2.jv b/libs/language-server/src/stdlib/domain/geo/CountryCodeAlpha2.jv new file mode 100644 index 00000000..b003fe6a --- /dev/null +++ b/libs/language-server/src/stdlib/domain/geo/CountryCodeAlpha2.jv @@ -0,0 +1,260 @@ +/** +* Alpha-2 code for countries as defined by ISO 3166. +*/ +publish valuetype CountryCodeAlpha2 oftype text { + constraints: [ + CountryCodeAlpha2Constraint + ]; +} + +publish constraint CountryCodeAlpha2Constraint on text: value in [ + "AD", // Andorra + "AE", // United Arab Emirates (the) + "AF", // Afghanistan + "AG", // Antigua and Barbuda + "AI", // Anguilla + "AL", // Albania + "AM", // Armenia + "AO", // Angola + "AQ", // Antarctica + "AR", // Argentina + "AS", // American Samoa + "AT", // Austria + "AU", // Australia + "AW", // Aruba + "AX", // Åland Islands + "AZ", // Azerbaijan + "BA", // Bosnia and Herzegovina + "BB", // Barbados + "BD", // Bangladesh + "BE", // Belgium + "BF", // Burkina Faso + "BG", // Bulgaria + "BH", // Bahrain + "BI", // Burundi + "BJ", // Benin + "BL", // Saint Barthélemy + "BM", // Bermuda + "BN", // Brunei Darussalam + "BO", // Bolivia (Plurinational State of) + "BQ", // Bonaire, Sint Eustatius and Saba + "BR", // Brazil + "BS", // Bahamas (the) + "BT", // Bhutan + "BV", // Bouvet Island + "BW", // Botswana + "BY", // Belarus + "BZ", // Belize + "CA", // Canada + "CC", // Cocos (Keeling) Islands (the) + "CD", // Congo (the Democratic Republic of the) + "CF", // Central African Republic (the) + "CG", // Congo (the) + "CH", // Switzerland + "CI", // Côte d'Ivoire + "CK", // Cook Islands (the) + "CL", // Chile + "CM", // Cameroon + "CN", // China + "CO", // Colombia + "CR", // Costa Rica + "CU", // Cuba + "CV", // Cabo Verde + "CW", // Curaçao + "CX", // Christmas Island + "CY", // Cyprus + "CZ", // Czechia + "DE", // Germany + "DJ", // Djibouti + "DK", // Denmark + "DM", // Dominica + "DO", // Dominican Republic (the) + "DZ", // Algeria + "EC", // Ecuador + "EE", // Estonia + "EG", // Egypt + "EH", // Western Sahara + "ER", // Eritrea + "ES", // Spain + "ET", // Ethiopia + "FI", // Finland + "FJ", // Fiji + "FK", // Falkland Islands (the) [Malvinas] + "FM", // Micronesia (Federated States of) + "FO", // Faroe Islands (the) + "FR", // France + "GA", // Gabon + "GB", // United Kingdom of Great Britain and Northern Ireland (the) + "GD", // Grenada + "GE", // Georgia + "GF", // French Guiana + "GG", // Guernsey + "GH", // Ghana + "GI", // Gibraltar + "GL", // Greenland + "GM", // Gambia (the) + "GN", // Guinea + "GP", // Guadeloupe + "GQ", // Equatorial Guinea + "GR", // Greece + "GS", // South Georgia and the South Sandwich Islands + "GT", // Guatemala + "GU", // Guam + "GW", // Guinea-Bissau + "GY", // Guyana + "HK", // Hong Kong + "HM", // Heard Island and McDonald Islands + "HN", // Honduras + "HR", // Croatia + "HT", // Haiti + "HU", // Hungary + "ID", // Indonesia + "IE", // Ireland + "IL", // Israel + "IM", // Isle of Man + "IN", // India + "IO", // British Indian Ocean Territory (the) + "IQ", // Iraq + "IR", // Iran (Islamic Republic of) + "IS", // Iceland + "IT", // Italy + "JE", // Jersey + "JM", // Jamaica + "JO", // Jordan + "JP", // Japan + "KE", // Kenya + "KG", // Kyrgyzstan + "KH", // Cambodia + "KI", // Kiribati + "KM", // Comoros (the) + "KN", // Saint Kitts and Nevis + "KP", // Korea (the Democratic People's Republic of) + "KR", // Korea (the Republic of) + "KW", // Kuwait + "KY", // Cayman Islands (the) + "KZ", // Kazakhstan + "LA", // Lao People's Democratic Republic (the) + "LB", // Lebanon + "LC", // Saint Lucia + "LI", // Liechtenstein + "LK", // Sri Lanka + "LR", // Liberia + "LS", // Lesotho + "LT", // Lithuania + "LU", // Luxembourg + "LV", // Latvia + "LY", // Libya + "MA", // Morocco + "MC", // Monaco + "MD", // Moldova (the Republic of) + "ME", // Montenegro + "MF", // Saint Martin (French part) + "MG", // Madagascar + "MH", // Marshall Islands (the) + "MK", // Republic of North Macedonia + "ML", // Mali + "MM", // Myanmar + "MN", // Mongolia + "MO", // Macao + "MP", // Northern Mariana Islands (the) + "MQ", // Martinique + "MR", // Mauritania + "MS", // Montserrat + "MT", // Malta + "MU", // Mauritius + "MV", // Maldives + "MW", // Malawi + "MX", // Mexico + "MY", // Malaysia + "MZ", // Mozambique + "NA", // Namibia + "NC", // New Caledonia + "NE", // Niger (the) + "NF", // Norfolk Island + "NG", // Nigeria + "NI", // Nicaragua + "NL", // Netherlands (the) + "NO", // Norway + "NP", // Nepal + "NR", // Nauru + "NU", // Niue + "NZ", // New Zealand + "OM", // Oman + "PA", // Panama + "PE", // Peru + "PF", // French Polynesia + "PG", // Papua New Guinea + "PH", // Philippines (the) + "PK", // Pakistan + "PL", // Poland + "PM", // Saint Pierre and Miquelon + "PN", // Pitcairn + "PR", // Puerto Rico + "PS", // Palestine, State of + "PT", // Portugal + "PW", // Palau + "PY", // Paraguay + "QA", // Qatar + "RE", // Réunion + "RO", // Romania + "RS", // Serbia + "RU", // Russian Federation (the) + "RW", // Rwanda + "SA", // Saudi Arabia + "SB", // Solomon Islands + "SC", // Seychelles + "SD", // Sudan (the) + "SE", // Sweden + "SG", // Singapore + "SH", // Saint Helena, Ascension and Tristan da Cunha + "SI", // Slovenia + "SJ", // Svalbard and Jan Mayen + "SK", // Slovakia + "SL", // Sierra Leone + "SM", // San Marino + "SN", // Senegal + "SO", // Somalia + "SR", // Suriname + "SS", // South Sudan + "ST", // Sao Tome and Principe + "SV", // El Salvador + "SX", // Sint Maarten (Dutch part) + "SY", // Syrian Arab Republic + "SZ", // Eswatini + "TC", // Turks and Caicos Islands (the) + "TD", // Chad + "TF", // French Southern Territories (the) + "TG", // Togo + "TH", // Thailand + "TJ", // Tajikistan + "TK", // Tokelau + "TL", // Timor-Leste + "TM", // Turkmenistan + "TN", // Tunisia + "TO", // Tonga + "TR", // Turkey + "TT", // Trinidad and Tobago + "TV", // Tuvalu + "TW", // Taiwan (Province of China) + "TZ", // Tanzania, United Republic of + "UA", // Ukraine + "UG", // Uganda + "UM", // United States Minor Outlying Islands (the) + "US", // United States of America (the) + "UY", // Uruguay + "UZ", // Uzbekistan + "VA", // Holy See (the) + "VC", // Saint Vincent and the Grenadines + "VE", // Venezuela (Bolivarian Republic of) + "VG", // Virgin Islands (British) + "VI", // Virgin Islands (U.S.) + "VN", // Viet Nam + "VU", // Vanuatu + "WF", // Wallis and Futuna + "WS", // Samoa + "YE", // Yemen + "YT", // Mayotte + "ZA", // South Africa + "ZM", // Zambia + "ZW", // Zimbabwe +]; \ No newline at end of file diff --git a/libs/language-server/src/stdlib/domain/geo/CountryCodeAlpha3.jv b/libs/language-server/src/stdlib/domain/geo/CountryCodeAlpha3.jv new file mode 100644 index 00000000..3e2bc948 --- /dev/null +++ b/libs/language-server/src/stdlib/domain/geo/CountryCodeAlpha3.jv @@ -0,0 +1,260 @@ +/** +* Alpha-3 code for countries as defined by ISO 3166. +*/ +publish valuetype CountryCodeAlpha3 oftype text { + constraints: [ + CountryCodeAlpha3Constraint + ]; +} + +publish constraint CountryCodeAlpha3Constraint on text: value in [ + "ABW", // Aruba + "AFG", // Afghanistan + "AGO", // Angola + "AIA", // Anguilla + "ALA", // Åland Islands + "ALB", // Albania + "AND", // Andorra + "ARE", // United Arab Emirates (the) + "ARG", // Argentina + "ARM", // Armenia + "ASM", // American Samoa + "ATA", // Antarctica + "ATF", // French Southern Territories (the) + "ATG", // Antigua and Barbuda + "AUS", // Australia + "AUT", // Austria + "AZE", // Azerbaijan + "BDI", // Burundi + "BEL", // Belgium + "BEN", // Benin + "BES", // Bonaire, Sint Eustatius and Saba + "BFA", // Burkina Faso + "BGD", // Bangladesh + "BGR", // Bulgaria + "BHR", // Bahrain + "BHS", // Bahamas (the) + "BIH", // Bosnia and Herzegovina + "BLM", // Saint Barthélemy + "BLR", // Belarus + "BLZ", // Belize + "BMU", // Bermuda + "BOL", // Bolivia (Plurinational State of) + "BRA", // Brazil + "BRB", // Barbados + "BRN", // Brunei Darussalam + "BTN", // Bhutan + "BVT", // Bouvet Island + "BWA", // Botswana + "CAF", // Central African Republic (the) + "CAN", // Canada + "CCK", // Cocos (Keeling) Islands (the) + "CHE", // Switzerland + "CHL", // Chile + "CHN", // China + "CIV", // Côte d'Ivoire + "CMR", // Cameroon + "COD", // Congo (the Democratic Republic of the) + "COG", // Congo (the) + "COK", // Cook Islands (the) + "COL", // Colombia + "COM", // Comoros (the) + "CPV", // Cabo Verde + "CRI", // Costa Rica + "CUB", // Cuba + "CUW", // Curaçao + "CXR", // Christmas Island + "CYM", // Cayman Islands (the) + "CYP", // Cyprus + "CZE", // Czechia + "DEU", // Germany + "DJI", // Djibouti + "DMA", // Dominica + "DNK", // Denmark + "DOM", // Dominican Republic (the) + "DZA", // Algeria + "ECU", // Ecuador + "EGY", // Egypt + "ERI", // Eritrea + "ESH", // Western Sahara + "ESP", // Spain + "EST", // Estonia + "ETH", // Ethiopia + "FIN", // Finland + "FJI", // Fiji + "FLK", // Falkland Islands (the) [Malvinas] + "FRA", // France + "FRO", // Faroe Islands (the) + "FSM", // Micronesia (Federated States of) + "GAB", // Gabon + "GBR", // United Kingdom of Great Britain and Northern Ireland (the) + "GEO", // Georgia + "GGY", // Guernsey + "GHA", // Ghana + "GIB", // Gibraltar + "GIN", // Guinea + "GLP", // Guadeloupe + "GMB", // Gambia (the) + "GNB", // Guinea-Bissau + "GNQ", // Equatorial Guinea + "GRC", // Greece + "GRD", // Grenada + "GRL", // Greenland + "GTM", // Guatemala + "GUF", // French Guiana + "GUM", // Guam + "GUY", // Guyana + "HKG", // Hong Kong + "HMD", // Heard Island and McDonald Islands + "HND", // Honduras + "HRV", // Croatia + "HTI", // Haiti + "HUN", // Hungary + "IDN", // Indonesia + "IMN", // Isle of Man + "IND", // India + "IOT", // British Indian Ocean Territory (the) + "IRL", // Ireland + "IRN", // Iran (Islamic Republic of) + "IRQ", // Iraq + "ISL", // Iceland + "ISR", // Israel + "ITA", // Italy + "JAM", // Jamaica + "JEY", // Jersey + "JOR", // Jordan + "JPN", // Japan + "KAZ", // Kazakhstan + "KEN", // Kenya + "KGZ", // Kyrgyzstan + "KHM", // Cambodia + "KIR", // Kiribati + "KNA", // Saint Kitts and Nevis + "KOR", // Korea (the Republic of) + "KWT", // Kuwait + "LAO", // Lao People's Democratic Republic (the) + "LBN", // Lebanon + "LBR", // Liberia + "LBY", // Libya + "LCA", // Saint Lucia + "LIE", // Liechtenstein + "LKA", // Sri Lanka + "LSO", // Lesotho + "LTU", // Lithuania + "LUX", // Luxembourg + "LVA", // Latvia + "MAC", // Macao + "MAF", // Saint Martin (French part) + "MAR", // Morocco + "MCO", // Monaco + "MDA", // Moldova (the Republic of) + "MDG", // Madagascar + "MDV", // Maldives + "MEX", // Mexico + "MHL", // Marshall Islands (the) + "MKD", // Republic of North Macedonia + "MLI", // Mali + "MLT", // Malta + "MMR", // Myanmar + "MNE", // Montenegro + "MNG", // Mongolia + "MNP", // Northern Mariana Islands (the) + "MOZ", // Mozambique + "MRT", // Mauritania + "MSR", // Montserrat + "MTQ", // Martinique + "MUS", // Mauritius + "MWI", // Malawi + "MYS", // Malaysia + "MYT", // Mayotte + "NAM", // Namibia + "NCL", // New Caledonia + "NER", // Niger (the) + "NFK", // Norfolk Island + "NGA", // Nigeria + "NIC", // Nicaragua + "NIU", // Niue + "NLD", // Netherlands (the) + "NOR", // Norway + "NPL", // Nepal + "NRU", // Nauru + "NZL", // New Zealand + "OMN", // Oman + "PAK", // Pakistan + "PAN", // Panama + "PCN", // Pitcairn + "PER", // Peru + "PHL", // Philippines (the) + "PLW", // Palau + "PNG", // Papua New Guinea + "POL", // Poland + "PRI", // Puerto Rico + "PRK", // Korea (the Democratic People's Republic of) + "PRT", // Portugal + "PRY", // Paraguay + "PSE", // Palestine, State of + "PYF", // French Polynesia + "QAT", // Qatar + "REU", // Réunion + "ROU", // Romania + "RUS", // Russian Federation (the) + "RWA", // Rwanda + "SAU", // Saudi Arabia + "SDN", // Sudan (the) + "SEN", // Senegal + "SGP", // Singapore + "SGS", // South Georgia and the South Sandwich Islands + "SHN", // Saint Helena, Ascension and Tristan da Cunha + "SJM", // Svalbard and Jan Mayen + "SLB", // Solomon Islands + "SLE", // Sierra Leone + "SLV", // El Salvador + "SMR", // San Marino + "SOM", // Somalia + "SPM", // Saint Pierre and Miquelon + "SRB", // Serbia + "SSD", // South Sudan + "STP", // Sao Tome and Principe + "SUR", // Suriname + "SVK", // Slovakia + "SVN", // Slovenia + "SWE", // Sweden + "SWZ", // Eswatini + "SXM", // Sint Maarten (Dutch part) + "SYC", // Seychelles + "SYR", // Syrian Arab Republic + "TCA", // Turks and Caicos Islands (the) + "TCD", // Chad + "TGO", // Togo + "THA", // Thailand + "TJK", // Tajikistan + "TKL", // Tokelau + "TKM", // Turkmenistan + "TLS", // Timor-Leste + "TON", // Tonga + "TTO", // Trinidad and Tobago + "TUN", // Tunisia + "TUR", // Turkey + "TUV", // Tuvalu + "TWN", // Taiwan (Province of China) + "TZA", // Tanzania, United Republic of + "UGA", // Uganda + "UKR", // Ukraine + "UMI", // United States Minor Outlying Islands (the) + "URY", // Uruguay + "USA", // United States of America (the) + "UZB", // Uzbekistan + "VAT", // Holy See (the) + "VCT", // Saint Vincent and the Grenadines + "VEN", // Venezuela (Bolivarian Republic of) + "VGB", // Virgin Islands (British) + "VIR", // Virgin Islands (U.S.) + "VNM", // Viet Nam + "VUT", // Vanuatu + "WLF", // Wallis and Futuna + "WSM", // Samoa + "YEM", // Yemen + "ZAF", // South Africa + "ZMB", // Zambia + "ZWE", // Zimbabwe +]; \ No newline at end of file diff --git a/libs/language-server/src/stdlib/domain/geo/CountryCodeNumeric.jv b/libs/language-server/src/stdlib/domain/geo/CountryCodeNumeric.jv new file mode 100644 index 00000000..56ea4d73 --- /dev/null +++ b/libs/language-server/src/stdlib/domain/geo/CountryCodeNumeric.jv @@ -0,0 +1,260 @@ +/** +* Numeric code for countries as defined by ISO 3166. +*/ +publish valuetype CountryCodeNumeric oftype text { + constraints: [ + CountryCodeNumericConstraint + ]; +} + +publish constraint CountryCodeNumericConstraint on text: value in [ + "004", // Afghanistan + "008", // Albania + "010", // Antarctica + "012", // Algeria + "016", // American Samoa + "020", // Andorra + "024", // Angola + "028", // Antigua and Barbuda + "031", // Azerbaijan + "032", // Argentina + "036", // Australia + "040", // Austria + "044", // Bahamas (the) + "048", // Bahrain + "050", // Bangladesh + "051", // Armenia + "052", // Barbados + "056", // Belgium + "060", // Bermuda + "064", // Bhutan + "068", // Bolivia (Plurinational State of) + "070", // Bosnia and Herzegovina + "072", // Botswana + "074", // Bouvet Island + "076", // Brazil + "084", // Belize + "086", // British Indian Ocean Territory (the) + "090", // Solomon Islands + "092", // Virgin Islands (British) + "096", // Brunei Darussalam + "100", // Bulgaria + "104", // Myanmar + "108", // Burundi + "112", // Belarus + "116", // Cambodia + "120", // Cameroon + "124", // Canada + "132", // Cabo Verde + "136", // Cayman Islands (the) + "140", // Central African Republic (the) + "144", // Sri Lanka + "148", // Chad + "152", // Chile + "156", // China + "158", // Taiwan (Province of China) + "162", // Christmas Island + "166", // Cocos (Keeling) Islands (the) + "170", // Colombia + "174", // Comoros (the) + "175", // Mayotte + "178", // Congo (the) + "180", // Congo (the Democratic Republic of the) + "184", // Cook Islands (the) + "188", // Costa Rica + "191", // Croatia + "192", // Cuba + "196", // Cyprus + "203", // Czechia + "204", // Benin + "208", // Denmark + "212", // Dominica + "214", // Dominican Republic (the) + "218", // Ecuador + "222", // El Salvador + "226", // Equatorial Guinea + "231", // Ethiopia + "232", // Eritrea + "233", // Estonia + "234", // Faroe Islands (the) + "238", // Falkland Islands (the) [Malvinas] + "239", // South Georgia and the South Sandwich Islands + "242", // Fiji + "246", // Finland + "248", // Åland Islands + "250", // France + "254", // French Guiana + "258", // French Polynesia + "260", // French Southern Territories (the) + "262", // Djibouti + "266", // Gabon + "268", // Georgia + "270", // Gambia (the) + "275", // Palestine, State of + "276", // Germany + "288", // Ghana + "292", // Gibraltar + "296", // Kiribati + "300", // Greece + "304", // Greenland + "308", // Grenada + "312", // Guadeloupe + "316", // Guam + "320", // Guatemala + "324", // Guinea + "328", // Guyana + "332", // Haiti + "334", // Heard Island and McDonald Islands + "336", // Holy See (the) + "340", // Honduras + "344", // Hong Kong + "348", // Hungary + "352", // Iceland + "356", // India + "360", // Indonesia + "364", // Iran (Islamic Republic of) + "368", // Iraq + "372", // Ireland + "376", // Israel + "380", // Italy + "384", // Côte d'Ivoire + "388", // Jamaica + "392", // Japan + "398", // Kazakhstan + "400", // Jordan + "404", // Kenya + "408", // Korea (the Democratic People's Republic of) + "410", // Korea (the Republic of) + "414", // Kuwait + "417", // Kyrgyzstan + "418", // Lao People's Democratic Republic (the) + "422", // Lebanon + "426", // Lesotho + "428", // Latvia + "430", // Liberia + "434", // Libya + "438", // Liechtenstein + "440", // Lithuania + "442", // Luxembourg + "446", // Macao + "450", // Madagascar + "454", // Malawi + "458", // Malaysia + "462", // Maldives + "466", // Mali + "470", // Malta + "474", // Martinique + "478", // Mauritania + "480", // Mauritius + "484", // Mexico + "492", // Monaco + "496", // Mongolia + "498", // Moldova (the Republic of) + "499", // Montenegro + "500", // Montserrat + "504", // Morocco + "508", // Mozambique + "512", // Oman + "516", // Namibia + "520", // Nauru + "524", // Nepal + "528", // Netherlands (the) + "531", // Curaçao + "533", // Aruba + "534", // Sint Maarten (Dutch part) + "535", // Bonaire, Sint Eustatius and Saba + "540", // New Caledonia + "548", // Vanuatu + "554", // New Zealand + "558", // Nicaragua + "562", // Niger (the) + "566", // Nigeria + "570", // Niue + "574", // Norfolk Island + "578", // Norway + "580", // Northern Mariana Islands (the) + "581", // United States Minor Outlying Islands (the) + "583", // Micronesia (Federated States of) + "584", // Marshall Islands (the) + "585", // Palau + "586", // Pakistan + "591", // Panama + "598", // Papua New Guinea + "600", // Paraguay + "604", // Peru + "608", // Philippines (the) + "612", // Pitcairn + "616", // Poland + "620", // Portugal + "624", // Guinea-Bissau + "626", // Timor-Leste + "630", // Puerto Rico + "634", // Qatar + "638", // Réunion + "642", // Romania + "643", // Russian Federation (the) + "646", // Rwanda + "652", // Saint Barthélemy + "654", // Saint Helena, Ascension and Tristan da Cunha + "659", // Saint Kitts and Nevis + "660", // Anguilla + "662", // Saint Lucia + "663", // Saint Martin (French part) + "666", // Saint Pierre and Miquelon + "670", // Saint Vincent and the Grenadines + "674", // San Marino + "678", // Sao Tome and Principe + "682", // Saudi Arabia + "686", // Senegal + "688", // Serbia + "690", // Seychelles + "694", // Sierra Leone + "702", // Singapore + "703", // Slovakia + "704", // Viet Nam + "705", // Slovenia + "706", // Somalia + "710", // South Africa + "716", // Zimbabwe + "724", // Spain + "728", // South Sudan + "729", // Sudan (the) + "732", // Western Sahara + "740", // Suriname + "744", // Svalbard and Jan Mayen + "748", // Eswatini + "752", // Sweden + "756", // Switzerland + "760", // Syrian Arab Republic + "762", // Tajikistan + "764", // Thailand + "768", // Togo + "772", // Tokelau + "776", // Tonga + "780", // Trinidad and Tobago + "784", // United Arab Emirates (the) + "788", // Tunisia + "792", // Turkey + "795", // Turkmenistan + "796", // Turks and Caicos Islands (the) + "798", // Tuvalu + "800", // Uganda + "804", // Ukraine + "807", // Republic of North Macedonia + "818", // Egypt + "826", // United Kingdom of Great Britain and Northern Ireland (the) + "831", // Guernsey + "832", // Jersey + "833", // Isle of Man + "834", // Tanzania, United Republic of + "840", // United States of America (the) + "850", // Virgin Islands (U.S.) + "854", // Burkina Faso + "858", // Uruguay + "860", // Uzbekistan + "862", // Venezuela (Bolivarian Republic of) + "876", // Wallis and Futuna + "882", // Samoa + "887", // Yemen + "894", // Zambia +]; \ No newline at end of file From 06141fcc7454ec87a846c9e5df231f8392a43256 Mon Sep 17 00:00:00 2001 From: Georg Schwarz Date: Tue, 29 Oct 2024 18:21:10 +0100 Subject: [PATCH 2/3] Add license headers to new files --- libs/language-server/src/stdlib/domain/geo/ContryCode.jv | 4 ++++ .../src/stdlib/domain/geo/CountryCodeAlpha2.jv | 4 ++++ .../src/stdlib/domain/geo/CountryCodeAlpha3.jv | 4 ++++ .../src/stdlib/domain/geo/CountryCodeNumeric.jv | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/libs/language-server/src/stdlib/domain/geo/ContryCode.jv b/libs/language-server/src/stdlib/domain/geo/ContryCode.jv index 0a5f0224..60d5c492 100644 --- a/libs/language-server/src/stdlib/domain/geo/ContryCode.jv +++ b/libs/language-server/src/stdlib/domain/geo/ContryCode.jv @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 Friedrich-Alexander-Universitat Erlangen-Nurnberg +// +// SPDX-License-Identifier: AGPL-3.0-only + use * from "./CountryCodeAlpha2.jv"; use * from "./CountryCodeAlpha3.jv"; use * from "./CountryCodeNumeric.jv"; diff --git a/libs/language-server/src/stdlib/domain/geo/CountryCodeAlpha2.jv b/libs/language-server/src/stdlib/domain/geo/CountryCodeAlpha2.jv index b003fe6a..207016fc 100644 --- a/libs/language-server/src/stdlib/domain/geo/CountryCodeAlpha2.jv +++ b/libs/language-server/src/stdlib/domain/geo/CountryCodeAlpha2.jv @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 Friedrich-Alexander-Universitat Erlangen-Nurnberg +// +// SPDX-License-Identifier: AGPL-3.0-only + /** * Alpha-2 code for countries as defined by ISO 3166. */ diff --git a/libs/language-server/src/stdlib/domain/geo/CountryCodeAlpha3.jv b/libs/language-server/src/stdlib/domain/geo/CountryCodeAlpha3.jv index 3e2bc948..d6c38909 100644 --- a/libs/language-server/src/stdlib/domain/geo/CountryCodeAlpha3.jv +++ b/libs/language-server/src/stdlib/domain/geo/CountryCodeAlpha3.jv @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 Friedrich-Alexander-Universitat Erlangen-Nurnberg +// +// SPDX-License-Identifier: AGPL-3.0-only + /** * Alpha-3 code for countries as defined by ISO 3166. */ diff --git a/libs/language-server/src/stdlib/domain/geo/CountryCodeNumeric.jv b/libs/language-server/src/stdlib/domain/geo/CountryCodeNumeric.jv index 56ea4d73..357b3c03 100644 --- a/libs/language-server/src/stdlib/domain/geo/CountryCodeNumeric.jv +++ b/libs/language-server/src/stdlib/domain/geo/CountryCodeNumeric.jv @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2024 Friedrich-Alexander-Universitat Erlangen-Nurnberg +// +// SPDX-License-Identifier: AGPL-3.0-only + /** * Numeric code for countries as defined by ISO 3166. */ From bfe40477a9134653c00cb40c81b4270672a1a866 Mon Sep 17 00:00:00 2001 From: Georg Schwarz Date: Thu, 31 Oct 2024 10:36:49 +0100 Subject: [PATCH 3/3] Remove CountryCode value type --- .../src/stdlib/domain/geo/ContryCode.jv | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 libs/language-server/src/stdlib/domain/geo/ContryCode.jv diff --git a/libs/language-server/src/stdlib/domain/geo/ContryCode.jv b/libs/language-server/src/stdlib/domain/geo/ContryCode.jv deleted file mode 100644 index 60d5c492..00000000 --- a/libs/language-server/src/stdlib/domain/geo/ContryCode.jv +++ /dev/null @@ -1,18 +0,0 @@ -// SPDX-FileCopyrightText: 2024 Friedrich-Alexander-Universitat Erlangen-Nurnberg -// -// SPDX-License-Identifier: AGPL-3.0-only - -use * from "./CountryCodeAlpha2.jv"; -use * from "./CountryCodeAlpha3.jv"; -use * from "./CountryCodeNumeric.jv"; - -/** -* Any code (alppha2, alpha3, numeric) for countries as defined by ISO 3166. -*/ -publish valuetype CountryCode oftype text { - constraints: [ - CountryCodeAlpha2Constraint, - CountryCodeAlpha3Constraint, - CountryCodeNumericConstraint - ]; -} \ No newline at end of file