diff --git a/LeedsExperiment/Dashboard/Controllers/BrowseController.cs b/LeedsExperiment/Dashboard/Controllers/BrowseController.cs index 3f1f16c..1c92dee 100644 --- a/LeedsExperiment/Dashboard/Controllers/BrowseController.cs +++ b/LeedsExperiment/Dashboard/Controllers/BrowseController.cs @@ -1,6 +1,6 @@ using Fedora.Abstractions; using Microsoft.AspNetCore.Mvc; -using Preservation; +using Storage; using Utils; namespace Dashboard.Controllers; @@ -8,13 +8,13 @@ namespace Dashboard.Controllers; public class BrowseController : Controller { private readonly ILogger logger; - private readonly IPreservation preservation; + private readonly IStorage storage; public BrowseController( - IPreservation preservation, + IStorage storage, ILogger logger) { - this.preservation = preservation; + this.storage = storage; this.logger = logger; } @@ -23,7 +23,7 @@ public BrowseController( public async Task IndexAsync(string? path = null) { ViewBag.Path = path; - var resource = await preservation.GetResource(path); + var resource = await storage.GetResource(path); if (resource == null) { return NotFound(); @@ -41,7 +41,7 @@ public async Task IndexAsync(string? path = null) } if (resource.PreservationApiPartOf != null) { - ViewBag.ArchivalGroupPath = preservation.GetInternalPath(resource.PreservationApiPartOf); + ViewBag.ArchivalGroupPath = storage.GetInternalPath(resource.PreservationApiPartOf); } var reqPath = Request.Path.Value?.TrimEnd('/'); if (reqPath.HasText()) @@ -74,7 +74,7 @@ public async Task IndexAsync( } ViewBag.Path = parentPath; var path = $"{parentPath.TrimEnd('/')}/{name}"; - var parentResource = await preservation.GetResource(parentPath); + var parentResource = await storage.GetResource(parentPath); if(string.IsNullOrWhiteSpace(name)) { ViewBag.Problem = $"No name supplied!"; @@ -91,14 +91,14 @@ public async Task IndexAsync( ViewBag.Problem = $"Can't create a container within an Archival Group - use an importJob please!"; return View("Container", parentResource as Container); } - var info = await preservation.GetResourceInfo(path); + var info = await storage.GetResourceInfo(path); if (info.Exists) { ViewBag.Problem = $"Resource already exists at path {path}"; return View("Container", parentResource as Container); } - Container newContainer = await preservation.CreateContainer(path); + Container newContainer = await storage.CreateContainer(path); ViewBag.Parent = "/browse/" + parentPath; diff --git a/LeedsExperiment/Dashboard/Controllers/HomeController.cs b/LeedsExperiment/Dashboard/Controllers/HomeController.cs index 299dd05..9b5f1d3 100644 --- a/LeedsExperiment/Dashboard/Controllers/HomeController.cs +++ b/LeedsExperiment/Dashboard/Controllers/HomeController.cs @@ -1,23 +1,11 @@ using Dashboard.Models; using Microsoft.AspNetCore.Mvc; -using Preservation; using System.Diagnostics; namespace Dashboard.Controllers; public class HomeController : Controller -{ - private readonly ILogger logger; - private readonly IPreservation preservation; - - public HomeController( - IPreservation preservation, - ILogger logger) - { - this.preservation = preservation; - this.logger = logger; - } - +{ public IActionResult Index() { return View(); diff --git a/LeedsExperiment/Dashboard/Controllers/IIIFController.cs b/LeedsExperiment/Dashboard/Controllers/IIIFController.cs index d6a9b0f..216483f 100644 --- a/LeedsExperiment/Dashboard/Controllers/IIIFController.cs +++ b/LeedsExperiment/Dashboard/Controllers/IIIFController.cs @@ -10,7 +10,7 @@ using Microsoft.AspNetCore.Cors; using Microsoft.AspNetCore.Http.Extensions; using Microsoft.AspNetCore.Mvc; -using Preservation; +using Storage; using Utils; namespace Dashboard.Controllers @@ -18,15 +18,15 @@ namespace Dashboard.Controllers public class IIIFController : Controller { private readonly ILogger logger; - private readonly IPreservation preservation; + private readonly IStorage storage; private readonly IDlcs dlcs; public IIIFController( - IPreservation preservation, + IStorage storage, IDlcs dlcs, ILogger logger) { - this.preservation = preservation; + this.storage = storage; this.logger = logger; this.dlcs = dlcs; } @@ -43,7 +43,7 @@ public async Task IndexAsync([FromRoute] string path) { ViewBag.Path = path; var model = new IIIFSyncModel { Path = path }; - var getAg = preservation.GetArchivalGroup(path, null); + var getAg = storage.GetArchivalGroup(path, null); var getDlcsImages = dlcs.GetImagesFromQuery(new ImageQuery { String1 = path }); await Task.WhenAll(getAg, getDlcsImages); @@ -74,7 +74,7 @@ public async Task IndexAsync([FromRoute] string path) public async Task SyncAsync([FromRoute] string path) { ViewBag.Path = path; - var getAg = preservation.GetArchivalGroup(path, null); + var getAg = storage.GetArchivalGroup(path, null); var getDlcsImages = dlcs.GetImagesFromQuery(new ImageQuery { String1 = path }); await Task.WhenAll(getAg, getDlcsImages); ArchivalGroup ag = getAg.Result!; @@ -116,7 +116,7 @@ public async Task SyncAsync([FromRoute] string path) [EnableCors(PolicyName = "IIIF")] public async Task Manifest([FromRoute] string path) { - var getAg = preservation.GetArchivalGroup(path, null); + var getAg = storage.GetArchivalGroup(path, null); var getDlcsImages = dlcs.GetImagesFromQuery(new ImageQuery { String1 = path }); await Task.WhenAll(getAg, getDlcsImages); diff --git a/LeedsExperiment/Dashboard/Controllers/ImportExportController.cs b/LeedsExperiment/Dashboard/Controllers/ImportExportController.cs index 2b7c8e5..3890249 100644 --- a/LeedsExperiment/Dashboard/Controllers/ImportExportController.cs +++ b/LeedsExperiment/Dashboard/Controllers/ImportExportController.cs @@ -1,7 +1,7 @@ using Dashboard.Models; using Fedora.Abstractions; using Microsoft.AspNetCore.Mvc; -using Preservation; +using Storage; using System.Text.Json; namespace Dashboard.Controllers @@ -9,13 +9,13 @@ namespace Dashboard.Controllers public class ImportExportController : Controller { private readonly ILogger logger; - private readonly IPreservation preservation; + private readonly IStorage storage; public ImportExportController( - IPreservation preservation, + IStorage storage, ILogger logger) { - this.preservation = preservation; + this.storage = storage; this.logger = logger; } @@ -27,7 +27,7 @@ public async Task ExportStartAsync( [FromQuery] string? version = null) { ViewBag.Path = path; - var ag = await preservation.GetArchivalGroup(path, version); + var ag = await storage.GetArchivalGroup(path, version); if (ag == null) { return NotFound(); @@ -56,7 +56,7 @@ public async Task ExportExecuteAsync( [FromRoute] string path, [FromQuery] string? version = null) { - var exportResult = await preservation.Export(path, version); + var exportResult = await storage.Export(path, version); return View("ExportResult", exportResult); // we could also supply the ag to the model for a richer display but at the expense of longer time } @@ -70,12 +70,12 @@ public async Task ImportStartAsync( [FromQuery] string? source = null, [FromQuery] string? name = null) // name if creating a new one; can't rename atm { - var resourceInfo = await preservation.GetResourceInfo(path); + var resourceInfo = await storage.GetResourceInfo(path); var model = new ImportModel { Path = path, ResourceInfo = resourceInfo }; if(resourceInfo.Type == nameof(ArchivalGroup)) { // This is an update to an existing archival group - var existingAg = await preservation.GetArchivalGroup(path, null); + var existingAg = await storage.GetArchivalGroup(path, null); model.ArchivalGroup = existingAg; } else if (resourceInfo.StatusCode != 404) @@ -89,7 +89,7 @@ public async Task ImportStartAsync( // we already know where the update file are // This is only for synchronising with S3; There'll need to be a different route // for ad hoc construction of an ImportJob (e.g., it's just one deletion). - var importJob = await preservation.GetUpdateJob(path, source); + var importJob = await storage.GetUpdateJob(path, source); model.ImportJob = importJob; importJob.ArchivalGroupName = model.ArchivalGroup?.Name ?? model.Name; return View("ImportJob", model); @@ -127,8 +127,8 @@ [FromForm] string importJobString // But I can make this import job outside the dashboard any way I like. // Would probably post directly to the Preservation API - var processedJob = await preservation.Import(importJob); - var resultingAg = await preservation.GetArchivalGroup(importJob.ArchivalGroupPath, null); + var processedJob = await storage.Import(importJob); + var resultingAg = await storage.GetArchivalGroup(importJob.ArchivalGroupPath, null); var model = new ImportModel { ImportJob = processedJob, diff --git a/LeedsExperiment/Dashboard/Controllers/OcflController.cs b/LeedsExperiment/Dashboard/Controllers/OcflController.cs index 879bdd3..6777c7f 100644 --- a/LeedsExperiment/Dashboard/Controllers/OcflController.cs +++ b/LeedsExperiment/Dashboard/Controllers/OcflController.cs @@ -1,18 +1,18 @@ using Microsoft.AspNetCore.Mvc; -using Preservation; +using Storage; namespace Dashboard.Controllers { public class OcflController : Controller { private readonly ILogger logger; - private readonly IPreservation preservation; + private readonly IStorage storage; public OcflController( - IPreservation preservation, + IStorage storage, ILogger logger) { - this.preservation = preservation; + this.storage = storage; this.logger = logger; } @@ -23,7 +23,7 @@ public async Task IndexAsync( [FromQuery] string? version = null) { ViewBag.Path = path; - var ag = await preservation.GetArchivalGroup(path, version); + var ag = await storage.GetArchivalGroup(path, version); if (ag == null) { return NotFound(); diff --git a/LeedsExperiment/Dashboard/Dashboard.csproj b/LeedsExperiment/Dashboard/Dashboard.csproj index ed7ca73..4812258 100644 --- a/LeedsExperiment/Dashboard/Dashboard.csproj +++ b/LeedsExperiment/Dashboard/Dashboard.csproj @@ -18,8 +18,8 @@ - - + + diff --git a/LeedsExperiment/Dashboard/Models/ImportModel.cs b/LeedsExperiment/Dashboard/Models/ImportModel.cs index 6277567..0a8be10 100644 --- a/LeedsExperiment/Dashboard/Models/ImportModel.cs +++ b/LeedsExperiment/Dashboard/Models/ImportModel.cs @@ -1,6 +1,6 @@ using Dashboard.Helpers; using Fedora.Abstractions; -using Preservation; +using Storage; namespace Dashboard.Models; diff --git a/LeedsExperiment/Dashboard/Program.cs b/LeedsExperiment/Dashboard/Program.cs index 9ef8ab1..184911b 100644 --- a/LeedsExperiment/Dashboard/Program.cs +++ b/LeedsExperiment/Dashboard/Program.cs @@ -1,6 +1,6 @@ using Dlcs; -using Preservation; -using PreservationApiClient; +using Storage; +using StorageApiClient; using System.Net.Http.Headers; var builder = WebApplication.CreateBuilder(args); @@ -9,7 +9,7 @@ builder.Services.AddControllersWithViews(); // https://learn.microsoft.com/en-us/dotnet/architecture/microservices/implement-resilient-applications/use-httpclientfactory-to-implement-resilient-http-requests -builder.Services.AddHttpClient(client => +builder.Services.AddHttpClient(client => { client.BaseAddress = new Uri(builder.Configuration["ApiBaseAddress"]!); client.DefaultRequestHeaders.Add("Accept", "application/json"); diff --git a/LeedsExperiment/Dashboard/Views/ImportExport/ExportResult.cshtml b/LeedsExperiment/Dashboard/Views/ImportExport/ExportResult.cshtml index dff36a7..9303b04 100644 --- a/LeedsExperiment/Dashboard/Views/ImportExport/ExportResult.cshtml +++ b/LeedsExperiment/Dashboard/Views/ImportExport/ExportResult.cshtml @@ -1,7 +1,7 @@ @using Dashboard.Borrowed @using Dashboard.Helpers @using Utils -@model Preservation.ExportResult +@model Storage.ExportResult

Export Result 📦

diff --git a/LeedsExperiment/Fedora/Abstractions/Transfer/BinaryFile.cs b/LeedsExperiment/Fedora/Abstractions/Transfer/BinaryFile.cs index 2ee84e8..e11f8ad 100644 --- a/LeedsExperiment/Fedora/Abstractions/Transfer/BinaryFile.cs +++ b/LeedsExperiment/Fedora/Abstractions/Transfer/BinaryFile.cs @@ -9,7 +9,7 @@ namespace Fedora.Abstractions.Transfer; public class BinaryFile : ResourceWithParentUri { /// - /// An S3 key, a filesystem path - somewhere accessible to the Preservation API, to import from or export to + /// An S3 key, a filesystem path - somewhere accessible to the Storage API, to import from or export to /// [JsonPropertyName("externalLocation")] [JsonPropertyOrder(11)] diff --git a/LeedsExperiment/LeedsExperiment.sln b/LeedsExperiment/LeedsExperiment.sln index 21e0feb..26624e9 100644 --- a/LeedsExperiment/LeedsExperiment.sln +++ b/LeedsExperiment/LeedsExperiment.sln @@ -9,7 +9,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Storage.API", "Storage.API\ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dashboard", "Dashboard\Dashboard.csproj", "{8D0AC003-CEDE-4330-98C4-E3205FDB4267}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Preservation", "Preservation\Preservation.csproj", "{7CB531B6-49AE-4969-ACBF-321E2BC8B179}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Storage", "Preservation\Storage.csproj", "{7CB531B6-49AE-4969-ACBF-321E2BC8B179}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "notes", "notes", "{FFBB9C8F-E3D1-4E42-83A4-C9C8228BC2A7}" ProjectSection(SolutionItems) = preProject @@ -20,11 +20,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SamplesWorker", "SamplesWor EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FedoraTests", "FedoraTests\FedoraTests.csproj", "{DB5452C1-837D-46AE-A5FC-B939818A83CF}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PreservationApiClient", "PreservationApiClient\PreservationApiClient.csproj", "{2714D982-D2B2-49CE-98FA-104594A26ABF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StorageApiClient", "PreservationApiClient\StorageApiClient.csproj", "{2714D982-D2B2-49CE-98FA-104594A26ABF}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dlcs", "Dlcs\Dlcs.csproj", "{881D639B-D611-4962-9C1A-56A76B82FDC4}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dlcs", "Dlcs\Dlcs.csproj", "{881D639B-D611-4962-9C1A-56A76B82FDC4}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Preservation.API", "Preservation.API\Preservation.API.csproj", "{65F1F519-256D-4C11-B3F8-53F5779113EE}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Preservation.API", "Preservation.API\Preservation.API.csproj", "{65F1F519-256D-4C11-B3F8-53F5779113EE}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/LeedsExperiment/Preservation.API/ArchivalGroupUriHelpers.cs b/LeedsExperiment/Preservation.API/ArchivalGroupUriHelpers.cs index 67c2821..04bc60e 100644 --- a/LeedsExperiment/Preservation.API/ArchivalGroupUriHelpers.cs +++ b/LeedsExperiment/Preservation.API/ArchivalGroupUriHelpers.cs @@ -1,6 +1,6 @@ using System.Diagnostics.CodeAnalysis; -namespace Preservation.API; +namespace Storage.API; public static class ArchivalGroupUriHelpers { diff --git a/LeedsExperiment/Preservation.API/Controllers/DepositsController.cs b/LeedsExperiment/Preservation.API/Controllers/DepositsController.cs index fe582fd..44a3571 100644 --- a/LeedsExperiment/Preservation.API/Controllers/DepositsController.cs +++ b/LeedsExperiment/Preservation.API/Controllers/DepositsController.cs @@ -2,13 +2,13 @@ using Amazon.S3.Model; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Options; -using Preservation.API.Data; -using Preservation.API.Data.Entities; -using Preservation.API.Models; -using Preservation.API.Services; -using Preservation.API.Services.Exporter; +using Storage.API.Data; +using Storage.API.Data.Entities; +using Storage.API.Models; +using Storage.API.Services; +using Storage.API.Services.Exporter; -namespace Preservation.API.Controllers; +namespace Storage.API.Controllers; [Route("[controller]")] [ApiController] diff --git a/LeedsExperiment/Preservation.API/Controllers/ImportJobsController.cs b/LeedsExperiment/Preservation.API/Controllers/ImportJobsController.cs index 2573203..b8417a8 100644 --- a/LeedsExperiment/Preservation.API/Controllers/ImportJobsController.cs +++ b/LeedsExperiment/Preservation.API/Controllers/ImportJobsController.cs @@ -1,18 +1,18 @@ using Fedora.Abstractions; using Microsoft.AspNetCore.Mvc; -using Preservation.API.Data; -using Preservation.API.Data.Entities; -using Preservation.API.Models; -using Preservation.API.Services; -using Preservation.API.Services.ImportJobs; +using Storage.API.Data; +using Storage.API.Data.Entities; +using Storage.API.Models; +using Storage.API.Services; +using Storage.API.Services.ImportJobs; -namespace Preservation.API.Controllers; +namespace Storage.API.Controllers; [Route("deposits/{id}/[controller]")] [ApiController] public class ImportJobsController( PreservationContext dbContext, - IPreservation preservation, + IStorage storage, IImportJobQueue importJobQueue, IImportService importService, IIdentityService identityService, @@ -126,7 +126,7 @@ public async Task GetImportJobResult([FromRoute] string id, [From private async Task GetExistingArchivalGroup(DepositEntity existingDeposit) { var path = ArchivalGroupUriHelpers.GetArchivalGroupPath(existingDeposit.PreservationPath); - var storageResource = await preservation.GetArchivalGroup(path, null); + var storageResource = await storage.GetArchivalGroup(path, null); return storageResource; } } \ No newline at end of file diff --git a/LeedsExperiment/Preservation.API/Controllers/RepositoryController.cs b/LeedsExperiment/Preservation.API/Controllers/RepositoryController.cs index 3a1656f..f1ea06f 100644 --- a/LeedsExperiment/Preservation.API/Controllers/RepositoryController.cs +++ b/LeedsExperiment/Preservation.API/Controllers/RepositoryController.cs @@ -1,12 +1,12 @@ using Microsoft.AspNetCore.Http.Extensions; using Microsoft.AspNetCore.Mvc; -using Preservation.API.Models; +using Storage.API.Models; -namespace Preservation.API.Controllers; +namespace Storage.API.Controllers; [Route("[controller]/{*path}")] [ApiController] -public class RepositoryController(IPreservation preservation, ModelConverter modelConverter) : Controller +public class RepositoryController(IStorage storage, ModelConverter modelConverter) : Controller { /// /// Browse underlying repository for Container, DigitalObject or Binary. @@ -25,8 +25,8 @@ public async Task Browse([FromRoute] string path, [FromQuery] str { var unEscapedPath = Uri.UnescapeDataString(path); var storageResource = string.IsNullOrEmpty(version) - ? await preservation.GetResource(unEscapedPath) - : await preservation.GetArchivalGroup(unEscapedPath, version); + ? await storage.GetResource(unEscapedPath) + : await storage.GetArchivalGroup(unEscapedPath, version); if (storageResource == null) return NotFound(); @@ -48,7 +48,7 @@ public async Task Browse([FromRoute] string path, [FromQuery] str public async Task CreateContainer([FromRoute] string path) { var unEscapedPath = Uri.UnescapeDataString(path); - var storageContainer = await preservation.CreateContainer(unEscapedPath); + var storageContainer = await storage.CreateContainer(unEscapedPath); var container = modelConverter.ToPreservationResource(storageContainer, new Uri(HttpContext.Request.GetDisplayUrl())); return CreatedAtAction("Browse", new { path }, container); diff --git a/LeedsExperiment/Preservation.API/Data/Entities/DepositEntity.cs b/LeedsExperiment/Preservation.API/Data/Entities/DepositEntity.cs index 4d16faa..1ad6a74 100644 --- a/LeedsExperiment/Preservation.API/Data/Entities/DepositEntity.cs +++ b/LeedsExperiment/Preservation.API/Data/Entities/DepositEntity.cs @@ -1,4 +1,4 @@ -namespace Preservation.API.Data.Entities; +namespace Storage.API.Data.Entities; /// /// Models a deposit in DB. "Entity" prefix used to easily differentiate this and API model (demo app, anything goes) diff --git a/LeedsExperiment/Preservation.API/Data/Entities/ImportJobEntity.cs b/LeedsExperiment/Preservation.API/Data/Entities/ImportJobEntity.cs index c59a2b8..d09f74b 100644 --- a/LeedsExperiment/Preservation.API/Data/Entities/ImportJobEntity.cs +++ b/LeedsExperiment/Preservation.API/Data/Entities/ImportJobEntity.cs @@ -1,4 +1,4 @@ -namespace Preservation.API.Data.Entities; +namespace Storage.API.Data.Entities; public class ImportJobEntity { diff --git a/LeedsExperiment/Preservation.API/Data/EntityX.cs b/LeedsExperiment/Preservation.API/Data/EntityX.cs index 3349988..597cf8c 100644 --- a/LeedsExperiment/Preservation.API/Data/EntityX.cs +++ b/LeedsExperiment/Preservation.API/Data/EntityX.cs @@ -1,7 +1,7 @@ using Microsoft.EntityFrameworkCore; -using Preservation.API.Data.Entities; +using Storage.API.Data.Entities; -namespace Preservation.API.Data; +namespace Storage.API.Data; /// /// Commonly used queries/helpers for working with entities diff --git a/LeedsExperiment/Preservation.API/Data/Migrations/20240502111618_add deposits.Designer.cs b/LeedsExperiment/Preservation.API/Data/Migrations/20240502111618_add deposits.Designer.cs index cc0a807..f8cb953 100644 --- a/LeedsExperiment/Preservation.API/Data/Migrations/20240502111618_add deposits.Designer.cs +++ b/LeedsExperiment/Preservation.API/Data/Migrations/20240502111618_add deposits.Designer.cs @@ -5,11 +5,11 @@ using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; -using Preservation.API.Data; +using Storage.API.Data; #nullable disable -namespace Preservation.API.Data.Migrations +namespace Storage.API.Data.Migrations { [DbContext(typeof(PreservationContext))] [Migration("20240502111618_add deposits")] diff --git a/LeedsExperiment/Preservation.API/Data/Migrations/20240502111618_add deposits.cs b/LeedsExperiment/Preservation.API/Data/Migrations/20240502111618_add deposits.cs index ff69e36..48ee549 100644 --- a/LeedsExperiment/Preservation.API/Data/Migrations/20240502111618_add deposits.cs +++ b/LeedsExperiment/Preservation.API/Data/Migrations/20240502111618_add deposits.cs @@ -3,7 +3,7 @@ #nullable disable -namespace Preservation.API.Data.Migrations +namespace Storage.API.Data.Migrations { /// public partial class adddeposits : Migration diff --git a/LeedsExperiment/Preservation.API/Data/Migrations/20240502135319_deposit nullability.Designer.cs b/LeedsExperiment/Preservation.API/Data/Migrations/20240502135319_deposit nullability.Designer.cs index 9dc1448..4dd25b0 100644 --- a/LeedsExperiment/Preservation.API/Data/Migrations/20240502135319_deposit nullability.Designer.cs +++ b/LeedsExperiment/Preservation.API/Data/Migrations/20240502135319_deposit nullability.Designer.cs @@ -5,11 +5,11 @@ using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; -using Preservation.API.Data; +using Storage.API.Data; #nullable disable -namespace Preservation.API.Data.Migrations +namespace Storage.API.Data.Migrations { [DbContext(typeof(PreservationContext))] [Migration("20240502135319_deposit nullability")] diff --git a/LeedsExperiment/Preservation.API/Data/Migrations/20240502135319_deposit nullability.cs b/LeedsExperiment/Preservation.API/Data/Migrations/20240502135319_deposit nullability.cs index ec09195..6355215 100644 --- a/LeedsExperiment/Preservation.API/Data/Migrations/20240502135319_deposit nullability.cs +++ b/LeedsExperiment/Preservation.API/Data/Migrations/20240502135319_deposit nullability.cs @@ -2,7 +2,7 @@ #nullable disable -namespace Preservation.API.Data.Migrations +namespace Storage.API.Data.Migrations { /// public partial class depositnullability : Migration diff --git a/LeedsExperiment/Preservation.API/Data/Migrations/20240502142331_deposit lastModifiedBy nullable.Designer.cs b/LeedsExperiment/Preservation.API/Data/Migrations/20240502142331_deposit lastModifiedBy nullable.Designer.cs index 01e18b0..8e96702 100644 --- a/LeedsExperiment/Preservation.API/Data/Migrations/20240502142331_deposit lastModifiedBy nullable.Designer.cs +++ b/LeedsExperiment/Preservation.API/Data/Migrations/20240502142331_deposit lastModifiedBy nullable.Designer.cs @@ -5,11 +5,11 @@ using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; -using Preservation.API.Data; +using Storage.API.Data; #nullable disable -namespace Preservation.API.Data.Migrations +namespace Storage.API.Data.Migrations { [DbContext(typeof(PreservationContext))] [Migration("20240502142331_deposit lastModifiedBy nullable")] diff --git a/LeedsExperiment/Preservation.API/Data/Migrations/20240502142331_deposit lastModifiedBy nullable.cs b/LeedsExperiment/Preservation.API/Data/Migrations/20240502142331_deposit lastModifiedBy nullable.cs index 6e1531b..57eaeff 100644 --- a/LeedsExperiment/Preservation.API/Data/Migrations/20240502142331_deposit lastModifiedBy nullable.cs +++ b/LeedsExperiment/Preservation.API/Data/Migrations/20240502142331_deposit lastModifiedBy nullable.cs @@ -2,7 +2,7 @@ #nullable disable -namespace Preservation.API.Data.Migrations +namespace Storage.API.Data.Migrations { /// public partial class depositlastModifiedBynullable : Migration diff --git a/LeedsExperiment/Preservation.API/Data/Migrations/20240514150611_add importjobs.Designer.cs b/LeedsExperiment/Preservation.API/Data/Migrations/20240514150611_add importjobs.Designer.cs index 71c2295..70da1d5 100644 --- a/LeedsExperiment/Preservation.API/Data/Migrations/20240514150611_add importjobs.Designer.cs +++ b/LeedsExperiment/Preservation.API/Data/Migrations/20240514150611_add importjobs.Designer.cs @@ -5,11 +5,11 @@ using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; -using Preservation.API.Data; +using Storage.API.Data; #nullable disable -namespace Preservation.API.Data.Migrations +namespace Storage.API.Data.Migrations { [DbContext(typeof(PreservationContext))] [Migration("20240514150611_add importjobs")] diff --git a/LeedsExperiment/Preservation.API/Data/Migrations/20240514150611_add importjobs.cs b/LeedsExperiment/Preservation.API/Data/Migrations/20240514150611_add importjobs.cs index 08b275c..821f3d4 100644 --- a/LeedsExperiment/Preservation.API/Data/Migrations/20240514150611_add importjobs.cs +++ b/LeedsExperiment/Preservation.API/Data/Migrations/20240514150611_add importjobs.cs @@ -3,7 +3,7 @@ #nullable disable -namespace Preservation.API.Data.Migrations +namespace Storage.API.Data.Migrations { /// public partial class addimportjobs : Migration diff --git a/LeedsExperiment/Preservation.API/Data/Migrations/20240514151233_importjobs gains import_job_json.Designer.cs b/LeedsExperiment/Preservation.API/Data/Migrations/20240514151233_importjobs gains import_job_json.Designer.cs index 91766f9..3cbafc4 100644 --- a/LeedsExperiment/Preservation.API/Data/Migrations/20240514151233_importjobs gains import_job_json.Designer.cs +++ b/LeedsExperiment/Preservation.API/Data/Migrations/20240514151233_importjobs gains import_job_json.Designer.cs @@ -5,11 +5,11 @@ using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; -using Preservation.API.Data; +using Storage.API.Data; #nullable disable -namespace Preservation.API.Data.Migrations +namespace Storage.API.Data.Migrations { [DbContext(typeof(PreservationContext))] [Migration("20240514151233_importjobs gains import_job_json")] diff --git a/LeedsExperiment/Preservation.API/Data/Migrations/20240514151233_importjobs gains import_job_json.cs b/LeedsExperiment/Preservation.API/Data/Migrations/20240514151233_importjobs gains import_job_json.cs index 5ec0fa5..31fe8ed 100644 --- a/LeedsExperiment/Preservation.API/Data/Migrations/20240514151233_importjobs gains import_job_json.cs +++ b/LeedsExperiment/Preservation.API/Data/Migrations/20240514151233_importjobs gains import_job_json.cs @@ -2,7 +2,7 @@ #nullable disable -namespace Preservation.API.Data.Migrations +namespace Storage.API.Data.Migrations { /// public partial class importjobsgainsimport_job_json : Migration diff --git a/LeedsExperiment/Preservation.API/Data/Migrations/PreservationContextModelSnapshot.cs b/LeedsExperiment/Preservation.API/Data/Migrations/PreservationContextModelSnapshot.cs index e491dbd..934f2fd 100644 --- a/LeedsExperiment/Preservation.API/Data/Migrations/PreservationContextModelSnapshot.cs +++ b/LeedsExperiment/Preservation.API/Data/Migrations/PreservationContextModelSnapshot.cs @@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; -using Preservation.API.Data; +using Storage.API.Data; #nullable disable -namespace Preservation.API.Data.Migrations +namespace Storage.API.Data.Migrations { [DbContext(typeof(PreservationContext))] partial class PreservationContextModelSnapshot : ModelSnapshot diff --git a/LeedsExperiment/Preservation.API/Data/PreservationContext.cs b/LeedsExperiment/Preservation.API/Data/PreservationContext.cs index 4bf46a6..b5a2105 100644 --- a/LeedsExperiment/Preservation.API/Data/PreservationContext.cs +++ b/LeedsExperiment/Preservation.API/Data/PreservationContext.cs @@ -1,7 +1,7 @@ using Microsoft.EntityFrameworkCore; -using Preservation.API.Data.Entities; +using Storage.API.Data.Entities; -namespace Preservation.API.Data; +namespace Storage.API.Data; public class PreservationContext(DbContextOptions options) : DbContext(options) { diff --git a/LeedsExperiment/Preservation.API/Data/PreservationContextConfiguration.cs b/LeedsExperiment/Preservation.API/Data/PreservationContextConfiguration.cs index 7780828..a903778 100644 --- a/LeedsExperiment/Preservation.API/Data/PreservationContextConfiguration.cs +++ b/LeedsExperiment/Preservation.API/Data/PreservationContextConfiguration.cs @@ -1,6 +1,6 @@ using Microsoft.EntityFrameworkCore; -namespace Preservation.API.Data; +namespace Storage.API.Data; /// /// Helpers for configuring db context diff --git a/LeedsExperiment/Preservation.API/Models/Identifiable.cs b/LeedsExperiment/Preservation.API/Models/Identifiable.cs index ed3b4ce..262dfeb 100644 --- a/LeedsExperiment/Preservation.API/Models/Identifiable.cs +++ b/LeedsExperiment/Preservation.API/Models/Identifiable.cs @@ -1,6 +1,6 @@ using System.Text; -namespace Preservation.API.Models; +namespace Storage.API.Models; // https://github.com/tomcrane/id-minter/blob/main/IdMinter/IdMinter/Identifiable.cs public class Identifiable diff --git a/LeedsExperiment/Preservation.API/Models/ModelConverter.cs b/LeedsExperiment/Preservation.API/Models/ModelConverter.cs index 491be24..397a097 100644 --- a/LeedsExperiment/Preservation.API/Models/ModelConverter.cs +++ b/LeedsExperiment/Preservation.API/Models/ModelConverter.cs @@ -2,9 +2,9 @@ using Fedora.Abstractions; using Fedora.Abstractions.Transfer; using Fedora.Storage; -using Preservation.API.Data.Entities; +using Storage.API.Data.Entities; -namespace Preservation.API.Models; +namespace Storage.API.Models; /// /// Easy r-to-l converters for various models diff --git a/LeedsExperiment/Preservation.API/Models/Models.cs b/LeedsExperiment/Preservation.API/Models/Models.cs index ae32605..2e44d02 100644 --- a/LeedsExperiment/Preservation.API/Models/Models.cs +++ b/LeedsExperiment/Preservation.API/Models/Models.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Preservation.API.Models; +namespace Storage.API.Models; /// /// Base class for Preservation API models diff --git a/LeedsExperiment/Preservation.API/Models/S3Helpers.cs b/LeedsExperiment/Preservation.API/Models/S3Helpers.cs index 1f6145a..a5ba7b6 100644 --- a/LeedsExperiment/Preservation.API/Models/S3Helpers.cs +++ b/LeedsExperiment/Preservation.API/Models/S3Helpers.cs @@ -1,6 +1,6 @@ using Amazon.S3.Model; -namespace Preservation.API.Models; +namespace Storage.API.Models; public static class S3Helpers { diff --git a/LeedsExperiment/Preservation.API/Models/UriGenerator.cs b/LeedsExperiment/Preservation.API/Models/UriGenerator.cs index 2a94132..f580072 100644 --- a/LeedsExperiment/Preservation.API/Models/UriGenerator.cs +++ b/LeedsExperiment/Preservation.API/Models/UriGenerator.cs @@ -1,7 +1,7 @@ using System.Diagnostics.CodeAnalysis; using Microsoft.Extensions.Options; -namespace Preservation.API.Models; +namespace Storage.API.Models; public class UriGenerator { diff --git a/LeedsExperiment/Preservation.API/Preservation.API.csproj b/LeedsExperiment/Preservation.API/Preservation.API.csproj index b431047..12bf214 100644 --- a/LeedsExperiment/Preservation.API/Preservation.API.csproj +++ b/LeedsExperiment/Preservation.API/Preservation.API.csproj @@ -9,8 +9,7 @@ - - + diff --git a/LeedsExperiment/Preservation.API/PreservationSettings.cs b/LeedsExperiment/Preservation.API/PreservationSettings.cs index 29dfc15..dd015c7 100644 --- a/LeedsExperiment/Preservation.API/PreservationSettings.cs +++ b/LeedsExperiment/Preservation.API/PreservationSettings.cs @@ -1,4 +1,4 @@ -namespace Preservation.API; +namespace Storage.API; public class PreservationSettings { diff --git a/LeedsExperiment/Preservation.API/Program.cs b/LeedsExperiment/Preservation.API/Program.cs index 4e6ace8..afe3e96 100644 --- a/LeedsExperiment/Preservation.API/Program.cs +++ b/LeedsExperiment/Preservation.API/Program.cs @@ -4,14 +4,14 @@ using Amazon.S3; using Microsoft.AspNetCore.HttpOverrides; using Microsoft.OpenApi.Models; -using Preservation; -using Preservation.API; -using Preservation.API.Data; -using Preservation.API.Models; -using Preservation.API.Services; -using Preservation.API.Services.Exporter; -using Preservation.API.Services.ImportJobs; -using PreservationApiClient; +using Storage; +using Storage.API; +using Storage.API.Data; +using Storage.API.Models; +using Storage.API.Services; +using Storage.API.Services.Exporter; +using Storage.API.Services.ImportJobs; +using StorageApiClient; var builder = WebApplication.CreateBuilder(args); @@ -26,7 +26,7 @@ builder.Services.Configure(builder.Configuration); var preservationConfig = builder.Configuration.Get()!; -builder.Services.AddHttpClient(client => +builder.Services.AddHttpClient(client => { client.BaseAddress = preservationConfig.StorageApiBaseAddress; client.DefaultRequestHeaders.Add("Accept", "application/json"); diff --git a/LeedsExperiment/Preservation.API/Services/Exporter/DepositExporter.cs b/LeedsExperiment/Preservation.API/Services/Exporter/DepositExporter.cs index 30aca34..c57fc63 100644 --- a/LeedsExperiment/Preservation.API/Services/Exporter/DepositExporter.cs +++ b/LeedsExperiment/Preservation.API/Services/Exporter/DepositExporter.cs @@ -1,10 +1,10 @@ using System.Diagnostics; -using Preservation.API.Data; -using Preservation.API.Data.Entities; +using Storage.API.Data; +using Storage.API.Data.Entities; -namespace Preservation.API.Services.Exporter; +namespace Storage.API.Services.Exporter; -public class DepositExporter(IPreservation preservation, PreservationContext dbContext, ILogger logger) +public class DepositExporter(IStorage storage, PreservationContext dbContext, ILogger logger) { public async Task Export(ExportRequest exportRequest, CancellationToken cancellationToken) { @@ -16,7 +16,7 @@ public async Task Export(ExportRequest exportRequest, CancellationToken cancella var exportKey = deposit.S3Root.AbsolutePath; var digitalObject = ArchivalGroupUriHelpers.GetArchivalGroupRelativePath(deposit.PreservationPath)!.OriginalString; var stopWatch = Stopwatch.StartNew(); - var exportResult = await preservation.Export(digitalObject, exportRequest.Version, exportKey); + var exportResult = await storage.Export(digitalObject, exportRequest.Version, exportKey); stopWatch.Stop(); logger.LogInformation("Export of deposit {Deposit} to {ExportKey} completed in {Elapsed}ms", deposit.Id, diff --git a/LeedsExperiment/Preservation.API/Services/Exporter/DepositExporterService.cs b/LeedsExperiment/Preservation.API/Services/Exporter/DepositExporterService.cs index c7a47ce..17f03ca 100644 --- a/LeedsExperiment/Preservation.API/Services/Exporter/DepositExporterService.cs +++ b/LeedsExperiment/Preservation.API/Services/Exporter/DepositExporterService.cs @@ -1,4 +1,4 @@ -namespace Preservation.API.Services.Exporter; +namespace Storage.API.Services.Exporter; /// /// Listens to queue export and handles export process diff --git a/LeedsExperiment/Preservation.API/Services/Exporter/InProcessExportQueue.cs b/LeedsExperiment/Preservation.API/Services/Exporter/InProcessExportQueue.cs index 50dd080..ea73802 100644 --- a/LeedsExperiment/Preservation.API/Services/Exporter/InProcessExportQueue.cs +++ b/LeedsExperiment/Preservation.API/Services/Exporter/InProcessExportQueue.cs @@ -1,8 +1,8 @@ using System.Threading.Channels; -using Preservation.API.Controllers; -using Preservation.API.Data.Entities; +using Storage.API.Controllers; +using Storage.API.Data.Entities; -namespace Preservation.API.Services.Exporter; +namespace Storage.API.Services.Exporter; public interface IExportQueue { diff --git a/LeedsExperiment/Preservation.API/Services/FakeIdentityService.cs b/LeedsExperiment/Preservation.API/Services/FakeIdentityService.cs index 7ea9473..f3fc040 100644 --- a/LeedsExperiment/Preservation.API/Services/FakeIdentityService.cs +++ b/LeedsExperiment/Preservation.API/Services/FakeIdentityService.cs @@ -1,8 +1,8 @@ using Microsoft.EntityFrameworkCore; -using Preservation.API.Data; -using Preservation.API.Models; +using Storage.API.Data; +using Storage.API.Models; -namespace Preservation.API.Services; +namespace Storage.API.Services; public class FakeIdentityService(PreservationContext dbContext) : IIdentityService { diff --git a/LeedsExperiment/Preservation.API/Services/ImportJobs/ImportJobExecutorService.cs b/LeedsExperiment/Preservation.API/Services/ImportJobs/ImportJobExecutorService.cs index ff5faf7..6ebb332 100644 --- a/LeedsExperiment/Preservation.API/Services/ImportJobs/ImportJobExecutorService.cs +++ b/LeedsExperiment/Preservation.API/Services/ImportJobs/ImportJobExecutorService.cs @@ -1,4 +1,4 @@ -namespace Preservation.API.Services.ImportJobs; +namespace Storage.API.Services.ImportJobs; public class ImportJobExecutorService( IServiceScopeFactory serviceScopeFactory, diff --git a/LeedsExperiment/Preservation.API/Services/ImportJobs/ImportJobRunner.cs b/LeedsExperiment/Preservation.API/Services/ImportJobs/ImportJobRunner.cs index a804c97..7c5b660 100644 --- a/LeedsExperiment/Preservation.API/Services/ImportJobs/ImportJobRunner.cs +++ b/LeedsExperiment/Preservation.API/Services/ImportJobs/ImportJobRunner.cs @@ -1,15 +1,15 @@ using System.Text.Json; using Fedora.Abstractions.Transfer; -using Preservation.API.Data; -using Preservation.API.Data.Entities; -using Preservation.API.Models; +using Storage.API.Data; +using Storage.API.Data.Entities; +using Storage.API.Models; -namespace Preservation.API.Services.ImportJobs; +namespace Storage.API.Services.ImportJobs; public class ImportJobRunner( PreservationContext dbContext, ModelConverter modelConverter, - IPreservation storageService, + IStorage storageService, ILogger logger) { public async Task Execute(string importJobId, CancellationToken stoppingToken) diff --git a/LeedsExperiment/Preservation.API/Services/ImportJobs/InProcessImportQueue.cs b/LeedsExperiment/Preservation.API/Services/ImportJobs/InProcessImportQueue.cs index af27c44..fb768c6 100644 --- a/LeedsExperiment/Preservation.API/Services/ImportJobs/InProcessImportQueue.cs +++ b/LeedsExperiment/Preservation.API/Services/ImportJobs/InProcessImportQueue.cs @@ -1,7 +1,7 @@ using System.Threading.Channels; -using Preservation.API.Data.Entities; +using Storage.API.Data.Entities; -namespace Preservation.API.Services.ImportJobs; +namespace Storage.API.Services.ImportJobs; public interface IImportJobQueue { diff --git a/LeedsExperiment/Preservation/AwsChecksum.cs b/LeedsExperiment/Preservation/AwsChecksum.cs index 6e9f2eb..71b7545 100644 --- a/LeedsExperiment/Preservation/AwsChecksum.cs +++ b/LeedsExperiment/Preservation/AwsChecksum.cs @@ -1,7 +1,7 @@ using Amazon.S3; using Amazon.S3.Model; -namespace Preservation; +namespace Storage; public class AwsChecksum { diff --git a/LeedsExperiment/Preservation/Checksum.cs b/LeedsExperiment/Preservation/Checksum.cs index 62f27f2..793707a 100644 --- a/LeedsExperiment/Preservation/Checksum.cs +++ b/LeedsExperiment/Preservation/Checksum.cs @@ -1,7 +1,7 @@ using System.Security.Cryptography; using System.Text; -namespace Preservation; +namespace Storage; public class Checksum { diff --git a/LeedsExperiment/Preservation/ExportResult.cs b/LeedsExperiment/Preservation/ExportResult.cs index b4d2097..75b94fc 100644 --- a/LeedsExperiment/Preservation/ExportResult.cs +++ b/LeedsExperiment/Preservation/ExportResult.cs @@ -1,7 +1,7 @@ using Fedora.Storage; using System.Text.Json.Serialization; -namespace Preservation; +namespace Storage; public class ExportResult { diff --git a/LeedsExperiment/Preservation/FedoraApiOptions.cs b/LeedsExperiment/Preservation/FedoraApiOptions.cs index 677c589..5f2f3fd 100644 --- a/LeedsExperiment/Preservation/FedoraApiOptions.cs +++ b/LeedsExperiment/Preservation/FedoraApiOptions.cs @@ -1,5 +1,5 @@  -namespace Preservation; +namespace Storage; public class FedoraApiOptions { diff --git a/LeedsExperiment/Preservation/FedoraAwsOptions.cs b/LeedsExperiment/Preservation/FedoraAwsOptions.cs index 9ca2b5a..1a09064 100644 --- a/LeedsExperiment/Preservation/FedoraAwsOptions.cs +++ b/LeedsExperiment/Preservation/FedoraAwsOptions.cs @@ -1,5 +1,5 @@  -namespace Preservation; +namespace Storage; public class FedoraAwsOptions { diff --git a/LeedsExperiment/Preservation/FedoraWrapper.cs b/LeedsExperiment/Preservation/FedoraWrapper.cs index a85f004..7671e8a 100644 --- a/LeedsExperiment/Preservation/FedoraWrapper.cs +++ b/LeedsExperiment/Preservation/FedoraWrapper.cs @@ -15,7 +15,7 @@ using System.Text; using System.Text.Json; -namespace Preservation; +namespace Storage; public class FedoraWrapper : IFedora { diff --git a/LeedsExperiment/Preservation/FileExtensionContentTypeProvider.cs b/LeedsExperiment/Preservation/FileExtensionContentTypeProvider.cs index a68c896..8db1d44 100644 --- a/LeedsExperiment/Preservation/FileExtensionContentTypeProvider.cs +++ b/LeedsExperiment/Preservation/FileExtensionContentTypeProvider.cs @@ -1,6 +1,6 @@ using System.Diagnostics.CodeAnalysis; -namespace Preservation; +namespace Storage; /// /// Provides a mapping between file extensions and MIME types. diff --git a/LeedsExperiment/Preservation/IPreservation.cs b/LeedsExperiment/Preservation/IStorage.cs similarity index 96% rename from LeedsExperiment/Preservation/IPreservation.cs rename to LeedsExperiment/Preservation/IStorage.cs index 5fcf209..56f0296 100644 --- a/LeedsExperiment/Preservation/IPreservation.cs +++ b/LeedsExperiment/Preservation/IStorage.cs @@ -1,10 +1,8 @@ using Fedora.Abstractions; -using Fedora.Abstractions.Transfer; -namespace Preservation; +namespace Storage; -// TODO should this be IStorage? -public interface IPreservation +public interface IStorage { // Getting things from Fedora // ========================== diff --git a/LeedsExperiment/Preservation/ImportJob.cs b/LeedsExperiment/Preservation/ImportJob.cs index 54d44ea..5f8f399 100644 --- a/LeedsExperiment/Preservation/ImportJob.cs +++ b/LeedsExperiment/Preservation/ImportJob.cs @@ -2,7 +2,7 @@ using Fedora.Storage; using System.Text.Json.Serialization; -namespace Preservation; +namespace Storage; public class ImportJob { diff --git a/LeedsExperiment/Preservation/ImportSource.cs b/LeedsExperiment/Preservation/ImportSource.cs index 4713d0c..a573747 100644 --- a/LeedsExperiment/Preservation/ImportSource.cs +++ b/LeedsExperiment/Preservation/ImportSource.cs @@ -1,7 +1,7 @@ using Fedora.Abstractions.Transfer; using System.Text.Json.Serialization; -namespace Preservation; +namespace Storage; public class ImportSource { diff --git a/LeedsExperiment/Preservation/JsonLdX.cs b/LeedsExperiment/Preservation/JsonLdX.cs index fcab066..4c425b4 100644 --- a/LeedsExperiment/Preservation/JsonLdX.cs +++ b/LeedsExperiment/Preservation/JsonLdX.cs @@ -1,6 +1,6 @@ using System.Text.Json; -namespace Preservation; +namespace Storage; public static class JsonLdX { diff --git a/LeedsExperiment/Preservation/NameAndParentPath.cs b/LeedsExperiment/Preservation/NameAndParentPath.cs index 4f1122a..b6e2be7 100644 --- a/LeedsExperiment/Preservation/NameAndParentPath.cs +++ b/LeedsExperiment/Preservation/NameAndParentPath.cs @@ -1,4 +1,4 @@ -namespace Preservation; +namespace Storage; public class NameAndParentPath { diff --git a/LeedsExperiment/Preservation/OcflS3StorageMapper.cs b/LeedsExperiment/Preservation/OcflS3StorageMapper.cs index 4e3115a..1574902 100644 --- a/LeedsExperiment/Preservation/OcflS3StorageMapper.cs +++ b/LeedsExperiment/Preservation/OcflS3StorageMapper.cs @@ -7,7 +7,7 @@ using Microsoft.Extensions.Options; using System.Text.Json; -namespace Preservation; +namespace Storage; public class OcflS3StorageMapper : IStorageMapper { diff --git a/LeedsExperiment/Preservation/PathSafe.cs b/LeedsExperiment/Preservation/PathSafe.cs index ba2e843..42a2e31 100644 --- a/LeedsExperiment/Preservation/PathSafe.cs +++ b/LeedsExperiment/Preservation/PathSafe.cs @@ -1,6 +1,6 @@ using System.Net; -namespace Preservation +namespace Storage { public class PathSafe { diff --git a/LeedsExperiment/Preservation/RequestX.cs b/LeedsExperiment/Preservation/RequestX.cs index f15e1bf..1621520 100644 --- a/LeedsExperiment/Preservation/RequestX.cs +++ b/LeedsExperiment/Preservation/RequestX.cs @@ -2,7 +2,7 @@ using Fedora.ApiModel; using Fedora.Vocab; -namespace Preservation; +namespace Storage; public static class RequestX { diff --git a/LeedsExperiment/Preservation/ResponseX.cs b/LeedsExperiment/Preservation/ResponseX.cs index 22b1722..d274be1 100644 --- a/LeedsExperiment/Preservation/ResponseX.cs +++ b/LeedsExperiment/Preservation/ResponseX.cs @@ -1,6 +1,6 @@ using Fedora.Vocab; -namespace Preservation; +namespace Storage; public static class ResponseX { diff --git a/LeedsExperiment/Preservation/S3ImportService.cs b/LeedsExperiment/Preservation/S3ImportService.cs index 1fad11b..e6e202a 100644 --- a/LeedsExperiment/Preservation/S3ImportService.cs +++ b/LeedsExperiment/Preservation/S3ImportService.cs @@ -5,7 +5,7 @@ using Fedora.Abstractions.Transfer; using Fedora.Storage; -namespace Preservation; +namespace Storage; public interface IImportService { diff --git a/LeedsExperiment/Preservation/Preservation.csproj b/LeedsExperiment/Preservation/Storage.csproj similarity index 100% rename from LeedsExperiment/Preservation/Preservation.csproj rename to LeedsExperiment/Preservation/Storage.csproj diff --git a/LeedsExperiment/Preservation/StorageApiOptions.cs b/LeedsExperiment/Preservation/StorageApiOptions.cs index fa4b0ce..fdeff0e 100644 --- a/LeedsExperiment/Preservation/StorageApiOptions.cs +++ b/LeedsExperiment/Preservation/StorageApiOptions.cs @@ -1,4 +1,4 @@ -namespace Preservation; +namespace Storage; public class StorageApiOptions { diff --git a/LeedsExperiment/Preservation/UriX.cs b/LeedsExperiment/Preservation/UriX.cs index 59535d6..5c2e5e2 100644 --- a/LeedsExperiment/Preservation/UriX.cs +++ b/LeedsExperiment/Preservation/UriX.cs @@ -1,5 +1,5 @@  -namespace Preservation +namespace Storage { // Probably want this somewhere else, and also use this stuff throughout codebase public static class UriX diff --git a/LeedsExperiment/PreservationApiClient/PreservationApiClient.csproj b/LeedsExperiment/PreservationApiClient/StorageApiClient.csproj similarity index 77% rename from LeedsExperiment/PreservationApiClient/PreservationApiClient.csproj rename to LeedsExperiment/PreservationApiClient/StorageApiClient.csproj index c4139a6..12e011e 100644 --- a/LeedsExperiment/PreservationApiClient/PreservationApiClient.csproj +++ b/LeedsExperiment/PreservationApiClient/StorageApiClient.csproj @@ -7,7 +7,7 @@ - + diff --git a/LeedsExperiment/PreservationApiClient/StorageService.cs b/LeedsExperiment/PreservationApiClient/StorageService.cs index c844c15..2dd42b7 100644 --- a/LeedsExperiment/PreservationApiClient/StorageService.cs +++ b/LeedsExperiment/PreservationApiClient/StorageService.cs @@ -1,12 +1,12 @@ using System.Net; using Fedora.Abstractions; -using Preservation; +using Storage; using System.Net.Http.Json; using System.Text.Json; -namespace PreservationApiClient; +namespace StorageApiClient; -public class StorageService : IPreservation +public class StorageService : IStorage { private readonly HttpClient httpClient; private static readonly JsonSerializerOptions Settings = new(JsonSerializerDefaults.Web); diff --git a/LeedsExperiment/SamplesWorker/Program.cs b/LeedsExperiment/SamplesWorker/Program.cs index facf2e5..b25a1d0 100644 --- a/LeedsExperiment/SamplesWorker/Program.cs +++ b/LeedsExperiment/SamplesWorker/Program.cs @@ -1,6 +1,6 @@ using Amazon.S3; using Fedora; -using Preservation; +using Storage; using SamplesWorker; using System.Net.Http.Headers; diff --git a/LeedsExperiment/SamplesWorker/SamplesWorker.csproj b/LeedsExperiment/SamplesWorker/SamplesWorker.csproj index eb5ba46..dc5b67b 100644 --- a/LeedsExperiment/SamplesWorker/SamplesWorker.csproj +++ b/LeedsExperiment/SamplesWorker/SamplesWorker.csproj @@ -18,6 +18,6 @@ - + diff --git a/LeedsExperiment/SamplesWorker/Worker.cs b/LeedsExperiment/SamplesWorker/Worker.cs index 013e218..dc15321 100644 --- a/LeedsExperiment/SamplesWorker/Worker.cs +++ b/LeedsExperiment/SamplesWorker/Worker.cs @@ -2,7 +2,7 @@ using Fedora.Abstractions; using Fedora.Abstractions.Transfer; using Fedora.Storage; -using Preservation; +using Storage; namespace SamplesWorker { diff --git a/LeedsExperiment/Storage.API/Controllers/ExportController.cs b/LeedsExperiment/Storage.API/Controllers/ExportController.cs index dc033c4..1af28e6 100644 --- a/LeedsExperiment/Storage.API/Controllers/ExportController.cs +++ b/LeedsExperiment/Storage.API/Controllers/ExportController.cs @@ -3,7 +3,7 @@ using Fedora.Storage; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Options; -using Preservation; +using Storage; namespace Storage.API.Controllers; diff --git a/LeedsExperiment/Storage.API/Controllers/ImportController.cs b/LeedsExperiment/Storage.API/Controllers/ImportController.cs index 368451b..d4cf7c3 100644 --- a/LeedsExperiment/Storage.API/Controllers/ImportController.cs +++ b/LeedsExperiment/Storage.API/Controllers/ImportController.cs @@ -3,7 +3,7 @@ using Fedora.ApiModel; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Options; -using Preservation; +using Storage; namespace Storage.API.Controllers; diff --git a/LeedsExperiment/Storage.API/Controllers/RepositoryController.cs b/LeedsExperiment/Storage.API/Controllers/RepositoryController.cs index 2427ef1..e0d8e6c 100644 --- a/LeedsExperiment/Storage.API/Controllers/RepositoryController.cs +++ b/LeedsExperiment/Storage.API/Controllers/RepositoryController.cs @@ -2,7 +2,7 @@ using Fedora.Abstractions; using Fedora.Abstractions.Transfer; using Microsoft.AspNetCore.Mvc; -using Preservation; +using Storage; namespace Storage.API.Controllers; diff --git a/LeedsExperiment/Storage.API/Program.cs b/LeedsExperiment/Storage.API/Program.cs index 7d858ef..6bf7ed9 100644 --- a/LeedsExperiment/Storage.API/Program.cs +++ b/LeedsExperiment/Storage.API/Program.cs @@ -1,6 +1,6 @@ using Amazon.S3; using Fedora; -using Preservation; +using Storage; using System.Net.Http.Headers; using System.Reflection; using Microsoft.OpenApi.Models; diff --git a/LeedsExperiment/Storage.API/Storage.API.csproj b/LeedsExperiment/Storage.API/Storage.API.csproj index 6d0f431..5e8bc57 100644 --- a/LeedsExperiment/Storage.API/Storage.API.csproj +++ b/LeedsExperiment/Storage.API/Storage.API.csproj @@ -20,7 +20,7 @@ - +