Skip to content

Commit

Permalink
Merged in task/dspace-cris-2023_02_x/DSC-1774 (pull request DSpace#2385)
Browse files Browse the repository at this point in the history
[DSC-1774] Display multiple affiliation & Alternative Names

Approved-by: Stefano Maffei
  • Loading branch information
eskander17 authored and steph-ieffam committed Jul 16, 2024
2 parents 116a891 + e739ffd commit 8ba49c7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,20 @@ public void singleItemAuthorityTest() throws Exception {
.withTitle("Author 1")
.withEntityType("person")
.withPersonMainAffiliation(orgUnit_1.getName(), orgUnit_1.getID().toString())
.withPersonAffiliation(orgUnit_1.getName(), orgUnit_1.getID().toString())
.build();

Item author_2 = ItemBuilder.createItem(context, col1)
.withTitle("Author 2")
.withPersonMainAffiliation(orgUnit_1.getName(), orgUnit_1.getID().toString())
.withPersonAffiliation(orgUnit_1.getName(), orgUnit_1.getID().toString())
.withEntityType("person")
.build();

Item author_3 = ItemBuilder.createItem(context, col1)
.withTitle("Author 3")
.withPersonMainAffiliation(orgUnit_2.getName(), orgUnit_2.getID().toString())
.withPersonAffiliation(orgUnit_2.getName(), orgUnit_2.getID().toString())
.withEntityType("person")
.build();

Expand Down Expand Up @@ -162,19 +165,19 @@ public void alternativeNamesAuthorityTest() throws Exception {
.withTitle("Author 1")
.withVariantName("Author Variant")
.withEntityType("person")
.withPersonMainAffiliation(orgUnit_1.getName(), orgUnit_1.getID().toString())
.withPersonAffiliation(orgUnit_1.getName(), orgUnit_1.getID().toString())
.build();

Item author_2 = ItemBuilder.createItem(context, col1)
.withTitle("Author 2")
.withVariantName("Author 2 Variant")
.withPersonMainAffiliation(orgUnit_1.getName(), orgUnit_1.getID().toString())
.withPersonAffiliation(orgUnit_1.getName(), orgUnit_1.getID().toString())
.withEntityType("person")
.build();

Item author_3 = ItemBuilder.createItem(context, col1)
.withTitle("Author 3")
.withPersonMainAffiliation(orgUnit_1.getName(), orgUnit_1.getID().toString())
.withPersonAffiliation(orgUnit_1.getName(), orgUnit_1.getID().toString())
.withEntityType("person")
.build();

Expand Down Expand Up @@ -247,14 +250,14 @@ public void multiItemAuthorityTest() throws Exception {

Item author_1 = ItemBuilder.createItem(context, col1)
.withTitle("Author 1")
.withPersonMainAffiliation(orgUnit_1.getName(), orgUnit_1.getID().toString())
.withPersonMainAffiliation(orgUnit_2.getName(), orgUnit_2.getID().toString())
.withPersonAffiliation(orgUnit_1.getName(), orgUnit_1.getID().toString())
.withPersonAffiliation(orgUnit_2.getName(), orgUnit_2.getID().toString())
.withEntityType("person")
.build();

Item author_2 = ItemBuilder.createItem(context, col1)
.withTitle("Author 2")
.withPersonMainAffiliation(orgUnit_2.getName(), orgUnit_2.getID().toString())
.withPersonAffiliation(orgUnit_2.getName(), orgUnit_2.getID().toString())
.withEntityType("person")
.build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -770,12 +770,14 @@ public void testMultipleSourcesReferences() throws Exception {
Item author_1 = ItemBuilder.createItem(context, col1)
.withTitle("Author 1")
.withPersonMainAffiliation(orgUnit_1.getName(), orgUnit_1.getID().toString())
.withPersonAffiliation(orgUnit_1.getName(), orgUnit_1.getID().toString())
.withEntityType("person")
.build();

Item author_2 = ItemBuilder.createItem(context, col1)
.withTitle("Author 2")
.withPersonMainAffiliation(orgUnit_2.getName(), orgUnit_2.getID().toString())
.withPersonAffiliation(orgUnit_2.getName(), orgUnit_2.getID().toString())
.withEntityType("person")
.build();

Expand Down Expand Up @@ -883,6 +885,7 @@ private Item buildPerson(String title, Item affiliation) {
.withTitle(title)
.withEntityType("Person")
.withPersonMainAffiliation(affiliation.getName(), affiliation.getID().toString())
.withPersonAffiliation(affiliation.getName(), affiliation.getID().toString())
.build();
}

Expand Down
1 change: 1 addition & 0 deletions dspace/config/modules/discovery.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ discovery.index.projection=dc.contributor.*
discovery.index.projection=dc.date.issued
discovery.index.projection=person.affiliation.name
discovery.index.projection=person.identifier.orcid
discovery.index.projection=oairecerif.person.affiliation

# Allow auto-reindexing.
# If any database migrations are applied to your database (via Flyway), then a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
<bean class="org.dspace.content.authority.ItemSimpleAuthorityMetadataGenerator">
<property name="authorityName" value="AuthorAuthority"/>
<property name="keyId" value="oairecerif_author_affiliation"/>
<property name="schema" value="person"/>
<property name="element" value="affiliation"/>
<property name="qualifier" value="name"/>
<property name="schema" value="oairecerif" />
<property name="element" value="person" />
<property name="qualifier" value="affiliation" />
<property name="singleResultOnAggregate" value="false"/>
</bean>

Expand Down

0 comments on commit 8ba49c7

Please sign in to comment.