Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [9.3.0] - Unreleased
- Add Extraction Name to Catalogues

## [9.2.3] - 2026-05-28
- Fix issue with extractable project data set creation for project specific catalogues
- Add ability to view proposed Archive Trigger SQL on an Extraction Dataset
Expand Down
10 changes: 10 additions & 0 deletions Rdmp.Core/Curation/Data/Catalogue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ public sealed class Catalogue : DatabaseEntity, IComparable, ICatalogue, IInject
private string _doi;
private Lazy<CatalogueItem[]> _knownCatalogueItems;

private string _extractionName;


/// <inheritdoc/>
[Unique]
Expand All @@ -129,6 +131,13 @@ public string Name
set => SetField(ref _name, value);
}

[Unique]
public string ExtractionName
{
get => _extractionName;
set => SetField(ref _extractionName, value);
}

/// <inheritdoc/>
[DoNotImportDescriptions]
[UsefulProperty]
Expand Down Expand Up @@ -972,6 +981,7 @@ internal Catalogue(ICatalogueRepository repository, DbDataReader r)

Acronym = r["Acronym"].ToString();
Name = r["Name"].ToString();
ExtractionName = r["ExtractionName"].ToString();
Description = r["Description"].ToString();

//detailed info url with support for invalid urls
Expand Down
2 changes: 1 addition & 1 deletion Rdmp.Core/Curation/Data/ICatalogue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public interface ICatalogue : IHasDependencies, IHasQuerySyntaxHelper, INamed, I
/// </summary>
string Description { get; set; }


string ExtractionName { get; set; }
string ShortDescription { get;set; }
string DataType { get; set; }
string DataSubType { get; set; }
Expand Down
4 changes: 3 additions & 1 deletion Rdmp.Core/DataExport/Data/ExtractableDataSet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,10 @@ public override string ToString()
if (Catalogue == null)
return $"DELETED CATALOGUE {Catalogue_ID}";


string name = Catalogue.ExtractionName != null? Catalogue.ExtractionName:Catalogue.Name;
//only bother refreshing Catalogue details if we will be able to get a legit catalogue name
return Catalogue.IsDeprecated ? $"DEPRECATED CATALOGUE {Catalogue.Name}" : Catalogue.Name;
return Catalogue.IsDeprecated ? $"DEPRECATED CATALOGUE {name}" : name;
}

#region Stuff for updating our internal database records
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ private string GetIndexName()
indexName = indexName.Replace("$e", _request.Configuration.ID.ToString());
if (_request is ExtractDatasetCommand extractDatasetCommand)
{
indexName = indexName.Replace("$d", extractDatasetCommand.DatasetBundle.DataSet.Catalogue.Name);
indexName = indexName.Replace("$d", extractDatasetCommand.DatasetBundle.DataSet.Catalogue.ExtractionName != null ? extractDatasetCommand.DatasetBundle.DataSet.Catalogue.ExtractionName : extractDatasetCommand.DatasetBundle.DataSet.Catalogue.Name);
indexName = indexName.Replace("$a", extractDatasetCommand.DatasetBundle.DataSet.Catalogue.Acronym);
}

Expand Down Expand Up @@ -457,7 +457,7 @@ private string GetTableName(string suffix = null)

