diff --git a/aspnetcore/src/ApiModels/Publication/Publication.cs b/aspnetcore/src/ApiModels/Publication/Publication.cs
index 4e65c59..672d454 100644
--- a/aspnetcore/src/ApiModels/Publication/Publication.cs
+++ b/aspnetcore/src/ApiModels/Publication/Publication.cs
@@ -285,12 +285,12 @@ public class Publication
public DateTime? Modified { get; set; }
///
- /// Osajulkaisun yhteisjulkaisu - TEMPORARY NAME
+ /// Combined information of co-publications based on national publication data collection
///
- public string? Yhteisjulkaisu { get; set; }
+ public string? CoPublicationID { get; set; }
///
- /// Yhteisjulkaisuun liittyvät osajulkaisut - TEMPORARY NAME
+ /// Publication information sent by individual organisations related to co-publications as part of national publication data collection
///
- public List? Osajulkaisut { get; set; }
+ public List? OrgPublicationIDs { get; set; }
}
\ No newline at end of file
diff --git a/aspnetcore/src/ApiModels/Query/GetPublicationsQueryParameters.cs b/aspnetcore/src/ApiModels/Query/GetPublicationsQueryParameters.cs
index d01dd7d..48e46c1 100644
--- a/aspnetcore/src/ApiModels/Query/GetPublicationsQueryParameters.cs
+++ b/aspnetcore/src/ApiModels/Query/GetPublicationsQueryParameters.cs
@@ -186,14 +186,14 @@ public class GetPublicationsQueryParameters : PaginationQueryParameters
public string? ModifiedTo { get; set; }
///
- /// If the selection is true, co-publications will be returned.
+ /// If the selection is true, publication information sent by individual organisations related to co-publications as part of national publication data collection will be returned. Not returned by default.
///
- ///
- public bool? ShowCoPublications { get; set; }
+ ///
+ public bool? ShowOrganisationPartofCoPublication { get; set; }
///
- /// If the selection is true, main publications will be filtered out.
+ /// If the selection is true, combined information of co-publications based on national publication data collection will be filtered out. Returned by default.
///
- ///
- public bool? HideMainPublications { get; set; }
+ ///
+ public bool? HideCoPublications { get; set; }
}
\ No newline at end of file
diff --git a/aspnetcore/src/ElasticService/ElasticSearchQueryGenerators/PublicationQueryGenerator.cs b/aspnetcore/src/ElasticService/ElasticSearchQueryGenerators/PublicationQueryGenerator.cs
index 623bb43..1f7b9a8 100644
--- a/aspnetcore/src/ElasticService/ElasticSearchQueryGenerators/PublicationQueryGenerator.cs
+++ b/aspnetcore/src/ElasticService/ElasticSearchQueryGenerators/PublicationQueryGenerator.cs
@@ -150,17 +150,17 @@ private static IEnumerable, QueryCont
{
var filters = new List, QueryContainer>>();
- if (parameters.ShowCoPublications is null || (bool)parameters.ShowCoPublications == false)
+ if (parameters.ShowOrganisationPartofCoPublication is null || (bool)parameters.ShowOrganisationPartofCoPublication == false)
{
filters.Add(t =>
- t.Term(s => s.Field(f => f.IsCoPublication)
+ t.Term(s => s.Field(f => f.IsOrgPublication)
.Value(false)));
}
- if (parameters.HideMainPublications is not null && (bool)parameters.HideMainPublications == true)
+ if (parameters.HideCoPublications is not null && (bool)parameters.HideCoPublications == true)
{
filters.Add(t =>
- t.Term(s => s.Field(f => f.IsMainPublication)
+ t.Term(s => s.Field(f => f.IsCoPublication)
.Value(false)));
}
diff --git a/aspnetcore/src/ElasticService/SearchParameters/PublicationSearchParameters.cs b/aspnetcore/src/ElasticService/SearchParameters/PublicationSearchParameters.cs
index 4207ecd..9d5dc8c 100644
--- a/aspnetcore/src/ElasticService/SearchParameters/PublicationSearchParameters.cs
+++ b/aspnetcore/src/ElasticService/SearchParameters/PublicationSearchParameters.cs
@@ -56,7 +56,7 @@ public class PublicationSearchParameters
public string? ModifiedTo { get; set; }
- public bool? ShowCoPublications { get; set; }
+ public bool? ShowOrganisationPartofCoPublication { get; set; }
- public bool? HideMainPublications { get; set; }
+ public bool? HideCoPublications { get; set; }
}
\ No newline at end of file
diff --git a/aspnetcore/src/Repositories/Maps/PublicationProfile.cs b/aspnetcore/src/Repositories/Maps/PublicationProfile.cs
index e0417f8..b850908 100644
--- a/aspnetcore/src/Repositories/Maps/PublicationProfile.cs
+++ b/aspnetcore/src/Repositories/Maps/PublicationProfile.cs
@@ -28,6 +28,7 @@ public PublicationProfile()
.ForMember(dst => dst.ApcPaymentYear, opt =>opt.MapFrom(src => (DateTime?)(src.ApcPaymentYear.HasValue ? new DateTime(src.ApcPaymentYear.Value,1,1,0,0,0,DateTimeKind.Utc) : null)))
.ForMember(dst => dst.AuthorsText, opt => opt.MapFrom(src => src.AuthorsText))
.ForMember(dst => dst.DatabaseContributions, opt => opt.MapFrom(src => src.FactContributions))
+ .ForMember(dst => dst.orgPublicationDTOs, opt => opt.MapFrom(src => src.InverseDimPublicationNavigation))
.ForMember(dst => dst.Format, opt => opt.MapFrom(src => src.PublicationTypeCode2Navigation))
.ForMember(dst => dst.ParentPublicationType, opt => opt.MapFrom(src => src.ParentPublicationTypeCodeNavigation))
.ForMember(dst => dst.DatabasePeerReviewed, opt => opt.MapFrom(src => src.PeerReviewed))
@@ -78,10 +79,10 @@ public PublicationProfile()
.ForMember(dst => dst.Authors, opt => opt.Ignore()) // Handled during in memory operations in the index repository
.ForMember(dst => dst.PeerReviewed, opt => opt.Ignore()) // Handled during in memory operations in the index repository
.ForMember(dst => dst.ParentPublication, opt => opt.Ignore()) // Handled during in memory operations in the index repository
- .ForMember(dst => dst.IsCoPublication, opt => opt.MapFrom(src => src.DimPublicationId != null && src.DimPublicationId > 0)) // Publication is a co-publication, when DimPublicationId references main publication. This property is used in query filter.
- .ForMember(dst => dst.IsMainPublication, opt => opt.MapFrom(src => src.InverseDimPublicationNavigation.Count > 0)) // Publication is main publication, when InverseDimPublicationNavigation references one or more co-publications. This property is used in query filter.
- .ForMember(dst => dst.Yhteisjulkaisu, opt => opt.MapFrom(src => src.DimPublicationId != null && src.DimPublicationId > 0 ? src.DimPublicationNavigation.PublicationId : null))
- .ForMember(dst => dst.Osajulkaisut, opt => opt.MapFrom(src => src.InverseDimPublicationNavigation.Select(t => t.PublicationId)));
+ .ForMember(dst => dst.IsOrgPublication, opt => opt.MapFrom(src => src.DimPublicationId != null && src.DimPublicationId > 0)) // Publication is an organization publication, when DimPublicationId references co-publication. This property is used in query filter.
+ .ForMember(dst => dst.IsCoPublication, opt => opt.MapFrom(src => src.InverseDimPublicationNavigation.Count > 0)) // Publication is a co-publication, when InverseDimPublicationNavigation references one or more organization publications. This property is used in query filter.
+ .ForMember(dst => dst.CoPublicationID, opt => opt.MapFrom(src => src.DimPublicationId != null && src.DimPublicationId > 0 ? src.DimPublicationNavigation.PublicationId : null))
+ .ForMember(dst => dst.OrgPublicationIDs, opt => opt.MapFrom(src => src.InverseDimPublicationNavigation.Select(t => t.PublicationId)));
CreateProjection()
.AddTransform(s => string.IsNullOrWhiteSpace(s) ? null : s)
@@ -136,6 +137,10 @@ public PublicationProfile()
.ForMember(dst => dst.ArtPublicationRole, opt => opt.MapFrom(src => src.DimReferencedataActorRole))
.ForMember(dst => dst.ContributionType, opt => opt.MapFrom(src => src.ContributionType));
+ CreateProjection()
+ .ForMember(dst => dst.Id, opt => opt.MapFrom(src => src.Id))
+ .ForMember(dst => dst.DatabaseContributions, opt => opt.MapFrom(src => src.FactContributions));
+
CreateProjection()
.AddTransform(s => string.IsNullOrWhiteSpace(s) ? null : s)
.ForMember(dst => dst.NameId, opt => opt.MapFrom(src => src.Id))
diff --git a/aspnetcore/src/Repositories/PublicationIndexRepository.cs b/aspnetcore/src/Repositories/PublicationIndexRepository.cs
index 316d392..f345bcb 100644
--- a/aspnetcore/src/Repositories/PublicationIndexRepository.cs
+++ b/aspnetcore/src/Repositories/PublicationIndexRepository.cs
@@ -81,6 +81,14 @@ public override List