From 1d38000fb50dd6fcd095836a0d4728df42c36cd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Tellnes?= Date: Thu, 3 Oct 2024 16:07:41 +0200 Subject: [PATCH 01/13] Write current time to CREATEDATE and extraction date to VERSDATE in METS ARKADE-758 --- .../Metadata/DiasMetsCreator.cs | 11 +++++++---- .../Metadata/SubmissionDescriptionCreator.cs | 13 ++++++++----- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/Arkivverket.Arkade.Core/Metadata/DiasMetsCreator.cs b/src/Arkivverket.Arkade.Core/Metadata/DiasMetsCreator.cs index e4c9b04f..1da03d3d 100644 --- a/src/Arkivverket.Arkade.Core/Metadata/DiasMetsCreator.cs +++ b/src/Arkivverket.Arkade.Core/Metadata/DiasMetsCreator.cs @@ -135,10 +135,7 @@ private static void CreateMetsElementAttributes(mets mets, ArchiveMetadata metad private static void CreateMetsHdr(mets mets, ArchiveMetadata metadata) { - var metsHdr = new metsTypeMetsHdr(); - - if (metadata.ExtractionDate != null) - metsHdr.CREATEDATE = metadata.ExtractionDate.Value; + var metsHdr = new metsTypeMetsHdr { CREATEDATE = DateTime.Now }; if (!string.IsNullOrEmpty(metadata.RecordStatus)) metsHdr.RECORDSTATUS = metadata.RecordStatus; @@ -521,6 +518,12 @@ private static void CreateFileSec(mets mets, ArchiveMetadata metadata) Items = metsFiles.ToArray() }; + if (metadata.ExtractionDate.HasValue) + { + metsTypeFileSecFileGrp.VERSDATESpecified = true; + metsTypeFileSecFileGrp.VERSDATE = metadata.ExtractionDate.Value; + } + mets.fileSec = new metsTypeFileSec { fileGrp = new[] { metsTypeFileSecFileGrp } }; } diff --git a/src/Arkivverket.Arkade.Core/Metadata/SubmissionDescriptionCreator.cs b/src/Arkivverket.Arkade.Core/Metadata/SubmissionDescriptionCreator.cs index 2c990c5d..47771809 100644 --- a/src/Arkivverket.Arkade.Core/Metadata/SubmissionDescriptionCreator.cs +++ b/src/Arkivverket.Arkade.Core/Metadata/SubmissionDescriptionCreator.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -103,10 +103,7 @@ private static void CreateMetsElementAttributes(mets mets, ArchiveMetadata metad private static void CreateMetsHdr(mets mets, ArchiveMetadata metadata) { - var metsHdr = new metsTypeMetsHdr(); - - if (metadata.ExtractionDate != null) - metsHdr.CREATEDATE = (DateTime)metadata.ExtractionDate; + var metsHdr = new metsTypeMetsHdr { CREATEDATE = DateTime.Now }; if (!string.IsNullOrEmpty(metadata.RecordStatus) && Enum.TryParse(metadata.RecordStatus, out metsTypeMetsHdrRECORDSTATUS recordStatus)) @@ -495,6 +492,12 @@ private static void CreateFileSec(mets mets, ArchiveMetadata metadata) Items = metsFiles.ToArray() }; + if (metadata.ExtractionDate.HasValue) + { + metsTypeFileSecFileGrp.VERSDATESpecified = true; + metsTypeFileSecFileGrp.VERSDATE = metadata.ExtractionDate.Value; + } + mets.fileSec = new metsTypeFileSec { fileGrp = new[] { metsTypeFileSecFileGrp } }; } From f9574e7cda02d0c4cd1c68be353c9c595596a0c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Tellnes?= Date: Mon, 14 Oct 2024 15:41:04 +0200 Subject: [PATCH 02/13] Git ignore directory for Visual Studio extension ContextKeeper --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 3f63913a..47cfbd27 100644 --- a/.gitignore +++ b/.gitignore @@ -254,3 +254,5 @@ paket-files/ # Local launch settings launchSettings.json +# Directory for Visual Studio extension ContextKeeper +.contextkeeper/ From d9f404619360497c9fad55a30cf73a3fd25e42ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Tellnes?= Date: Mon, 11 Nov 2024 17:51:22 +0100 Subject: [PATCH 03/13] Remove conditional access in unit tests --- .../Metadata/DiasMetsCreatorTest.cs | 22 ++++++++--------- .../SubmissionDescriptionCreatorTest.cs | 24 +++++++++---------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/Arkivverket.Arkade.Core.Tests/Metadata/DiasMetsCreatorTest.cs b/src/Arkivverket.Arkade.Core.Tests/Metadata/DiasMetsCreatorTest.cs index c839b50a..900d5290 100644 --- a/src/Arkivverket.Arkade.Core.Tests/Metadata/DiasMetsCreatorTest.cs +++ b/src/Arkivverket.Arkade.Core.Tests/Metadata/DiasMetsCreatorTest.cs @@ -288,17 +288,17 @@ public void ShouldCreateMetsFromMetadata() var metsFile = mets.fileSec.fileGrp[0].Items[0] as fileType; - metsFile?.ID.Should().Be("fileId_1"); - metsFile?.MIMETYPE.Should().Be(mdSecTypeMdRefMIMETYPE.imagepdf); - metsFile?.USE.Should().Be("Datafile"); - metsFile?.CHECKSUMTYPE.Should().Be(mdSecTypeMdRefCHECKSUMTYPE.SHA256); - metsFile?.CHECKSUM.Should().Be("3b29dfcc4286e50b180af8f21904c86f8aa42a23c4055c3a71d0512f9ae3886f"); - metsFile?.SIZE.Should().Be(2325452); - metsFile?.CREATED.Year.Should().Be(2017); - metsFile?.CREATED.Month.Should().Be(06); - metsFile?.CREATED.Day.Should().Be(30); - metsFile?.FLocat.href.Should().Be("file:someDirectory/someFileName.pdf"); - metsFile?.FLocat.LOCTYPE.Should().Be(mdSecTypeMdRefLOCTYPE.URL); + metsFile.ID.Should().Be("fileId_1"); + metsFile.MIMETYPE.Should().Be(mdSecTypeMdRefMIMETYPE.imagepdf); + metsFile.USE.Should().Be("Datafile"); + metsFile.CHECKSUMTYPE.Should().Be(mdSecTypeMdRefCHECKSUMTYPE.SHA256); + metsFile.CHECKSUM.Should().Be("3b29dfcc4286e50b180af8f21904c86f8aa42a23c4055c3a71d0512f9ae3886f"); + metsFile.SIZE.Should().Be(2325452); + metsFile.CREATED.Year.Should().Be(2017); + metsFile.CREATED.Month.Should().Be(06); + metsFile.CREATED.Day.Should().Be(30); + metsFile.FLocat.href.Should().Be("file:someDirectory/someFileName.pdf"); + metsFile.FLocat.LOCTYPE.Should().Be(mdSecTypeMdRefLOCTYPE.URL); // PACKAGE TYPE diff --git a/src/Arkivverket.Arkade.Core.Tests/Metadata/SubmissionDescriptionCreatorTest.cs b/src/Arkivverket.Arkade.Core.Tests/Metadata/SubmissionDescriptionCreatorTest.cs index 67aa7dd6..05dc4ed8 100644 --- a/src/Arkivverket.Arkade.Core.Tests/Metadata/SubmissionDescriptionCreatorTest.cs +++ b/src/Arkivverket.Arkade.Core.Tests/Metadata/SubmissionDescriptionCreatorTest.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using Arkivverket.Arkade.Core.ExternalModels.SubmissionDescription; using Arkivverket.Arkade.Core.Metadata; @@ -241,17 +241,17 @@ public void ShouldCreateMetsFromMetadata() var metsFile = mets.fileSec.fileGrp[0].Items[0] as fileType; - metsFile?.ID.Should().Be("fileId_1"); - metsFile?.MIMETYPE.Should().Be("application/pdf"); - metsFile?.USE.Should().Be("Datafile"); - metsFile?.CHECKSUMTYPE.Should().Be(fileTypeCHECKSUMTYPE.SHA256); - metsFile?.CHECKSUM.Should().Be("3b29dfcc4286e50b180af8f21904c86f8aa42a23c4055c3a71d0512f9ae3886f"); - metsFile?.SIZE.Should().Be(2325452); - metsFile?.CREATED.Year.Should().Be(2017); - metsFile?.CREATED.Month.Should().Be(06); - metsFile?.CREATED.Day.Should().Be(30); - metsFile?.FLocat.href.Should().Be("file:someDirectory/someFileName.pdf"); - metsFile?.FLocat.LOCTYPE.Should().Be(mdSecTypeMdRefLOCTYPE.URL); + metsFile.ID.Should().Be("fileId_1"); + metsFile.MIMETYPE.Should().Be("application/pdf"); + metsFile.USE.Should().Be("Datafile"); + metsFile.CHECKSUMTYPE.Should().Be(fileTypeCHECKSUMTYPE.SHA256); + metsFile.CHECKSUM.Should().Be("3b29dfcc4286e50b180af8f21904c86f8aa42a23c4055c3a71d0512f9ae3886f"); + metsFile.SIZE.Should().Be(2325452); + metsFile.CREATED.Year.Should().Be(2017); + metsFile.CREATED.Month.Should().Be(06); + metsFile.CREATED.Day.Should().Be(30); + metsFile.FLocat.href.Should().Be("file:someDirectory/someFileName.pdf"); + metsFile.FLocat.LOCTYPE.Should().Be(mdSecTypeMdRefLOCTYPE.URL); // PACKAGE TYPE From 70fea435d62abfe5511d68f3f5f84b4fe86e74c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Tellnes?= Date: Mon, 11 Nov 2024 19:39:29 +0100 Subject: [PATCH 04/13] Revert "Write current time to CREATEDATE and extraction date to VERSDATE in METS" This reverts commit 1d38000fb50dd6fcd095836a0d4728df42c36cd7. --- .../Metadata/DiasMetsCreator.cs | 11 ++++------- .../Metadata/SubmissionDescriptionCreator.cs | 13 +++++-------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/src/Arkivverket.Arkade.Core/Metadata/DiasMetsCreator.cs b/src/Arkivverket.Arkade.Core/Metadata/DiasMetsCreator.cs index 1da03d3d..e4c9b04f 100644 --- a/src/Arkivverket.Arkade.Core/Metadata/DiasMetsCreator.cs +++ b/src/Arkivverket.Arkade.Core/Metadata/DiasMetsCreator.cs @@ -135,7 +135,10 @@ private static void CreateMetsElementAttributes(mets mets, ArchiveMetadata metad private static void CreateMetsHdr(mets mets, ArchiveMetadata metadata) { - var metsHdr = new metsTypeMetsHdr { CREATEDATE = DateTime.Now }; + var metsHdr = new metsTypeMetsHdr(); + + if (metadata.ExtractionDate != null) + metsHdr.CREATEDATE = metadata.ExtractionDate.Value; if (!string.IsNullOrEmpty(metadata.RecordStatus)) metsHdr.RECORDSTATUS = metadata.RecordStatus; @@ -518,12 +521,6 @@ private static void CreateFileSec(mets mets, ArchiveMetadata metadata) Items = metsFiles.ToArray() }; - if (metadata.ExtractionDate.HasValue) - { - metsTypeFileSecFileGrp.VERSDATESpecified = true; - metsTypeFileSecFileGrp.VERSDATE = metadata.ExtractionDate.Value; - } - mets.fileSec = new metsTypeFileSec { fileGrp = new[] { metsTypeFileSecFileGrp } }; } diff --git a/src/Arkivverket.Arkade.Core/Metadata/SubmissionDescriptionCreator.cs b/src/Arkivverket.Arkade.Core/Metadata/SubmissionDescriptionCreator.cs index 47771809..2c990c5d 100644 --- a/src/Arkivverket.Arkade.Core/Metadata/SubmissionDescriptionCreator.cs +++ b/src/Arkivverket.Arkade.Core/Metadata/SubmissionDescriptionCreator.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -103,7 +103,10 @@ private static void CreateMetsElementAttributes(mets mets, ArchiveMetadata metad private static void CreateMetsHdr(mets mets, ArchiveMetadata metadata) { - var metsHdr = new metsTypeMetsHdr { CREATEDATE = DateTime.Now }; + var metsHdr = new metsTypeMetsHdr(); + + if (metadata.ExtractionDate != null) + metsHdr.CREATEDATE = (DateTime)metadata.ExtractionDate; if (!string.IsNullOrEmpty(metadata.RecordStatus) && Enum.TryParse(metadata.RecordStatus, out metsTypeMetsHdrRECORDSTATUS recordStatus)) @@ -492,12 +495,6 @@ private static void CreateFileSec(mets mets, ArchiveMetadata metadata) Items = metsFiles.ToArray() }; - if (metadata.ExtractionDate.HasValue) - { - metsTypeFileSecFileGrp.VERSDATESpecified = true; - metsTypeFileSecFileGrp.VERSDATE = metadata.ExtractionDate.Value; - } - mets.fileSec = new metsTypeFileSec { fileGrp = new[] { metsTypeFileSecFileGrp } }; } From c689c9f28009c3676fe7eeaceab06bd9730e13f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Tellnes?= Date: Wed, 20 Nov 2024 14:23:05 +0100 Subject: [PATCH 05/13] Correctly handle archive extraction dates and CREATEDATE values in METS ARKADE-758 --- .../Metadata/DiasMetsCreatorTest.cs | 17 ++++++++-- .../Metadata/DiasMetsLoaderTest.cs | 2 +- .../SubmissionDescriptionCreatorTest.cs | 6 ++-- .../SubmissionDescriptionLoaderTest.cs | 2 +- .../Metadata/DiasMetsLoader/dias-mets.xml | 20 ++++++----- .../Metadata/DiasMetsCreator.cs | 32 ++++++++++++----- .../Metadata/DiasMetsLoader.cs | 34 +++++++++++++++++-- .../Metadata/MetadataExampleCreator.cs | 15 ++++++-- .../Metadata/SubmissionDescriptionCreator.cs | 10 ++---- .../Metadata/SubmmissionDescriptionLoader.cs | 2 -- .../Util/ArkadeConstants.cs | 1 + src/Arkivverket.Arkade.sln.DotSettings | 3 +- 12 files changed, 104 insertions(+), 40 deletions(-) diff --git a/src/Arkivverket.Arkade.Core.Tests/Metadata/DiasMetsCreatorTest.cs b/src/Arkivverket.Arkade.Core.Tests/Metadata/DiasMetsCreatorTest.cs index 900d5290..c50dc017 100644 --- a/src/Arkivverket.Arkade.Core.Tests/Metadata/DiasMetsCreatorTest.cs +++ b/src/Arkivverket.Arkade.Core.Tests/Metadata/DiasMetsCreatorTest.cs @@ -111,7 +111,7 @@ public void ShouldCreateMetsFromMetadata() // CREATEDATE: - metsHdr.CREATEDATE.Should().Be(new DateTime(2023, 01, 01)); + metsHdr.CREATEDATE.Should().BeCloseTo(DateTime.Now, TimeSpan.FromSeconds(30)); // ARCHIVEDESCRIPTION: @@ -289,7 +289,7 @@ public void ShouldCreateMetsFromMetadata() var metsFile = mets.fileSec.fileGrp[0].Items[0] as fileType; metsFile.ID.Should().Be("fileId_1"); - metsFile.MIMETYPE.Should().Be(mdSecTypeMdRefMIMETYPE.imagepdf); + metsFile.MIMETYPE.Should().Be(mdSecTypeMdRefMIMETYPE.applicationxml); metsFile.USE.Should().Be("Datafile"); metsFile.CHECKSUMTYPE.Should().Be(mdSecTypeMdRefCHECKSUMTYPE.SHA256); metsFile.CHECKSUM.Should().Be("3b29dfcc4286e50b180af8f21904c86f8aa42a23c4055c3a71d0512f9ae3886f"); @@ -297,9 +297,20 @@ public void ShouldCreateMetsFromMetadata() metsFile.CREATED.Year.Should().Be(2017); metsFile.CREATED.Month.Should().Be(06); metsFile.CREATED.Day.Should().Be(30); - metsFile.FLocat.href.Should().Be("file:someDirectory/someFileName.pdf"); + metsFile.FLocat.href.Should().Be("file:someFileName.xml"); metsFile.FLocat.LOCTYPE.Should().Be(mdSecTypeMdRefLOCTYPE.URL); + var metsArchiveExtractionFileGroup = mets.fileSec.fileGrp[0].Items[1] as fileGrpType; + + metsArchiveExtractionFileGroup!.USE.Should().BeEquivalentTo(ArkadeConstants.MetsArchiveExtractionFileGroupUse); + metsArchiveExtractionFileGroup.VERSDATESpecified.Should().BeTrue(); + metsArchiveExtractionFileGroup.VERSDATE.Should().Be(new DateTime(2022, 01, 01)); + + var metsArchiveExtractionFile = metsArchiveExtractionFileGroup.Items[0] as fileType; + + metsArchiveExtractionFile!.ID.Should().Be("fileId_2"); + metsArchiveExtractionFile.FLocat.href.Should().Be($"file:{ArkadeConstants.DirectoryNameContent}/someFileName.xml"); + // PACKAGE TYPE mets.TYPE.Should().Be(metsTypeTYPE.SIP); diff --git a/src/Arkivverket.Arkade.Core.Tests/Metadata/DiasMetsLoaderTest.cs b/src/Arkivverket.Arkade.Core.Tests/Metadata/DiasMetsLoaderTest.cs index eb6590ec..d54ff1b2 100644 --- a/src/Arkivverket.Arkade.Core.Tests/Metadata/DiasMetsLoaderTest.cs +++ b/src/Arkivverket.Arkade.Core.Tests/Metadata/DiasMetsLoaderTest.cs @@ -80,7 +80,7 @@ public void DiasMetsIsSuccessfullyLoadedIntoArchiveMetadataObject() archiveMetadata.StartDate.Should().Be(new DateTime(2017, 01, 01)); archiveMetadata.EndDate.Should().Be(new DateTime(2020, 01, 01)); - archiveMetadata.ExtractionDate.Should().Be(new DateTime(2023, 01, 01)); + archiveMetadata.ExtractionDate.Should().Be(new DateTime(2022, 01, 01)); } } } diff --git a/src/Arkivverket.Arkade.Core.Tests/Metadata/SubmissionDescriptionCreatorTest.cs b/src/Arkivverket.Arkade.Core.Tests/Metadata/SubmissionDescriptionCreatorTest.cs index 05dc4ed8..bc49b191 100644 --- a/src/Arkivverket.Arkade.Core.Tests/Metadata/SubmissionDescriptionCreatorTest.cs +++ b/src/Arkivverket.Arkade.Core.Tests/Metadata/SubmissionDescriptionCreatorTest.cs @@ -64,7 +64,7 @@ public void ShouldCreateMetsFromMetadata() // CREATEDATE: - metsHdr.CREATEDATE.Should().Be(new DateTime(2023, 01, 01)); + metsHdr.CREATEDATE.Should().BeCloseTo(DateTime.Now, TimeSpan.FromSeconds(30)); // ARCHIVEDESCRIPTION: @@ -242,7 +242,7 @@ public void ShouldCreateMetsFromMetadata() var metsFile = mets.fileSec.fileGrp[0].Items[0] as fileType; metsFile.ID.Should().Be("fileId_1"); - metsFile.MIMETYPE.Should().Be("application/pdf"); + metsFile.MIMETYPE.Should().Be("application/xml"); metsFile.USE.Should().Be("Datafile"); metsFile.CHECKSUMTYPE.Should().Be(fileTypeCHECKSUMTYPE.SHA256); metsFile.CHECKSUM.Should().Be("3b29dfcc4286e50b180af8f21904c86f8aa42a23c4055c3a71d0512f9ae3886f"); @@ -250,7 +250,7 @@ public void ShouldCreateMetsFromMetadata() metsFile.CREATED.Year.Should().Be(2017); metsFile.CREATED.Month.Should().Be(06); metsFile.CREATED.Day.Should().Be(30); - metsFile.FLocat.href.Should().Be("file:someDirectory/someFileName.pdf"); + metsFile.FLocat.href.Should().Be("file:someFileName.xml"); metsFile.FLocat.LOCTYPE.Should().Be(mdSecTypeMdRefLOCTYPE.URL); // PACKAGE TYPE diff --git a/src/Arkivverket.Arkade.Core.Tests/Metadata/SubmissionDescriptionLoaderTest.cs b/src/Arkivverket.Arkade.Core.Tests/Metadata/SubmissionDescriptionLoaderTest.cs index 13089ab1..be5116de 100644 --- a/src/Arkivverket.Arkade.Core.Tests/Metadata/SubmissionDescriptionLoaderTest.cs +++ b/src/Arkivverket.Arkade.Core.Tests/Metadata/SubmissionDescriptionLoaderTest.cs @@ -95,7 +95,7 @@ public void DiasMetsIsSuccessfullyLoadedIntoArchiveMetadataObject() archiveMetadata.StartDate.Should().Be(new DateTime(2017, 01, 01)); archiveMetadata.EndDate.Should().Be(new DateTime(2020, 01, 01)); - archiveMetadata.ExtractionDate.Should().Be(new DateTime(2023, 01, 01)); + archiveMetadata.ExtractionDate.Should().NotHaveValue(); } } } diff --git a/src/Arkivverket.Arkade.Core.Tests/TestData/Metadata/DiasMetsLoader/dias-mets.xml b/src/Arkivverket.Arkade.Core.Tests/TestData/Metadata/DiasMetsLoader/dias-mets.xml index 0cdb39b9..3c07cf1f 100644 --- a/src/Arkivverket.Arkade.Core.Tests/TestData/Metadata/DiasMetsLoader/dias-mets.xml +++ b/src/Arkivverket.Arkade.Core.Tests/TestData/Metadata/DiasMetsLoader/dias-mets.xml @@ -69,15 +69,17 @@ - - - - - - - - - + + + + + + + + + + + diff --git a/src/Arkivverket.Arkade.Core/Metadata/DiasMetsCreator.cs b/src/Arkivverket.Arkade.Core/Metadata/DiasMetsCreator.cs index e4c9b04f..cc9bae96 100644 --- a/src/Arkivverket.Arkade.Core/Metadata/DiasMetsCreator.cs +++ b/src/Arkivverket.Arkade.Core/Metadata/DiasMetsCreator.cs @@ -135,10 +135,7 @@ private static void CreateMetsElementAttributes(mets mets, ArchiveMetadata metad private static void CreateMetsHdr(mets mets, ArchiveMetadata metadata) { - var metsHdr = new metsTypeMetsHdr(); - - if (metadata.ExtractionDate != null) - metsHdr.CREATEDATE = metadata.ExtractionDate.Value; + var metsHdr = new metsTypeMetsHdr { CREATEDATE = DateTime.Now }; if (!string.IsNullOrEmpty(metadata.RecordStatus)) metsHdr.RECORDSTATUS = metadata.RecordStatus; @@ -149,8 +146,7 @@ private static void CreateMetsHdr(mets mets, ArchiveMetadata metadata) CreateHdrAgents(metsHdr, metadata); - if (metadata.ExtractionDate != null || metsHdr.altRecordID != null || metsHdr.agent != null) - mets.metsHdr = metsHdr; + mets.metsHdr = metsHdr; } private static void CreateAltRecordIDs(metsTypeMetsHdr metsHdr, ArchiveMetadata metadata) @@ -494,10 +490,11 @@ private static void CreateFileSec(mets mets, ArchiveMetadata metadata) return; var metsFiles = new List(); + var metsArchiveExtractionFiles = new List(); foreach (FileDescription fileDescription in metadata.FileDescriptions) { - metsFiles.Add(new fileType + var metsFile = new fileType { ID = $"fileId_{fileDescription.Id}", MIMETYPE = MimeTypeParser(fileDescription), @@ -511,9 +508,28 @@ private static void CreateFileSec(mets mets, ArchiveMetadata metadata) href = "file:" + fileDescription.Name.Replace("\\", "/"), LOCTYPE = mdSecTypeMdRefLOCTYPE.URL } - }); + }; + + if (fileDescription.Name.StartsWith(ArkadeConstants.DirectoryNameContent)) + metsArchiveExtractionFiles.Add(metsFile); + else + metsFiles.Add(metsFile); } + var archiveExtractionFileGroup = new fileGrpType + { + USE = ArkadeConstants.MetsArchiveExtractionFileGroupUse, + Items = metsArchiveExtractionFiles.ToArray() + }; + + if (metadata.ExtractionDate.HasValue) + { + archiveExtractionFileGroup.VERSDATESpecified = true; + archiveExtractionFileGroup.VERSDATE = metadata.ExtractionDate.Value; + } + + metsFiles.Add(archiveExtractionFileGroup); + var metsTypeFileSecFileGrp = new metsTypeFileSecFileGrp { ID = "fileGroup001", diff --git a/src/Arkivverket.Arkade.Core/Metadata/DiasMetsLoader.cs b/src/Arkivverket.Arkade.Core/Metadata/DiasMetsLoader.cs index 79a493e3..e87f9b7c 100644 --- a/src/Arkivverket.Arkade.Core/Metadata/DiasMetsLoader.cs +++ b/src/Arkivverket.Arkade.Core/Metadata/DiasMetsLoader.cs @@ -20,11 +20,43 @@ public static ArchiveMetadata Load(string diasMetsFile) if (mets.metsHdr != null) LoadMetsHdr(archiveMetadata, mets.metsHdr); + LoadExtractionDate(archiveMetadata, mets.fileSec.fileGrp); + MetadataLoader.HandleLabelPlaceholder(archiveMetadata); return archiveMetadata; } + private static void LoadExtractionDate(ArchiveMetadata archiveMetadata, IEnumerable fileGroups) + { + foreach (fileGrpType fileGroup in fileGroups) + { + if (fileGroup.USE != null && IsParsedAsArchiveExtraction(fileGroup.USE) && fileGroup.VERSDATESpecified) + { + archiveMetadata.ExtractionDate = fileGroup.VERSDATE; + return; + } + + var subFileGroups = new List(); + + foreach (object fileGroupItem in fileGroup.Items) + { + if (fileGroupItem is fileGrpType subFileGroup) + { + subFileGroups.Add(subFileGroup); + } + } + + LoadExtractionDate(archiveMetadata, subFileGroups); + } + + return; + + bool IsParsedAsArchiveExtraction(string fileGroupUse) => + string.Equals(fileGroupUse.Replace(" ", string.Empty).Replace("-", string.Empty), + ArkadeConstants.MetsArchiveExtractionFileGroupUse, StringComparison.OrdinalIgnoreCase); + } + private static void LoadMetsElementAttributes(ArchiveMetadata archiveMetadata, mets mets) { archiveMetadata.Label = mets.LABEL; @@ -32,8 +64,6 @@ private static void LoadMetsElementAttributes(ArchiveMetadata archiveMetadata, m private static void LoadMetsHdr(ArchiveMetadata archiveMetadata, metsTypeMetsHdr metsHdr) { - archiveMetadata.ExtractionDate = metsHdr.CREATEDATE; - archiveMetadata.RecordStatus = metsHdr.RECORDSTATUS; if (metsHdr.altRecordID != null) diff --git a/src/Arkivverket.Arkade.Core/Metadata/MetadataExampleCreator.cs b/src/Arkivverket.Arkade.Core/Metadata/MetadataExampleCreator.cs index d4c9ae7b..1017800b 100644 --- a/src/Arkivverket.Arkade.Core/Metadata/MetadataExampleCreator.cs +++ b/src/Arkivverket.Arkade.Core/Metadata/MetadataExampleCreator.cs @@ -60,16 +60,25 @@ public static ArchiveMetadata Create(MetadataExamplePurpose purpose) new FileDescription { Id = 1, - Name = "someDirectory\\someFileName.pdf", - Extension = "pdf", + Name = "someFileName.xml", + Extension = "xml", Sha256Checksum = "3B29DFCC4286E50B180AF8F21904C86F8AA42A23C4055C3A71D0512F9AE3886F", Size = 2325452, ModifiedTime = new DateTime(2017, 06, 30) + }, + new FileDescription + { + Id = 2, + Name = "content\\someFileName.xml", + Extension = "xml", + Sha256Checksum = "000CDCA105BD9722759FF81BCB2977E09E6A9A473735CCC540866989444198A2", + Size = 2427358, + ModifiedTime = new DateTime(2017, 06, 30) } }, StartDate = new DateTime(2017, 01, 01), EndDate = new DateTime(2020, 01, 01), - ExtractionDate = new DateTime(2023, 01, 01), + ExtractionDate = new DateTime(2022, 01, 01), }; if (purpose == MetadataExamplePurpose.UserExample) diff --git a/src/Arkivverket.Arkade.Core/Metadata/SubmissionDescriptionCreator.cs b/src/Arkivverket.Arkade.Core/Metadata/SubmissionDescriptionCreator.cs index 2c990c5d..b32f71a8 100644 --- a/src/Arkivverket.Arkade.Core/Metadata/SubmissionDescriptionCreator.cs +++ b/src/Arkivverket.Arkade.Core/Metadata/SubmissionDescriptionCreator.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -103,10 +103,7 @@ private static void CreateMetsElementAttributes(mets mets, ArchiveMetadata metad private static void CreateMetsHdr(mets mets, ArchiveMetadata metadata) { - var metsHdr = new metsTypeMetsHdr(); - - if (metadata.ExtractionDate != null) - metsHdr.CREATEDATE = (DateTime)metadata.ExtractionDate; + var metsHdr = new metsTypeMetsHdr { CREATEDATE = DateTime.Now }; if (!string.IsNullOrEmpty(metadata.RecordStatus) && Enum.TryParse(metadata.RecordStatus, out metsTypeMetsHdrRECORDSTATUS recordStatus)) @@ -119,8 +116,7 @@ private static void CreateMetsHdr(mets mets, ArchiveMetadata metadata) CreateHdrAgents(metsHdr, metadata); - if (metadata.ExtractionDate != null || metsHdr.altRecordID != null || metsHdr.agent != null) - mets.metsHdr = metsHdr; + mets.metsHdr = metsHdr; } private static void CreateAltRecordIDs(metsTypeMetsHdr metsHdr, ArchiveMetadata metadata) diff --git a/src/Arkivverket.Arkade.Core/Metadata/SubmmissionDescriptionLoader.cs b/src/Arkivverket.Arkade.Core/Metadata/SubmmissionDescriptionLoader.cs index e0de3332..9c11fa6d 100644 --- a/src/Arkivverket.Arkade.Core/Metadata/SubmmissionDescriptionLoader.cs +++ b/src/Arkivverket.Arkade.Core/Metadata/SubmmissionDescriptionLoader.cs @@ -32,8 +32,6 @@ private static void LoadMetsElementAttributes(ArchiveMetadata archiveMetadata, m private static void LoadMetsHdr(ArchiveMetadata archiveMetadata, metsTypeMetsHdr metsHdr) { - archiveMetadata.ExtractionDate = metsHdr.CREATEDATE; - if (metsHdr.altRecordID != null) LoadMetsHdrAltRecordIDs(archiveMetadata, metsHdr.altRecordID); diff --git a/src/Arkivverket.Arkade.Core/Util/ArkadeConstants.cs b/src/Arkivverket.Arkade.Core/Util/ArkadeConstants.cs index a72e9613..d928fce5 100644 --- a/src/Arkivverket.Arkade.Core/Util/ArkadeConstants.cs +++ b/src/Arkivverket.Arkade.Core/Util/ArkadeConstants.cs @@ -80,6 +80,7 @@ public class ArkadeConstants public const string MetadataStandardLabelPlaceholder = "[standard_label]"; public const string MetsHdrAgentMetaNoteKeyWord = "notescontent:"; + public const string MetsArchiveExtractionFileGroupUse = "ArchiveExtraction"; public const string ArkadeWebSiteUrl = "https://arkade.arkivverket.no"; diff --git a/src/Arkivverket.Arkade.sln.DotSettings b/src/Arkivverket.Arkade.sln.DotSettings index 7efd7476..158a890b 100644 --- a/src/Arkivverket.Arkade.sln.DotSettings +++ b/src/Arkivverket.Arkade.sln.DotSettings @@ -1,4 +1,4 @@ - + Required Required Required @@ -225,6 +225,7 @@ True True True + True From 066156342b9fb9c866c6131b572f8db474eb6815 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Tellnes?= Date: Fri, 22 Nov 2024 13:24:37 +0100 Subject: [PATCH 06/13] Abort extraction date loading if METS has multiple candidate file groups ARKADE-758 --- .../Metadata/DiasMetsLoader.cs | 36 ++++++++----------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/src/Arkivverket.Arkade.Core/Metadata/DiasMetsLoader.cs b/src/Arkivverket.Arkade.Core/Metadata/DiasMetsLoader.cs index e87f9b7c..9f0e528f 100644 --- a/src/Arkivverket.Arkade.Core/Metadata/DiasMetsLoader.cs +++ b/src/Arkivverket.Arkade.Core/Metadata/DiasMetsLoader.cs @@ -29,32 +29,26 @@ public static ArchiveMetadata Load(string diasMetsFile) private static void LoadExtractionDate(ArchiveMetadata archiveMetadata, IEnumerable fileGroups) { - foreach (fileGrpType fileGroup in fileGroups) - { - if (fileGroup.USE != null && IsParsedAsArchiveExtraction(fileGroup.USE) && fileGroup.VERSDATESpecified) - { - archiveMetadata.ExtractionDate = fileGroup.VERSDATE; - return; - } + var archiveExtractionFileGroups = new List(); - var subFileGroups = new List(); + foreach (fileGrpType fileGroup in fileGroups) + CollectArchiveExtractionFileGroups(fileGroup, archiveExtractionFileGroups); - foreach (object fileGroupItem in fileGroup.Items) - { - if (fileGroupItem is fileGrpType subFileGroup) - { - subFileGroups.Add(subFileGroup); - } - } + if (archiveExtractionFileGroups.Count != 1) + return; - LoadExtractionDate(archiveMetadata, subFileGroups); - } + if (archiveExtractionFileGroups.First() is { VERSDATESpecified: true } extractionDatedFileGroup) + archiveMetadata.ExtractionDate = extractionDatedFileGroup.VERSDATE; + } - return; + private static void CollectArchiveExtractionFileGroups(fileGrpType fileGroup, List archiveExtractionFileGroups) + { + if (string.Equals(fileGroup.USE?.ToLower(), ArkadeConstants.MetsArchiveExtractionFileGroupUse.ToLower())) + archiveExtractionFileGroups.Add(fileGroup); - bool IsParsedAsArchiveExtraction(string fileGroupUse) => - string.Equals(fileGroupUse.Replace(" ", string.Empty).Replace("-", string.Empty), - ArkadeConstants.MetsArchiveExtractionFileGroupUse, StringComparison.OrdinalIgnoreCase); + if (fileGroup.Items != null) + foreach (fileGrpType subFileGroup in fileGroup.Items.Where(f => f is fileGrpType)) + CollectArchiveExtractionFileGroups(subFileGroup, archiveExtractionFileGroups); } private static void LoadMetsElementAttributes(ArchiveMetadata archiveMetadata, mets mets) From 0dcad10980c4cb7246d52fb33f179cb01f4ba63e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Tellnes?= Date: Fri, 22 Nov 2024 13:25:52 +0100 Subject: [PATCH 07/13] Handle loading METS file without fileSec and fileGrp elements ARKADE-758 --- src/Arkivverket.Arkade.Core/Metadata/DiasMetsLoader.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Arkivverket.Arkade.Core/Metadata/DiasMetsLoader.cs b/src/Arkivverket.Arkade.Core/Metadata/DiasMetsLoader.cs index 9f0e528f..97c7739b 100644 --- a/src/Arkivverket.Arkade.Core/Metadata/DiasMetsLoader.cs +++ b/src/Arkivverket.Arkade.Core/Metadata/DiasMetsLoader.cs @@ -20,7 +20,8 @@ public static ArchiveMetadata Load(string diasMetsFile) if (mets.metsHdr != null) LoadMetsHdr(archiveMetadata, mets.metsHdr); - LoadExtractionDate(archiveMetadata, mets.fileSec.fileGrp); + if (mets.fileSec?.fileGrp != null) + LoadExtractionDate(archiveMetadata, mets.fileSec?.fileGrp); MetadataLoader.HandleLabelPlaceholder(archiveMetadata); From c59e03bee8b085cb2cca5f7aa5e2b50b7ca61983 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Tellnes?= Date: Fri, 29 Nov 2024 10:59:35 +0100 Subject: [PATCH 08/13] Fix file format analysis of nested archive files ARKADE-780 --- .../Arkivverket.Arkade.Core.Tests.csproj | 6 +++ .../FileTypes/nested_archive-files/A.tar | Bin 0 -> 6144 bytes .../FileTypes/nested_archive-files/B.zip | Bin 0 -> 633 bytes .../FileFormatIdentifierTests.cs | 23 +++++++++++ .../Util/FileSystemInfoSizeCalculatorTest.cs | 6 ++- .../SiegfriedFileFormatIdentifier.cs | 39 ++++++++---------- 6 files changed, 50 insertions(+), 24 deletions(-) create mode 100644 src/Arkivverket.Arkade.Core.Tests/TestData/FileTypes/nested_archive-files/A.tar create mode 100644 src/Arkivverket.Arkade.Core.Tests/TestData/FileTypes/nested_archive-files/B.zip diff --git a/src/Arkivverket.Arkade.Core.Tests/Arkivverket.Arkade.Core.Tests.csproj b/src/Arkivverket.Arkade.Core.Tests/Arkivverket.Arkade.Core.Tests.csproj index 6fd58c67..13cbe95a 100644 --- a/src/Arkivverket.Arkade.Core.Tests/Arkivverket.Arkade.Core.Tests.csproj +++ b/src/Arkivverket.Arkade.Core.Tests/Arkivverket.Arkade.Core.Tests.csproj @@ -103,6 +103,12 @@ PreserveNewest + + PreserveNewest + + + PreserveNewest + PreserveNewest diff --git a/src/Arkivverket.Arkade.Core.Tests/TestData/FileTypes/nested_archive-files/A.tar b/src/Arkivverket.Arkade.Core.Tests/TestData/FileTypes/nested_archive-files/A.tar new file mode 100644 index 0000000000000000000000000000000000000000..596f1f2f0242ef30664e8627b4727220d33897ed GIT binary patch literal 6144 zcmZ>C(yPiWV4x{500J{JGX@Y11n9JZ8Bom7#N5cx%)rFV5F~GAZfeY+U_et>K@Bf0 zE=ep>P@soZgVBxvZ)O$|1`Z(XOs$TDyO4!}ft^8t!O_W44;Vb5A-oLiLTv8o&7AJ( z1wdR{!Og%3RKvgkCXyvs7bl4H1ROZPz!2cg&Y`z{>w6xkEW&~*NEV0zWg!-T(;wIZ z4cr!Re@IJBc3|e=0UOVE^z?NupaCF50=yZSM3@miK(-oW0Ss(w1hI(p53->kS0h`9 zYG@+ZP@?=0;LXYgasv|(t^(2rK%4;wj^GHUtusKG9#8%^2bBr1{BLe(3eNu~rla|v zwy^>+-H{FnfI$2kA;rJ3fsqj~{>=@H%tzy&9`QeF$7l$QhQP=T0Y^vLcK`^K{{{v| zX0ZC-*uWIj{x>%mZU56JO~P8G^s#N!meCLx4S~@R7!85Z5Eu=C(GVC7fq@PI0Na~* A%>V!Z literal 0 HcmV?d00001 diff --git a/src/Arkivverket.Arkade.Core.Tests/TestData/FileTypes/nested_archive-files/B.zip b/src/Arkivverket.Arkade.Core.Tests/TestData/FileTypes/nested_archive-files/B.zip new file mode 100644 index 0000000000000000000000000000000000000000..1f77c91bca735c9202ebbe8687d7f57abd0906b2 GIT binary patch literal 633 zcmWIWW@Zs#-~d9`^y)|k7~o@IU}I2VaB|cuNh}Ht;bmYC;&e|h<8n_2(WMpK42&!w zwP51yWo@Ab10L6l5)tm<2bSov+>PRic6cOV*LL-Cn1X>s*Gp@)nKM?ro|}KJa^V~c zfr%!~&r{5tcD?Nt+ji$@_4!!uu9xh`xB0IQ3RzLOBC9E>^7$+Qhimfse`oKw|5tkU zukBKQnSqwo^uJ&V@Mh=Oba(Eu9FXlmR|de{ADDq~e*+`b{Z4vSnFV0?M+4msazBVh zb3gZov^2rQ2MmYKU3ulfCXtYskdPjbP*7BKMcY${i}zt_f_Pf7KmVhq2bZ|=*xbZc zII*>*a9%sgsbtH@&Szl2Qn9)C#oGJ7=CNyaZ%E*p#G1roz&+>7DkJU#Vi^y%HT-st z%G$(i%+G(LV&CHB>x&(EIX|SO2qn7xV7Qqzfz@EcT0s|~m+~pjj_cgE30%G4vSFdi zPsIbXr}DZOGd|Q(;N{U~V`Bq)m7PN-Zc^8BpwB@b4De=T5@AL}9&)gNA`b?(HG){g mMJ2MCpa4a-57o>AATx;y-T-e_HjoRLfN%wn-VJm+0|NkKgRRj3 literal 0 HcmV?d00001 diff --git a/src/Arkivverket.Arkade.Core.Tests/Util/FileFormatIdentification/FileFormatIdentifierTests.cs b/src/Arkivverket.Arkade.Core.Tests/Util/FileFormatIdentification/FileFormatIdentifierTests.cs index 5520a07f..33d09273 100644 --- a/src/Arkivverket.Arkade.Core.Tests/Util/FileFormatIdentification/FileFormatIdentifierTests.cs +++ b/src/Arkivverket.Arkade.Core.Tests/Util/FileFormatIdentification/FileFormatIdentifierTests.cs @@ -198,6 +198,29 @@ public void IdentifyArchiveFileContentTest() r.Version.Equals("3a")); } + [Fact, Trait("Category", "Integration")] + [Trait("Dependency", "IO")] + public void IdentifyNestedArchiveFilesTest() + { + IFileFormatIdentifier formatIdentifier = CreateFileFormatIdentifier(); + + string directoryPath = Path.Combine("TestData", "FileTypes", "nested_archive-files"); + List directoryInputResults = formatIdentifier.IdentifyFormats(directoryPath, FileFormatScanMode.Directory).ToList(); + + var expectedFileNames = new List + { + "A.tar", "B.zip", + "A.tar#AA.tar", "A.tar#AB.zip", + "B.zip#BA.tar", "B.zip#BB.zip", + "A.tar#AA.tar#AAA.tar", "A.tar#AA.tar#AAB.zip", + "A.tar#AB.zip#ABA.tar", "A.tar#AB.zip#ABB.zip", + "B.zip#BA.tar#BAA.tar", "B.zip#BA.tar#BAB.zip", + "B.zip#BB.zip#BBA.tar", "B.zip#BB.zip#BBB.zip" + }; + + expectedFileNames.ForEach(fileName => directoryInputResults.Should().Contain(r => r.FileName.Equals(Path.Combine(directoryPath, fileName)))); + } + private static IFileFormatIdentifier CreateFileFormatIdentifier() { IStatusEventHandler statusEventHandler = new Mock().Object; diff --git a/src/Arkivverket.Arkade.Core.Tests/Util/FileSystemInfoSizeCalculatorTest.cs b/src/Arkivverket.Arkade.Core.Tests/Util/FileSystemInfoSizeCalculatorTest.cs index a4763e38..30481c14 100644 --- a/src/Arkivverket.Arkade.Core.Tests/Util/FileSystemInfoSizeCalculatorTest.cs +++ b/src/Arkivverket.Arkade.Core.Tests/Util/FileSystemInfoSizeCalculatorTest.cs @@ -37,9 +37,11 @@ public void ShouldCalculateCorrectTotalFileSize() long pdfByteSize = 27182L; long pdfA1bByteSize = 34155L; long pdfA3aByteSize = 32506L; + long zip2ByteSize = 633L; + long tarByteSize = 6144L; - long totalSize = docxByteSize + zipByteSize + pdfByteSize + pdfA1bByteSize + pdfA3aByteSize; - _totalFileSize.Should().Be(totalSize); // 5 files + where one is a .zip with 4 files inside + long totalSize = docxByteSize + zipByteSize + pdfByteSize + pdfA1bByteSize + pdfA3aByteSize + zip2ByteSize + tarByteSize; + _totalFileSize.Should().Be(totalSize); // 7 files which of 3 are archive files } private void OnTargetSizeCalculatorFinished(object o, TargetSizeCalculatorEventArgs e) diff --git a/src/Arkivverket.Arkade.Core/Util/FileFormatIdentification/SiegfriedFileFormatIdentifier.cs b/src/Arkivverket.Arkade.Core/Util/FileFormatIdentification/SiegfriedFileFormatIdentifier.cs index a4afdd00..640802b1 100644 --- a/src/Arkivverket.Arkade.Core/Util/FileFormatIdentification/SiegfriedFileFormatIdentifier.cs +++ b/src/Arkivverket.Arkade.Core/Util/FileFormatIdentification/SiegfriedFileFormatIdentifier.cs @@ -76,38 +76,33 @@ private IEnumerable AnalyseFiles(string target, FileFormatScanM IEnumerable siegfriedResult = _processRunner.Run(siegfriedProcess); - List siegfriedFileInfoObjects = ExternalProcessManager.TryClose(siegfriedProcess) - ? GetFileFormatInfoObjects(siegfriedResult).ToList() + HashSet siegfriedFileInfoObjects = ExternalProcessManager.TryClose(siegfriedProcess) + ? GetFileFormatInfoObjects(siegfriedResult).ToHashSet() : throw new SiegfriedFileFormatIdentifierException("Process does not exist, or has been terminated"); - if (!SiegfriedFileInfoObjectsContainsArchiveFiles(ref siegfriedFileInfoObjects, scanMode)) - return siegfriedFileInfoObjects; - - List archiveFilePaths = siegfriedFileInfoObjects.Where(s => - _supportedArchiveFilePronomCodes.Contains(s.Id)).ToList(); - - IEnumerable>> archiveFormatAnalysisTasks = archiveFilePaths - .Select(f => AnalyseFilesAsync(f.FileName, FileFormatScanMode.Archive)); - - siegfriedFileInfoObjects.AddRange(Task.WhenAll(archiveFormatAnalysisTasks).Result.SelectMany(a => a)); + if (scanMode == FileFormatScanMode.Directory) + AppendArchiveFileContents(siegfriedFileInfoObjects); return siegfriedFileInfoObjects; } - private async Task> AnalyseFilesAsync(string target, FileFormatScanMode scanMode) + private void AppendArchiveFileContents(ISet siegfriedFileInfoObjects) { - return await Task.Run(() => AnalyseFiles(target, scanMode)); + List archiveFilePaths = siegfriedFileInfoObjects.Where( + s => _supportedArchiveFilePronomCodes.Contains(s.Id) + ).Select(s => s.FileName).ToList(); + + IEnumerable fileFormatInfos = Task.WhenAll( + archiveFilePaths.Select(p => AnalyseFilesAsync(p, FileFormatScanMode.Archive)) + ).Result.SelectMany(a => a); + + foreach (IFileFormatInfo fileFormatInfo in fileFormatInfos) + siegfriedFileInfoObjects.Add(fileFormatInfo); } - private bool SiegfriedFileInfoObjectsContainsArchiveFiles(ref List fileFormatInfoObjects, - FileFormatScanMode scanMode) + private async Task> AnalyseFilesAsync(string target, FileFormatScanMode scanMode) { - if (scanMode == FileFormatScanMode.Archive) - { - // Skip first element when .zip (or similar) have been analysed, as this element is the .zip file itself - fileFormatInfoObjects = fileFormatInfoObjects.Skip(1).ToList(); - } - return fileFormatInfoObjects.Any(f => _supportedArchiveFilePronomCodes.Contains(f.Id)); + return await Task.Run(() => AnalyseFiles(target, scanMode)); } public IEnumerable IdentifyFormats(IEnumerable>> filePathsAndByteContent) From 9a5cbe52505c33e74ad545d3c514affef48c58ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Tellnes?= Date: Mon, 2 Dec 2024 10:40:45 +0100 Subject: [PATCH 09/13] Remove redundant code ARKADE-780 --- .../SiegfriedFileFormatIdentifier.cs | 17 +---------------- .../SiegfriedProcessRunner.cs | 5 ----- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/src/Arkivverket.Arkade.Core/Util/FileFormatIdentification/SiegfriedFileFormatIdentifier.cs b/src/Arkivverket.Arkade.Core/Util/FileFormatIdentification/SiegfriedFileFormatIdentifier.cs index 640802b1..78e0d1b4 100644 --- a/src/Arkivverket.Arkade.Core/Util/FileFormatIdentification/SiegfriedFileFormatIdentifier.cs +++ b/src/Arkivverket.Arkade.Core/Util/FileFormatIdentification/SiegfriedFileFormatIdentifier.cs @@ -48,22 +48,7 @@ public IEnumerable IdentifyFormats(string target, FileFormatSca _fileSystemInfoSizeCalculator.CalculateSize(scanMode, target); - IEnumerable siegfriedFileInfoObjects; - - if (scanMode == FileFormatScanMode.Archive) - { - Process siegfriedProcess = _processRunner.SetupSiegfriedProcess(scanMode, target); - - IEnumerable siegfriedResults = _processRunner.RunOnArchive(siegfriedProcess); - - ExternalProcessManager.Close(siegfriedProcess); // TODO: Call after AnalyseFiles also? - - siegfriedFileInfoObjects = GetFileFormatInfoObjects(siegfriedResults); - } - else - { - siegfriedFileInfoObjects = AnalyseFiles(target, scanMode); - } + IEnumerable siegfriedFileInfoObjects = AnalyseFiles(target, scanMode); _statusEventHandler.RaiseEventFormatAnalysisFinished(); diff --git a/src/Arkivverket.Arkade.Core/Util/FileFormatIdentification/SiegfriedProcessRunner.cs b/src/Arkivverket.Arkade.Core/Util/FileFormatIdentification/SiegfriedProcessRunner.cs index 9dcd0dc8..44ce279f 100644 --- a/src/Arkivverket.Arkade.Core/Util/FileFormatIdentification/SiegfriedProcessRunner.cs +++ b/src/Arkivverket.Arkade.Core/Util/FileFormatIdentification/SiegfriedProcessRunner.cs @@ -76,11 +76,6 @@ internal string RunOnFile(Process process) return Run(process).Skip(1).First(); } - internal IEnumerable RunOnArchive(Process process) - { - return Run(process).Skip(1); - } - internal string RunOnByteArray(Process process, KeyValuePair> filePathAndByteContent) { var results = new List(); From 17a5d8059e6f3286e17581bc0204dd0dc674ae23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Tellnes?= Date: Mon, 2 Dec 2024 10:41:06 +0100 Subject: [PATCH 10/13] Update unit test ARKADE-780 --- .../FileFormatIdentification/FileFormatIdentifierTests.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Arkivverket.Arkade.Core.Tests/Util/FileFormatIdentification/FileFormatIdentifierTests.cs b/src/Arkivverket.Arkade.Core.Tests/Util/FileFormatIdentification/FileFormatIdentifierTests.cs index 33d09273..91cd3e60 100644 --- a/src/Arkivverket.Arkade.Core.Tests/Util/FileFormatIdentification/FileFormatIdentifierTests.cs +++ b/src/Arkivverket.Arkade.Core.Tests/Util/FileFormatIdentification/FileFormatIdentifierTests.cs @@ -219,6 +219,11 @@ public void IdentifyNestedArchiveFilesTest() }; expectedFileNames.ForEach(fileName => directoryInputResults.Should().Contain(r => r.FileName.Equals(Path.Combine(directoryPath, fileName)))); + + List archiveFileAInputResults = formatIdentifier.IdentifyFormats(Path.Combine(directoryPath, "A.tar"), FileFormatScanMode.Archive).ToList(); + List archiveFileBInputResults = formatIdentifier.IdentifyFormats(Path.Combine(directoryPath, "B.zip"), FileFormatScanMode.Archive).ToList(); + + archiveFileAInputResults.Concat(archiveFileBInputResults).Should().BeEquivalentTo(directoryInputResults); } private static IFileFormatIdentifier CreateFileFormatIdentifier() From f9901af850d32f748b33b1d20aa85d95d8372171 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Tellnes?= Date: Mon, 2 Dec 2024 15:55:05 +0100 Subject: [PATCH 11/13] Update test data ARKADE-780 --- .../FileTypes/nested_archive-files/A.tar | Bin 6144 -> 7168 bytes .../FileTypes/nested_archive-files/B.zip | Bin 633 -> 872 bytes .../Util/FileSystemInfoSizeCalculatorTest.cs | 4 ++-- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Arkivverket.Arkade.Core.Tests/TestData/FileTypes/nested_archive-files/A.tar b/src/Arkivverket.Arkade.Core.Tests/TestData/FileTypes/nested_archive-files/A.tar index 596f1f2f0242ef30664e8627b4727220d33897ed..5df413ba312224a0a84ff5dbc1cc1868e880d4e3 100644 GIT binary patch literal 7168 zcmZ>C(yPiWV4x{500MJ!a|RF%1n9JZxse%zp^3SXv9XDnnW+&_-rT^zh(W=Crmlh- zURqp|Sfrpp532^F9Rc3VEFwUMaWLpLHbuU*{~S~Z_4g$x& z*RZ+Y%j69%N^WaA5y*bTp znX63hN+h3I9~hha5H7B_GN+k{)58Zw|vk30Vx8iL9M zSpGLRFb3v-GjkKu(fm)1uqR}Oqa*Dr0Q~U}Eb2`W@o#1Zswd114Gc%)pHSRULmpJp za)Avp0hYAKmv>vU0C^zH55&OKp_`naSCX1nqE}K;Qj%Ix0x8LGX+bW@K&GM@fLx;0 z`c#_YE72Gk7#R|QMi_$383i;70Y^Gi00i>C33B;w25u*s8<>r@|7aBBsKx^0A32Ak zN>YhOApU{UCh+*`wo literal 6144 zcmZ>C(yPiWV4x{500J{JGX@Y11n9JZ8Bom7#N5cx%)rFV5F~GAZfeY+U_et>K@Bf0 zE=ep>P@soZgVBxvZ)O$|1`Z(XOs$TDyO4!}ft^8t!O_W44;Vb5A-oLiLTv8o&7AJ( z1wdR{!Og%3RKvgkCXyvs7bl4H1ROZPz!2cg&Y`z{>w6xkEW&~*NEV0zWg!-T(;wIZ z4cr!Re@IJBc3|e=0UOVE^z?NupaCF50=yZSM3@miK(-oW0Ss(w1hI(p53->kS0h`9 zYG@+ZP@?=0;LXYgasv|(t^(2rK%4;wj^GHUtusKG9#8%^2bBr1{BLe(3eNu~rla|v zwy^>+-H{FnfI$2kA;rJ3fsqj~{>=@H%tzy&9`QeF$7l$QhQP=T0Y^vLcK`^K{{{v| zX0ZC-*uWIj{x>%mZU56JO~P8G^s#N!meCLx4S~@R7!85Z5Eu=C(GVC7fq@PI0Na~* A%>V!Z diff --git a/src/Arkivverket.Arkade.Core.Tests/TestData/FileTypes/nested_archive-files/B.zip b/src/Arkivverket.Arkade.Core.Tests/TestData/FileTypes/nested_archive-files/B.zip index 1f77c91bca735c9202ebbe8687d7f57abd0906b2..3b4df2dec9bd17a3e34ba1888bccd372960389ba 100644 GIT binary patch literal 872 zcmWIWW@Zs#U|`^2@M~;}{I>jv$TJ|1L5P8Y4M;gT>XjrGy}e@1*W@6;_TXT6Vsf@; zqITrG=m?1m=i07Kl1R$A@M4yLb*^oP`^JxKX4mE&Vl))$jM6nMwA(b3x1Trh+wo%C zT;u2lAD+T<8<)jt8|Sd?I?8)_i%g!{bIZq8D|oy%#C0aDT=il3pTMoxeA1iW=GEA| zsWzRXzPOdS+`ZhW-$jDc_lQ%=#t-gZOZnf+y-Yd1?EdB*4#v9|I7qLX{_=x~jrLLV zRpytfKX7b#=i-1$zCEfsdNJIcbVvVpwVF@Dx!*w7AhlG<}Rc1kHfVYQJpupbs zRVxK0S1uI%JHbvmc<~aapou zt6{pM{)7iJ{3fJa?b~pOdGUVcBiC89&0KGqOMTj9aQRBkwD9N6)6bo@o$j2v&oQE2 z{OobF4V71(hlgzOs(*Z-x?-}=o-YmOWmkytrLQ@8Vb<5&kS9AXguZ&QH`FUU-DltH zf3>$J2HxQ4WC@58{&8Nw=ttM23h!H!zt%P|2wu>tiCun&fh9PRic6cOV*LL-Cn1X>s*Gp@)nKM?ro|}KJa^V~c zfr%!~&r{5tcD?Nt+ji$@_4!!uu9xh`xB0IQ3RzLOBC9E>^7$+Qhimfse`oKw|5tkU zukBKQnSqwo^uJ&V@Mh=Oba(Eu9FXlmR|de{ADDq~e*+`b{Z4vSnFV0?M+4msazBVh zb3gZov^2rQ2MmYKU3ulfCXtYskdPjbP*7BKMcY${i}zt_f_Pf7KmVhq2bZ|=*xbZc zII*>*a9%sgsbtH@&Szl2Qn9)C#oGJ7=CNyaZ%E*p#G1roz&+>7DkJU#Vi^y%HT-st z%G$(i%+G(LV&CHB>x&(EIX|SO2qn7xV7Qqzfz@EcT0s|~m+~pjj_cgE30%G4vSFdi zPsIbXr}DZOGd|Q(;N{U~V`Bq)m7PN-Zc^8BpwB@b4De=T5@AL}9&)gNA`b?(HG){g mMJ2MCpa4a-57o>AATx;y-T-e_HjoRLfN%wn-VJm+0|NkKgRRj3 diff --git a/src/Arkivverket.Arkade.Core.Tests/Util/FileSystemInfoSizeCalculatorTest.cs b/src/Arkivverket.Arkade.Core.Tests/Util/FileSystemInfoSizeCalculatorTest.cs index 30481c14..030aa277 100644 --- a/src/Arkivverket.Arkade.Core.Tests/Util/FileSystemInfoSizeCalculatorTest.cs +++ b/src/Arkivverket.Arkade.Core.Tests/Util/FileSystemInfoSizeCalculatorTest.cs @@ -37,8 +37,8 @@ public void ShouldCalculateCorrectTotalFileSize() long pdfByteSize = 27182L; long pdfA1bByteSize = 34155L; long pdfA3aByteSize = 32506L; - long zip2ByteSize = 633L; - long tarByteSize = 6144L; + long zip2ByteSize = 921L; + long tarByteSize = 7168L; long totalSize = docxByteSize + zipByteSize + pdfByteSize + pdfA1bByteSize + pdfA3aByteSize + zip2ByteSize + tarByteSize; _totalFileSize.Should().Be(totalSize); // 7 files which of 3 are archive files From 1353e5fe83df328f051eab64f894bcb34f3e6ebd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Tellnes?= Date: Thu, 5 Dec 2024 10:00:27 +0100 Subject: [PATCH 12/13] Use dedicated test data for file size calculator unit test --- .../Arkivverket.Arkade.Core.Tests.csproj | 8 ++++++++ .../TestData/DiskUsage/docx.docx | Bin 0 -> 12895 bytes .../TestData/DiskUsage/pdf.pdf | Bin 0 -> 27182 bytes .../Util/FileSystemInfoSizeCalculatorTest.cs | 10 ++-------- 4 files changed, 10 insertions(+), 8 deletions(-) create mode 100644 src/Arkivverket.Arkade.Core.Tests/TestData/DiskUsage/docx.docx create mode 100644 src/Arkivverket.Arkade.Core.Tests/TestData/DiskUsage/pdf.pdf diff --git a/src/Arkivverket.Arkade.Core.Tests/Arkivverket.Arkade.Core.Tests.csproj b/src/Arkivverket.Arkade.Core.Tests/Arkivverket.Arkade.Core.Tests.csproj index 13cbe95a..3e8b5cc0 100644 --- a/src/Arkivverket.Arkade.Core.Tests/Arkivverket.Arkade.Core.Tests.csproj +++ b/src/Arkivverket.Arkade.Core.Tests/Arkivverket.Arkade.Core.Tests.csproj @@ -28,6 +28,8 @@ + + @@ -39,6 +41,12 @@ + + PreserveNewest + + + PreserveNewest + PreserveNewest diff --git a/src/Arkivverket.Arkade.Core.Tests/TestData/DiskUsage/docx.docx b/src/Arkivverket.Arkade.Core.Tests/TestData/DiskUsage/docx.docx new file mode 100644 index 0000000000000000000000000000000000000000..7873b7184257685264b3ec5190b08c9355d2c6e7 GIT binary patch literal 12895 zcmeHNg;yL~(jVMCxCBjbcZcBa4#C|5gIjQS*Wm6BL4!L1g1fr}g3C8~`}RrR?qBe2 zpHp?FyYH{=^zE|SRSMD&kgovH09XJ3Kmu6HpR(2h0|1Dj000aCEV%YNJ6oWME%3dH zo4tvnF1@RbHE}K^IAt~f95nua$N%FMs81NN{lbVUdXspM65FI|xSv}}4Ia*)M5lBB zgX00N_7peJ_S}I1uBZwY3vW$I!E&?8qSo*KburBv4z0n3;s~2B$v0llf`evZZkx`> z828Oa0^_RC5c@}K*0y$B8Fny6vWA|xF=cr9jJyngOpRMW6m?>>8o7HU3sJx$7R&lg z`zl28Duq3jd;<(VvR*biLVWEUo0qKwDUR`iRz;e@e$ql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9q~tfjvR&VH+ae);WWI{@%w z+P_&L{ki^8;-AQKH*uhsC%j!AJqY%@+^seWW%obg@8=xJKLGPB0bA)Ufm=agQ9%)5 zZJ;O&2!w5`+`@!~B>_K0ZfDYUZ>=pb|C7ugBLCgTMlV2B^}nXY-u^o?s;aOnD1^(_ z168^r?c!o>29uYe3mMA+L4sg0VW=P&C@Lc;E-wNWgvvu?Kv!htKnikV+im_icdJo4 zqJ(rto6tqf|DDl($o)n0JpTvB!T*Cfc>bB>Z?XIjUH{Paw;1?a!T+qTf9U#K4E(L& ze^%GuqwCwxK7H3s-zomFZI}Mnwx4coA;s%P-_-y5<>E){mMhlI4t6FO`tC;C8clbG z_-4Mcowxn|A@UbXm7AL8762`4tT|nh9-ynw1Ed>~Z26LWGj*XW%4-6){9JgpEgb+# zSM();AYnNXu)K^g6f7nx0|svGlYZPLN&oi|TW%5mspWu}=#Otd?oo)_zun#3Jn0k9 zvuoEwy}hwBKIbc;w*$smUz#F!YhBuN*yjBGou7a{IUt#H7W*r9#@;;5a_0Wsw`RL0 z5MBpJ^+pF{OMH^6C51z=5k5P9yWnwX;FmF za{P4;VIc4qeTe)51N{O6{{j>J1qS&A2K_5WXYMCXf#Sk{=|e;qMEC#rQ*R<7V&Zf& zn?GX^;VtKbpD>{C4{>NG6S^yj)3&wIw}lS+-(KC{7O;sE`rDckfq=xs=vGU7^6Cn7 rYn|WMnK0wQ|A*25bju}Ip6!YNTi<=U7YO}|PT0>iLxqLGzt{X9f?P;f literal 0 HcmV?d00001 diff --git a/src/Arkivverket.Arkade.Core.Tests/Util/FileSystemInfoSizeCalculatorTest.cs b/src/Arkivverket.Arkade.Core.Tests/Util/FileSystemInfoSizeCalculatorTest.cs index 030aa277..6b53d494 100644 --- a/src/Arkivverket.Arkade.Core.Tests/Util/FileSystemInfoSizeCalculatorTest.cs +++ b/src/Arkivverket.Arkade.Core.Tests/Util/FileSystemInfoSizeCalculatorTest.cs @@ -22,7 +22,7 @@ public FileSystemInfoSizeCalculatorTest() [Trait("Category", "Integration")] public void ShouldCalculateCorrectTotalFileSize() { - string pathToFiles = Path.Combine("TestData", "FileTypes"); + string pathToFiles = Path.Combine("TestData", "DiskUsage"); var fileSystemInfoSizeCalculator = new FileSystemInfoSizeCalculator(_statusEventHandler); @@ -33,15 +33,9 @@ public void ShouldCalculateCorrectTotalFileSize() } long docxByteSize = 12895L; - long zipByteSize = 89899L; long pdfByteSize = 27182L; - long pdfA1bByteSize = 34155L; - long pdfA3aByteSize = 32506L; - long zip2ByteSize = 921L; - long tarByteSize = 7168L; - long totalSize = docxByteSize + zipByteSize + pdfByteSize + pdfA1bByteSize + pdfA3aByteSize + zip2ByteSize + tarByteSize; - _totalFileSize.Should().Be(totalSize); // 7 files which of 3 are archive files + _totalFileSize.Should().Be(docxByteSize + pdfByteSize); } private void OnTargetSizeCalculatorFinished(object o, TargetSizeCalculatorEventArgs e) From 5f1e8e4100fe3b0975b2efa93ede2d85bc3613eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Tellnes?= Date: Mon, 9 Dec 2024 10:21:28 +0100 Subject: [PATCH 13/13] Set the installer package version number ARKADE-781 --- src/Arkivverket.Arkade.GUI.Installer/Package.wxs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Arkivverket.Arkade.GUI.Installer/Package.wxs b/src/Arkivverket.Arkade.GUI.Installer/Package.wxs index f55805a1..5b74d1e8 100644 --- a/src/Arkivverket.Arkade.GUI.Installer/Package.wxs +++ b/src/Arkivverket.Arkade.GUI.Installer/Package.wxs @@ -1,6 +1,6 @@ -