if (_request is ExtractDatasetCommand extractDatasetCommand)
{
tblName = tblName.Replace("$d", extractDatasetCommand.DatasetBundle.DataSet.Catalogue.Name);
tblName = tblName.Replace("$d", extractDatasetCommand.DatasetBundle.DataSet.Catalogue.ExtractionName != null ? extractDatasetCommand.DatasetBundle.DataSet.Catalogue.ExtractionName : extractDatasetCommand.DatasetBundle.DataSet.Catalogue.Name);
tblName = tblName.Replace("$a", extractDatasetCommand.DatasetBundle.DataSet.Catalogue.Acronym);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ private string GetTableName(string suffix, DataTable dt)

if (_request is ExtractDatasetCommand extractDatasetCommand)
{
tblName = tblName.Replace("$d", extractDatasetCommand.DatasetBundle.DataSet.Catalogue.Name);
tblName = tblName.Replace("$d", extractDatasetCommand.DatasetBundle.DataSet.Catalogue.ExtractionName != null ? extractDatasetCommand.DatasetBundle.DataSet.Catalogue.ExtractionName : extractDatasetCommand.DatasetBundle.DataSet.Catalogue.Name);
tblName = tblName.Replace("$a", extractDatasetCommand.DatasetBundle.DataSet.Catalogue.Acronym);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public string GetTableName()
switch (_request)
{
case ExtractDatasetCommand extractDatasetCommand:
tblName = tblName.Replace("$d", extractDatasetCommand.DatasetBundle.DataSet.Catalogue.Name);
tblName = tblName.Replace("$d", extractDatasetCommand.DatasetBundle.DataSet.Catalogue.ExtractionName != null ? extractDatasetCommand.DatasetBundle.DataSet.Catalogue.ExtractionName : extractDatasetCommand.DatasetBundle.DataSet.Catalogue.Name);
tblName = tblName.Replace("$a", extractDatasetCommand.DatasetBundle.DataSet.Catalogue.Acronym);
break;
case ExtractGlobalsCommand:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ CREATE TABLE [dbo].[Catalogue](
[ID] [int] IDENTITY(1,1) NOT NULL,
[Acronym] [varchar](50) NULL,
[Name] [varchar](1000) NULL,
[ExtractionName] [varchar](1000) NULL,
[Description] [text] NULL,
[Detail_Page_URL] [varchar](150) NULL,
[Type] [varchar](50) NULL,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--Version: 9.3.0
--Description: Add new metadata fields for catalogues
if not exists (select 1 from sys.columns where name = 'ExtractionName' and OBJECT_NAME(object_id) = 'Catalogue')
BEGIN
ALTER TABLE [dbo].[Catalogue]
ADD
[ExtractionName] [varchar](1000) NULL
END
GO


1 change: 1 addition & 0 deletions Rdmp.Core/Rdmp.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@
<EmbeddedResource Include="Databases\CatalogueDatabase\up\078_AddLastLoadTimeToLoadMetadata.sql" />
<EmbeddedResource Include="Databases\CatalogueDatabase\up\084_AddLoadDirectorySplit.sql" />
<EmbeddedResource Include="Databases\CatalogueDatabase\up\085_AddTicketingReleaseStatuses.sql" />
<EmbeddedResource Include="Databases\CatalogueDatabase\up\093_AddCatalogueExtractionName.sql" />
<EmbeddedResource Include="Databases\CatalogueDatabase\up\092_AddCatalogueInternalNote.sql" />
<EmbeddedResource Include="Databases\CatalogueDatabase\up\091_AddTemplateFlagToCIC.sql" />
<EmbeddedResource Include="Databases\CatalogueDatabase\up\090_UpdateCatalogueMetadata.sql" />
Expand Down
35 changes: 35 additions & 0 deletions Rdmp.UI/MainFormUITabs/CatalogueUI.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Rdmp.UI/MainFormUITabs/CatalogueUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,13 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
item.Visible = false;
}
Bind(tbAcronym, "Text", "Acronym", c => c.Acronym);
Bind(tbExtractionName, "Text", "ExtractionName", c => c.ExtractionName);
Bind(tbAbstract, "Text", "ShortDescription", c => c.ShortDescription);
Bind(tbDescription, "Text", "Description", c => c.Description);
aiAcronym.TooltipText = CatalogueUIHelperText.Acronym;
aiAcronym.SetItemActivator(Activator);
AIExtractionName.TooltipText = CatalogueUIHelperText.ExtractionName;
AIExtractionName.SetItemActivator(Activator);
aiShortDescription.TooltipText = CatalogueUIHelperText.ShortDescription;
aiShortDescription.SetItemActivator(Activator);
aiDescription.TooltipText = CatalogueUIHelperText.Description;
Expand Down
1 change: 1 addition & 0 deletions Rdmp.UI/MainFormUITabs/CatalogueUIHelperText.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{
public static class CatalogueUIHelperText
{
public static readonly string ExtractionName = "TODO";
public static readonly string Acronym = "A shorthand name for the catalogue.";
public static readonly string ShortDescription = """
The Short Description should provide a clear and brief descriptive signpost for researchers who are searching for data that may be relevant to their research.
Expand Down
6 changes: 3 additions & 3 deletions SharedAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

[assembly: AssemblyVersion("9.2.3")]
[assembly: AssemblyFileVersion("9.2.3")]
[assembly: AssemblyInformationalVersion("9.2.3")]
[assembly: AssemblyVersion("9.3.0")]
[assembly: AssemblyFileVersion("9.3.0")]
[assembly: AssemblyInformationalVersion("9.3.0")]
Loading