From 1f7e3a220afed0d63177d8b1591d784b252c521a Mon Sep 17 00:00:00 2001 From: Evangelos MELETIOU Date: Fri, 19 May 2023 23:34:51 +0200 Subject: [PATCH 1/2] [dependencies]: Upgrade version of Jackson to 2.15.1. --- pom.xml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 80a605b..11d9713 100644 --- a/pom.xml +++ b/pom.xml @@ -58,8 +58,7 @@ 3.2.2 2.11.0 3.12.0 - 2.13.4 - 2.13.4.2 + 2.15.1 0.9.15 3.0.2 5.7.2 @@ -103,7 +102,7 @@ com.fasterxml.jackson.core jackson-databind - ${version.jackson-databind} + ${version.jackson} From 6c6d41d9af7a0a6f604e26f3a1d71727f63b111a Mon Sep 17 00:00:00 2001 From: Evangelos MELETIOU Date: Wed, 17 May 2023 18:36:35 +0200 Subject: [PATCH 2/2] [SdkCodelistRepository]: Use codelists.json to discover codelist files. Load contents of the codelist files on demand. --- .../sdk/domain/codelist/CodelistForIndex.java | 37 ++ .../sdk/domain/codelist/CodelistsIndex.java | 14 + .../sdk/repository/SdkCodelistRepository.java | 98 ++--- .../repository/SdkCodelistRepositoryTest.java | 28 +- src/test/resources/codelists/accessibility.gc | 364 ++++++++++++++++++ src/test/resources/codelists/codelists.json | 19 + src/test/resources/codelists/criterion.gc | 168 ++++++++ src/test/resources/codelists/test-codelist.gc | 43 --- 8 files changed, 670 insertions(+), 101 deletions(-) create mode 100644 src/main/java/eu/europa/ted/eforms/sdk/domain/codelist/CodelistForIndex.java create mode 100644 src/main/java/eu/europa/ted/eforms/sdk/domain/codelist/CodelistsIndex.java create mode 100644 src/test/resources/codelists/accessibility.gc create mode 100644 src/test/resources/codelists/codelists.json create mode 100644 src/test/resources/codelists/criterion.gc delete mode 100644 src/test/resources/codelists/test-codelist.gc diff --git a/src/main/java/eu/europa/ted/eforms/sdk/domain/codelist/CodelistForIndex.java b/src/main/java/eu/europa/ted/eforms/sdk/domain/codelist/CodelistForIndex.java new file mode 100644 index 0000000..2211751 --- /dev/null +++ b/src/main/java/eu/europa/ted/eforms/sdk/domain/codelist/CodelistForIndex.java @@ -0,0 +1,37 @@ +package eu.europa.ted.eforms.sdk.domain.codelist; + +import java.io.Serializable; +import com.fasterxml.jackson.annotation.JsonProperty; + +public class CodelistForIndex implements Serializable { + private static final long serialVersionUID = 4221672498810948002L; + + private String id; + private String parentId; + private String filename; + private String description; + + @JsonProperty("_label") + private String labelId; + + public String getId() { + return id; + } + + public String getParentId() { + return parentId; + } + + public String getFilename() { + return filename; + } + + public String getDescription() { + return description; + } + + @JsonProperty("_label") + public String getLabel() { + return labelId; + } +} diff --git a/src/main/java/eu/europa/ted/eforms/sdk/domain/codelist/CodelistsIndex.java b/src/main/java/eu/europa/ted/eforms/sdk/domain/codelist/CodelistsIndex.java new file mode 100644 index 0000000..5149e33 --- /dev/null +++ b/src/main/java/eu/europa/ted/eforms/sdk/domain/codelist/CodelistsIndex.java @@ -0,0 +1,14 @@ +package eu.europa.ted.eforms.sdk.domain.codelist; + +import java.io.Serializable; +import java.util.List; + +public class CodelistsIndex implements Serializable { + private static final long serialVersionUID = -6549217565224309697L; + + private List codelists; + + public List getCodelists() { + return codelists; + } +} diff --git a/src/main/java/eu/europa/ted/eforms/sdk/repository/SdkCodelistRepository.java b/src/main/java/eu/europa/ted/eforms/sdk/repository/SdkCodelistRepository.java index af98c13..6554f53 100644 --- a/src/main/java/eu/europa/ted/eforms/sdk/repository/SdkCodelistRepository.java +++ b/src/main/java/eu/europa/ted/eforms/sdk/repository/SdkCodelistRepository.java @@ -12,8 +12,6 @@ import java.util.Objects; import java.util.Optional; import java.util.stream.Collectors; -import java.util.stream.Stream; -import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.Validate; import org.apache.commons.lang3.builder.EqualsBuilder; @@ -22,12 +20,16 @@ import org.jooq.lambda.Unchecked; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; import com.helger.genericode.v10.CodeListDocument; import com.helger.genericode.v10.Identification; import com.helger.genericode.v10.LongName; import com.helger.genericode.v10.Row; import com.helger.genericode.v10.SimpleCodeList; import com.helger.genericode.v10.Value; +import eu.europa.ted.eforms.sdk.domain.codelist.CodelistForIndex; +import eu.europa.ted.eforms.sdk.domain.codelist.CodelistsIndex; import eu.europa.ted.eforms.sdk.entity.SdkCodelist; import eu.europa.ted.eforms.sdk.entity.SdkEntityFactory; import eu.europa.ted.util.GenericodeTools; @@ -40,7 +42,7 @@ public class SdkCodelistRepository extends HashMap { private transient Path codelistsDir; private String sdkVersion; - private final Map codelistContentsByCodelistId; + private final Map> codelistInfoByCodelistIds; @SuppressWarnings("unused") private SdkCodelistRepository() { @@ -55,7 +57,7 @@ public SdkCodelistRepository(final String sdkVersion, final Path codelistsDir) { "Codelists directory [%s] is not found or not a directory", codelistsDir); try { - this.codelistContentsByCodelistId = getCodelistContentsByCodelistIds(codelistsDir); + this.codelistInfoByCodelistIds = getCodelistInfoByCodelistIds(codelistsDir); } catch (IOException e) { throw new RuntimeException( MessageFormat.format("Failed to load codelists from [{0}]", codelistsDir), e); @@ -86,13 +88,15 @@ public SdkCodelist getOrDefault(final Object codelistId, final SdkCodelist defau private Optional loadSdkCodelist(final String codeListId) throws InstantiationException { - logger.debug("Loading SDK codelist with ID [{}] for SDK version [{}] from path [{}]", - codeListId, sdkVersion, codelistsDir); + logger.debug("Loading SDK codelist with ID [{}] for SDK version [{}]", codeListId, sdkVersion); // Find the SDK codelist .gc file that corresponds to the passed reference. // Stream the data from that file. final Optional codelist = - Optional.ofNullable(codelistContentsByCodelistId.get(codeListId)); + Optional.ofNullable(codelistInfoByCodelistIds.get(codeListId)) + .map(Unchecked.function((Pair codelistInfo) -> Optional + .ofNullable(codelistInfo.getValue()) + .orElse(getCodelistContents(codelistInfo.getKey())))); if (codelist.isEmpty()) { return Optional.empty(); @@ -127,8 +131,8 @@ private Optional loadSdkCodelist(final String codeListId) final Optional result = Optional.of(SdkEntityFactory.getSdkCodelist(sdkVersion, codeListId, codelistVersion.orElse(null), codes, parentId)); - logger.debug("Finished loading SDK codelist with ID [{}] for SDK version [{}] from path [{}]", - codeListId, sdkVersion, codelistsDir); + logger.debug("Finished loading SDK codelist with ID [{}] for SDK version [{}]", codeListId, + sdkVersion); return result; } @@ -158,69 +162,67 @@ public static Optional extractLongNameWithIdentifier( } /** - * Loads all of the codelists by reading codelist files under a given a folder. + * Loads the paths of all of the codelists by looking for and reading the codelists index. + *

+ * The result is a map which associates information (file path and a placeholder for contents) for + * each codelist with its ID. * - * @param codelistsDir The folder containing all codelist files - * @return A map of codelist IDs to codelist contents + * @param codelistsDir The folder containing the codelists index and files + * @return A map of codelist IDs to pairs of codelist file paths and contents * @throws IOException If there are failures when discovering and parsing the files */ - private Map getCodelistContentsByCodelistIds(final Path codelistsDir) - throws IOException { + private Map> getCodelistInfoByCodelistIds( + final Path codelistsDir) throws IOException { Validate.notNull(codelistsDir, "Undefined codelists directory"); Validate.isTrue(Files.isDirectory(codelistsDir), MessageFormat.format("Not a directory: {0}", codelistsDir)); - logger.debug("Getting codelist file paths from directory [{}]", codelistsDir); + final Path indexFile = Path.of(codelistsDir.toString(), "codelists.json"); - final int depth = 1; // Flat folder, not recursive for now. + logger.debug("Loading codelists index from [{}]", indexFile); + CodelistsIndex codelistsIndex = + createObjectMapper().readValue(indexFile.toFile(), CodelistsIndex.class); + + final Map> result = new HashMap<>(); + codelistsIndex.getCodelists().stream().forEach((CodelistForIndex codelist) -> { + final String codelistId = codelist.getId(); + final Path codelistPath = Path.of(codelistsDir.toString(), codelist.getFilename()); + + logger.trace("Adding path [{}] for codelist [{}]", codelistPath, codelistId); + if (!Files.isRegularFile(codelistPath)) { + logger.warn("Codelist file [{}] not found. Codelist [{}] will be skipped", codelistPath, + codelistId); + } else { + // We're only interested in populating the codelist filepaths for now. + // The contents of each document will be populated for each codelist later, on demand. + result.put(codelistId, Pair.of(codelistPath, null)); + } + }); + + return result; - try (Stream walk = Files.walk(codelistsDir, depth)) { - return walk - .filter(this::isGenericodeFile) - .map(Unchecked.function(this::getCodelistIdAndContents)) - .filter(Objects::nonNull) - .collect(Collectors.toMap(Pair::getKey, Pair::getValue)); - } } /** - * Gets the codelist ID from a codelist file. + * Gets the codelist contents from a codelist file. * * @param codelistPath The codelist file's path - * @return The codelist ID and the codelist file's contents as a key/value pair + * @return The codelist file's contents * @throws FileNotFoundException If the codelist file's path is undefined or not an existing file */ - private Pair getCodelistIdAndContents(Path codelistPath) - throws FileNotFoundException { + private CodeListDocument getCodelistContents(Path codelistPath) throws FileNotFoundException { Validate.notNull(codelistPath, "Undefined codelist path"); if (!Files.isRegularFile(codelistPath)) { throw new FileNotFoundException(codelistPath.toString()); } - final Optional codelist = - Optional.ofNullable(GenericodeTools.getMarshaller().read(codelistPath)); - - if (codelist.isPresent()) { - // We use the longName as a ID, PK in the the DB. - // But for the filenames we do not always follow this convention. - // So we need to map. - return codelist - .map(CodeListDocument::getIdentification) - .map((Identification identification) -> identification.getLongNameAtIndex(0)) - .map(LongName::getValue) - .map((String longName) -> Pair.of(longName, codelist.get())) - .orElse(null); - } - - return null; + logger.debug("Reading from file [{}]", codelistPath); + return Optional.ofNullable(GenericodeTools.getMarshaller().read(codelistPath)).orElse(null); } - private boolean isGenericodeFile(final Path path) { - return path != null - && Files.isRegularFile(path) - && GenericodeTools.EXTENSION_DOT_GC - .equals(MessageFormat.format(".{0}", FilenameUtils.getExtension(path.toString()))); + private ObjectMapper createObjectMapper() { + return new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); } @Override diff --git a/src/test/java/eu/europa/ted/eforms/sdk/repository/SdkCodelistRepositoryTest.java b/src/test/java/eu/europa/ted/eforms/sdk/repository/SdkCodelistRepositoryTest.java index fee256a..3777cb4 100644 --- a/src/test/java/eu/europa/ted/eforms/sdk/repository/SdkCodelistRepositoryTest.java +++ b/src/test/java/eu/europa/ted/eforms/sdk/repository/SdkCodelistRepositoryTest.java @@ -11,14 +11,10 @@ import eu.europa.ted.eforms.sdk.entity.SdkCodelist; class SdkCodelistRepositoryTest { - private SdkCodelistRepository repository; private Identification identification; @BeforeEach public void setUp() { - repository = - new SdkCodelistRepository("999.0", Path.of("src", "test", "resources", "codelists", "/")); - identification = new Identification(); final LongName longName1 = new LongName("test-codelist-parentId"); @@ -31,20 +27,32 @@ public void setUp() { @Test void testGetObject() { - Optional codelist = Optional.ofNullable(repository.get("test-codelist")); + final SdkCodelistRepository repository = + new SdkCodelistRepository("999.0", Path.of("src", "test", "resources", "codelists", "/")); + + Optional codelist = Optional.ofNullable(repository.get("accessibility")); - assertEquals("test-codelist", codelist.map(SdkCodelist::getCodelistId).orElse(null)); - assertEquals(Arrays.asList("inc"), codelist.map(SdkCodelist::getCodes).orElse(null)); + assertEquals("accessibility", codelist.map(SdkCodelist::getCodelistId).orElse(null)); + assertEquals(Arrays.asList("inc", "n-inc", "n-inc-just"), + codelist.map(SdkCodelist::getCodes).orElse(null)); + + codelist = Optional.ofNullable(repository.get("criterion")); + assertEquals("criterion", codelist.map(SdkCodelist::getCodelistId).orElse(null)); + assertEquals(Arrays.asList("autorisation", "aver-year-to", "bankr-nat", "bankruptcy"), + codelist.map(SdkCodelist::getCodes).orElse(null)); } @Test void testGetOrDefaultObjectSdkCodelist() { - SdkCodelist defaultCodelist = + final SdkCodelistRepository repository = + new SdkCodelistRepository("999.0", Path.of("src", "test", "resources", "codelists", "/")); + + final SdkCodelist defaultCodelist = new DummySdkCodelist("default-codelist", "1", Arrays.asList("code1", "code2"), null); Optional codelist = - Optional.ofNullable(repository.getOrDefault("test-codelist", defaultCodelist)); - assertEquals("test-codelist", codelist.map(SdkCodelist::getCodelistId).orElse(null)); + Optional.ofNullable(repository.getOrDefault("accessibility", defaultCodelist)); + assertEquals("accessibility", codelist.map(SdkCodelist::getCodelistId).orElse(null)); codelist = Optional.ofNullable(repository.getOrDefault("nonexisting-codelist", defaultCodelist)); diff --git a/src/test/resources/codelists/accessibility.gc b/src/test/resources/codelists/accessibility.gc new file mode 100644 index 0000000..50b6756 --- /dev/null +++ b/src/test/resources/codelists/accessibility.gc @@ -0,0 +1,364 @@ + + + + + Accessibility + accessibility + http://publications.europa.eu/resource/authority/accessibility + 20220928-0 + http://publications.europa.eu/resource/dataset/accessibility + + + OP + Publications Office of the European Union + + + + + Code + + + + Name + + + + bulLabel + + + + spaLabel + + + + cesLabel + + + + danLabel + + + + deuLabel + + + + estLabel + + + + ellLabel + + + + engLabel + + + + fraLabel + + + + gleLabel + + + + hrvLabel + + + + itaLabel + + + + lavLabel + + + + litLabel + + + + hunLabel + + + + mltLabel + + + + nldLabel + + + + polLabel + + + + porLabel + + + + ronLabel + + + + slkLabel + + + + slvLabel + + + + finLabel + + + + sweLabel + + + + + + + inc + + + Accessibility criteria for persons with disabilities are included + + + Включени са критерии за достъпността за лицата с увреждания + + + Kritéria přístupnosti pro osoby s postižením jsou zahrnuta + + + Der er anvendt kriterier vedrørende adgangsmuligheder for personer med handicap + + + Zugänglichkeitskriterien für Menschen mit Behinderungen wurden berücksichtigt + + + Συμπεριλαμβάνονται κριτήρια προσβασιμότητας για τα άτομα με αναπηρίες + + + Accessibility criteria for persons with disabilities are included + + + Se incluyen criterios de accesibilidad para las personas con discapacidad + + + Lisatud on puuetega inimeste juurdepääsukriteeriumid + + + Vammaisia koskevat esteettömyysvaatimukset on otettu huomioon + + + Des critères d’accessibilité pour les personnes handicapées sont appliqués + + + Tá critéir inrochtaineachta do dhaoine faoi mhíchumas ar áireamh + + + U obzir su uzeti uvjeti pristupačnosti za osobe s invaliditetom + + + A fogyatékossággal élő személyekre vonatkozó, akadálymentesítési kritériumok be vannak építve + + + Sono compresi criteri di accessibilità per le persone con disabilità + + + Prieinamumo neįgaliesiems kriterijai įtraukti + + + Ir iekļauti kritēriji par pieejamību personām ar invaliditāti + + + Il-kriterji ta’ aċċessibbiltà għall-persuni b’diżabbiltà huma inklużi + + + Er zijn criteria opgenomen inzake de toegankelijkheid voor personen met een handicap + + + Kryteria dostępności dla osób niepełnosprawnych zostały uwzględnione + + + Os critérios de acessibilidade para as pessoas com deficiência estão incluídos + + + Sunt incluse criterii de accesibilitate pentru persoanele cu handicap + + + Kritériá prístupnosti pre osoby so zdravotným postihnutím sú zahrnuté + + + Vključeni so pogoji dostopnosti za invalidne osebe + + + Tillgänglighetskriterier för personer med funktionsnedsättning ingår + + + + + n-inc + + + Accessibility criteria for persons with disabilities are not included because the procurement is not intended for use by natural persons + + + Критерии за достъпността за лицата с увреждания не са включени, защото поръчката не е предназначена за използване от физически лица + + + Kritéria přístupnosti pro osoby s postižením nejsou zahrnuta, neboť zakázka není určena k použití fyzickými osobami + + + Der er ikke anvendt kriterier vedrørende adgangsmuligheder for personer med handicap, fordi udbuddet ikke er beregnet til at blive anvendt af fysiske personer + + + Kriterien für die Zugänglichkeit für Menschen mit Behinderungen wurden nicht berücksichtigt, da die Beschaffung nicht für die Nutzung durch natürliche Personen vorgesehen ist + + + Δεν περιλαμβάνονται κριτήρια προσβασιμότητας για τα άτομα με αναπηρίες επειδή η προμήθεια δεν προορίζεται για χρήση από φυσικά πρόσωπα + + + Accessibility criteria for persons with disabilities are not included because the procurement is not intended for use by natural persons + + + No se incluyen criterios de accesibilidad para las personas con discapacidad porque la contratación no está destinada a ser utilizada por personas físicas + + + Puuetega inimeste juurdepääsukriteeriume pole lisatud, sest hange ei ole mõeldud kasutamiseks füüsilistele isikutele + + + Vammaisia koskevia esteettömyysvaatimuksia ei ole otettu huomioon, koska hankintaa ei ole tarkoitettu luonnollisten henkilöiden käyttöön + + + Des critères d’accessibilité pour les personnes handicapées ne sont pas appliqués parce que le marché n’est pas destiné aux personnes physiques + + + Níl critéir inrochtaineachta do dhaoine faoi mhíchumas ar áireamh mar níl an soláthar beartaithe lena úsáid ag daoine nádúrtha + + + Uvjeti pristupačnosti za osobe s invaliditetom nisu uzeti u obzir jer javna nabava nije namijenjena fizičkim osobama + + + A fogyatékossággal élő személyekre vonatkozó, akadálymentesítési kritériumok nincsenek beépítve, mivel a beszerzést nem fogják természetes személyek használni + + + Non sono compresi criteri di accessibilità per le persone con disabilità perché l'oggetto dell'appalto non è destinato all'uso da parte di persone fisiche + + + Prieinamumo neįgaliesiems kriterijai neįtraukti, nes nenumatyta, kad pirkimo objektas bus naudojamas fizinių asmenų + + + Kritēriji par pieejamību personām ar invaliditāti nav iekļauti, jo iepirkums nav paredzēts fiziskām personām + + + Il-kriterji ta’ aċċessibbiltà għall-persuni b’diżabbiltà ma jkunux inklużi minħabba li l-akkwist ma jkunx maħsub għall-użu minn persuni fiżiċi + + + Er zijn geen criteria opgenomen inzake de toegankelijkheid voor personen met een handicap, omdat de aanbesteding niet bestemd is voor gebruik door natuurlijke personen + + + Kryteria dostępności dla osób niepełnosprawnych nie zostały uwzględnione, ponieważ przedmiot zamówienia nie jest przeznaczony dla osób fizycznych + + + Os critérios de acessibilidade para as pessoas com deficiência não estão incluídos porque o contrato não se destina a pessoas singulares + + + Nu sunt incluse criterii de accesibilitate pentru persoanele cu handicap, deoarece achizițiile nu sunt destinate a fi utilizate de către persoane fizice + + + Kritériá prístupnosti pre osoby so zdravotným postihnutím nie sú zahrnuté, keďže zákazka nie je určená na použitie fyzickými osobami + + + Pogoji dostopnosti za invalidne osebe niso vključeni, ker predmet javnega naročila ni namenjen temu, da bi ga uporabljale fizične osebe + + + Tillgänglighetskriterier för personer med funktionsnedsättning ingår inte eftersom upphandlingen inte är avsedd att användas av fysiska personer + + + + + n-inc-just + + + Accessibility criteria for persons with disabilities are not included with the following justification + + + Критерии за достъпността за лицата с увреждания не са включени, а обосновката е следната + + + Kritéria přístupnosti pro osoby s postižením nejsou zahrnuta s následujícím odůvodněním + + + Der er ikke anvendt kriterier vedrørende adgangsmuligheder for personer med handicap med følgende begrundelse + + + Zugänglichkeitskriterien für Menschen mit Behinderungen wurden mit folgender Begründung nicht berücksichtigt + + + Δεν περιλαμβάνονται κριτήρια προσβασιμότητας για τα άτομα με αναπηρίες με την ακόλουθη αιτιολόγηση + + + Accessibility criteria for persons with disabilities are not included with the following justification + + + No se incluyen criterios de accesibilidad para las personas con discapacidad por la siguiente justificación + + + Puuetega inimeste juurdepääsukriteeriume ei ole lisatud järgmise põhjendusega + + + Vammaisia koskevia esteettömyysvaatimuksia ei ole otettu huomioon seuraavin perustein + + + Des critères d’accessibilité pour les personnes handicapées ne sont pas appliqués avec la justification suivante + + + Níl critéir inrochtaineachta do dhaoine faoi mhíchumas ar áireamh ar na cúiseanna seo a leanas + + + Uvjeti pristupačnosti za osobe s invaliditetom nisu uzeti u obzir zbog sljedećeg obrazloženja + + + A fogyatékossággal élő személyekre vonatkozó, akadálymentesítési kritériumok nincsenek beépítve az alábbi indoklás szerint + + + Non sono compresi criteri di accessibilità per le persone con disabilità con la giustificazione seguente + + + Prieinamumo neįgaliesiems kriterijai neįtraukti dėl šių priežasčių + + + Kritēriji par pieejamību personām ar invaliditāti nav iekļauti ar šādu pamatojumu + + + Il-kriterji ta’ aċċessibbiltà għall-persuni b’diżabbiltà ma jkunux inklużi bil-ġustifikazzjoni li ġejja + + + Er zijn geen criteria opgenomen inzake de toegankelijkheid voor personen met een handicap, om de volgende reden + + + Kryteria dostępności dla osób niepełnosprawnych nie zostały uwzględnione z uwagi na poniższe uzasadnienie + + + Os critérios de acessibilidade para as pessoas com deficiência não estão incluídos, com a seguinte justificação + + + Nu sunt incluse criterii de accesibilitate pentru persoanele cu handicap, din următorul motiv + + + Kritériá prístupnosti pre osoby so zdravotným postihnutím nie sú zahrnuté s nasledujúcim odôvodnením + + + Pogoji dostopnosti za invalidne osebe niso vključeni iz naslednjih razlogov + + + Tillgänglighetskriterier för personer med funktionsnedsättning ingår inte med följande motivering + + + + diff --git a/src/test/resources/codelists/codelists.json b/src/test/resources/codelists/codelists.json new file mode 100644 index 0000000..e02661b --- /dev/null +++ b/src/test/resources/codelists/codelists.json @@ -0,0 +1,19 @@ +{ + "ublVersion" : "2.3", + "sdkVersion" : "1.6.0", + "metadataDatabase" : { + "version" : "1.6.0", + "createdOn" : "2023-02-17T12:00:00" + }, + "codelists" : [{ + "id" : "accessibility", + "filename" : "accessibility.gc", + "description" : "This table provides a list of options for the use of accessibility criteria for person with disabilities in the technical specifications within the domain of public procurement.", + "_label" : "codelist|name|accessibility" + }, { + "id" : "criterion", + "filename" : "criterion.gc", + "description" : "This table provides criteria used for public procurement procedures.", + "_label" : "codelist|name|criterion" + }] +} \ No newline at end of file diff --git a/src/test/resources/codelists/criterion.gc b/src/test/resources/codelists/criterion.gc new file mode 100644 index 0000000..da36bd7 --- /dev/null +++ b/src/test/resources/codelists/criterion.gc @@ -0,0 +1,168 @@ + + + + + Criterion + criterion + http://publications.europa.eu/resource/authority/criterion + 20210616-0 + http://publications.europa.eu/resource/dataset/criterion + + + OP + Publications Office of the European Union + + + + + Code + + + + Name + + + + bulLabel + + + + spaLabel + + + + cesLabel + + + + danLabel + + + + deuLabel + + + + estLabel + + + + ellLabel + + + + engLabel + + + + fraLabel + + + + gleLabel + + + + hrvLabel + + + + itaLabel + + + + lavLabel + + + + litLabel + + + + hunLabel + + + + mltLabel + + + + nldLabel + + + + polLabel + + + + porLabel + + + + ronLabel + + + + slkLabel + + + + slvLabel + + + + finLabel + + + + sweLabel + + + + + + + autorisation + + + For service contracts: authorisation of particular organisation needed + + + For service contracts: authorisation of particular organisation needed + + + + + aver-year-to + + + Average yearly turnover + + + Average yearly turnover + + + + + bankr-nat + + + Analogous situation like bankruptcy under national law + + + Analogous situation like bankruptcy under national law + + + + + bankruptcy + + + Bankruptcy + + + Bankruptcy + + + + diff --git a/src/test/resources/codelists/test-codelist.gc b/src/test/resources/codelists/test-codelist.gc deleted file mode 100644 index 138540e..0000000 --- a/src/test/resources/codelists/test-codelist.gc +++ /dev/null @@ -1,43 +0,0 @@ - - - - - TestCodelist - test-codelist - http://publications.europa.eu/resource/authority/test-codelist - 20220928-0 - http://publications.europa.eu/resource/dataset/test-codelist - - - OP - Publications Office of the European Union - - - - - Code - - - - Name - - - - bulLabel - - - - - - - inc - - - TestCodelist criteria for persons with disabilities are included - - - Включени са критерии за достъпността за лицата с увреждания - - - -