From 2a2747a92cb6cda047e9de9eafc8c5e4fd6d8a8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ant=C3=B3nio=20Lindo?= Date: Fri, 7 Jun 2024 17:33:46 +0100 Subject: [PATCH] wip --- .../src/main/resources/schema/XMLSchema.dtd | 112 +++++++++--------- .../resources/schema/fileIndex_original.xsd | 83 +++++++++++++ dbptk-bindings/pom.xml | 3 + .../AVID.HEX.2000.1/Indices/fileIndex.xml | 2 +- .../AVID.TST.4000.1/Indices/fileIndex.xml | 2 +- .../Schemas/standard/fileIndex.xsd | 1 + .../SIARDDKMetadataExportStrategy.java | 4 +- .../MetadataDatabaseInfoValidator.java | 3 +- 8 files changed, 148 insertions(+), 62 deletions(-) create mode 100644 dbptk-bindings/dbptk-bindings-siarddk/src/main/resources/schema/fileIndex_original.xsd diff --git a/dbptk-bindings/dbptk-bindings-siarddk/src/main/resources/schema/XMLSchema.dtd b/dbptk-bindings/dbptk-bindings-siarddk/src/main/resources/schema/XMLSchema.dtd index ebbda6ec8..adf2c738b 100644 --- a/dbptk-bindings/dbptk-bindings-siarddk/src/main/resources/schema/XMLSchema.dtd +++ b/dbptk-bindings/dbptk-bindings-siarddk/src/main/resources/schema/XMLSchema.dtd @@ -1,58 +1,58 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dbptk-bindings/dbptk-bindings-siarddk/src/main/resources/schema/fileIndex_original.xsd b/dbptk-bindings/dbptk-bindings-siarddk/src/main/resources/schema/fileIndex_original.xsd new file mode 100644 index 000000000..59b05a4c8 --- /dev/null +++ b/dbptk-bindings/dbptk-bindings-siarddk/src/main/resources/schema/fileIndex_original.xsd @@ -0,0 +1,83 @@ + + + + + + Dette skema angiver tilladte mappenavne og filnavne, men ikke hvilke filnavne, som er tilladt i hvilke mapper. Denne begrænsning skyldes ønsket om at anvende samme elementnavn 'foN' for alle mappenavne, og XML Schema tillader ikke at samme element kan være af forskellig type (Consistent Declaration Rule) + This Schema defines legal folder names and file names, but not what file names are allowed in what folders. This limitation is due to a desire to use the same element name 'foN' for all folder names, and XML Schema does not allow the same element name to belong to different types (Consistent Declaration Rule) + + + + + Indeks for alle filer i arkiveringsversionen + Index for all files in the information package + + + + + + + + + + + + + + + + Navn for en mappe i arkiveringsversionen + Name for a folder in the information package + + + + + Højst 10.000 docCollection mapper per ContextDocumentation mappe + Maximum of 10.000 docCollection folders per ContextDocumentation folder + + + + + Højst 10.000 docCollection mapper per Documents mappe + Maximum of 10.000 docCollection folders per Documents folder + + + + + + + + + + type for et filnavn i arkiveringversionen + type for a file name in the information package + + + + Små bogstaver (minuskler) for filtyper (suffix) er krævet i bekendtgørelse, men store bogstaver (versaler) er tilladt i Schemaet for at mindske behov for navneændring + Lower case is required, but upper case for the following file type extensions is accepted to reduce the needed for renaming--> + + + + + + + + + + + + + + + + + + Dette er en MD5 kontrolsum med et resultat på 128 bit svarende til 16 bytes repræsenteret som 32 hexadecimale tegn + This is a MD5 checksum with a result of 128 bit equalt to 16 bytes represented as 32 characters in hexadecimal + + + + + + diff --git a/dbptk-bindings/pom.xml b/dbptk-bindings/pom.xml index f596e0826..1de447ecd 100644 --- a/dbptk-bindings/pom.xml +++ b/dbptk-bindings/pom.xml @@ -41,8 +41,11 @@ ${basedir}/src/main/resources/schema + archiveIndex.xsd docIndex.xsd + fileIndex.xsd + XMLSchema.xsd tableIndex.xsd siard2-1-metadata.xsd siard2-0-metadata.xsd diff --git a/dbptk-core/src/test/resources/siarddk/AVID.HEX.2000.1/Indices/fileIndex.xml b/dbptk-core/src/test/resources/siarddk/AVID.HEX.2000.1/Indices/fileIndex.xml index eeecd6209..01c4bd5c9 100644 --- a/dbptk-core/src/test/resources/siarddk/AVID.HEX.2000.1/Indices/fileIndex.xml +++ b/dbptk-core/src/test/resources/siarddk/AVID.HEX.2000.1/Indices/fileIndex.xml @@ -23,7 +23,7 @@ AVID.HEX.2000.1\Schemas\standard fileIndex.xsd - BC828D70D073029CE8C5FDBC6651C4F3 + 143BEC3B0E6D43E52B539F2CCD0B7A68 AVID.HEX.2000.1\Schemas\standard diff --git a/dbptk-core/src/test/resources/siarddk/AVID.TST.4000.1/Indices/fileIndex.xml b/dbptk-core/src/test/resources/siarddk/AVID.TST.4000.1/Indices/fileIndex.xml index f9fc40f9d..6404e015a 100644 --- a/dbptk-core/src/test/resources/siarddk/AVID.TST.4000.1/Indices/fileIndex.xml +++ b/dbptk-core/src/test/resources/siarddk/AVID.TST.4000.1/Indices/fileIndex.xml @@ -23,7 +23,7 @@ AVID.TST.4000.1\Schemas\standard fileIndex.xsd - D41D8CD98F00B204E9800998ECF8427E + 143BEC3B0E6D43E52B539F2CCD0B7A68 AVID.TST.4000.1\Schemas\standard diff --git a/dbptk-core/src/test/resources/siarddk/AVID.TST.4000.1/Schemas/standard/fileIndex.xsd b/dbptk-core/src/test/resources/siarddk/AVID.TST.4000.1/Schemas/standard/fileIndex.xsd index 59b05a4c8..fa4d9cfd7 100644 --- a/dbptk-core/src/test/resources/siarddk/AVID.TST.4000.1/Schemas/standard/fileIndex.xsd +++ b/dbptk-core/src/test/resources/siarddk/AVID.TST.4000.1/Schemas/standard/fileIndex.xsd @@ -68,6 +68,7 @@ + diff --git a/dbptk-modules/dbptk-module-siard/src/main/java/com/databasepreservation/modules/siard/out/metadata/SIARDDKMetadataExportStrategy.java b/dbptk-modules/dbptk-module-siard/src/main/java/com/databasepreservation/modules/siard/out/metadata/SIARDDKMetadataExportStrategy.java index 426422fd6..37d49205a 100644 --- a/dbptk-modules/dbptk-module-siard/src/main/java/com/databasepreservation/modules/siard/out/metadata/SIARDDKMetadataExportStrategy.java +++ b/dbptk-modules/dbptk-module-siard/src/main/java/com/databasepreservation/modules/siard/out/metadata/SIARDDKMetadataExportStrategy.java @@ -151,9 +151,9 @@ public void writeMetadataXSD(DatabaseStructure dbStructure, SIARDArchiveContaine writeSchemaFile(outputContainer, SIARDDKConstants.TABLE_INDEX, writeStrategy); writeSchemaFile(outputContainer, SIARDDKConstants.ARCHIVE_INDEX, writeStrategy); writeSchemaFile(outputContainer, SIARDDKConstants.CONTEXT_DOCUMENTATION_INDEX, writeStrategy); - writeSchemaFile(outputContainer, SIARDDKConstants.FILE_INDEX + "_original", writeStrategy); + writeSchemaFile(outputContainer, SIARDDKConstants.FILE_INDEX, writeStrategy); if (lobsTracker.getLOBsCount() > 0) { - writeSchemaFile(outputContainer, SIARDDKConstants.DOC_INDEX + "_original", writeStrategy); + writeSchemaFile(outputContainer, SIARDDKConstants.DOC_INDEX, writeStrategy); } } diff --git a/dbptk-modules/dbptk-module-siard/src/main/java/com/databasepreservation/modules/siard/validate/component/metadata/MetadataDatabaseInfoValidator.java b/dbptk-modules/dbptk-module-siard/src/main/java/com/databasepreservation/modules/siard/validate/component/metadata/MetadataDatabaseInfoValidator.java index 3ec3d5764..6ba1888d3 100644 --- a/dbptk-modules/dbptk-module-siard/src/main/java/com/databasepreservation/modules/siard/validate/component/metadata/MetadataDatabaseInfoValidator.java +++ b/dbptk-modules/dbptk-module-siard/src/main/java/com/databasepreservation/modules/siard/validate/component/metadata/MetadataDatabaseInfoValidator.java @@ -209,12 +209,11 @@ private boolean validateSIARDVersion(String version) { switch (version) { case "2.0": case "2.1": - case "2.2": case "DK": case "1.0": break; default: - addWarning(A_M_511_1, "The version of SIARD should be 1.0, DK, 2.0, 2.1 or 2.2. Found: " + version, + addWarning(A_M_511_1, "The version of SIARD should be 1.0, DK, 2.0 or 2.1. Found: " + version, "siardArchive"); } }