Skip to content

Commit

Permalink
Merge branch 'dspace-cris-2023_02_x' into main-cris
Browse files Browse the repository at this point in the history
# Conflicts:
#	dspace-api/pom.xml
#	dspace-iiif/pom.xml
#	dspace-oai/pom.xml
#	dspace-rdf/pom.xml
#	dspace-rest/pom.xml
#	dspace-server-webapp/pom.xml
#	dspace-services/pom.xml
#	dspace-sword/pom.xml
#	dspace-swordv2/pom.xml
#	dspace/modules/additions/pom.xml
#	dspace/modules/pom.xml
#	dspace/modules/rest/pom.xml
#	dspace/modules/server-boot/pom.xml
#	dspace/modules/server/pom.xml
#	dspace/pom.xml
#	pom.xml
  • Loading branch information
atarix83 committed Mar 12, 2024
2 parents 029adbc + cae9dfe commit 73beed3
Show file tree
Hide file tree
Showing 21 changed files with 2,984 additions and 402 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ public boolean isPublic() {

@Override
public boolean storeAuthorityInMetadata() {
init();
return storeAuthority;
}

Expand Down

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion dspace-api/src/test/data/dspaceFolder/config/local.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -226,4 +226,5 @@ choices.presentation.dspace.object.owner = suggest
authority.controlled.dspace.object.owner = true

# force the event system to work synchronously during test
system-event.thread.size = 0
system-event.thread.size = 0
vocabulary.plugin.srsc-noauthority.authority.store = false
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
The contents of this file are subject to the license and copyright
detailed in the LICENSE and NOTICE files at the root of the source
tree and available online at
http://www.dspace.org/license/
-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"
>

<context:annotation-config />

<bean class="org.dspace.content.enhancer.impl.RelatedEntityItemEnhancer" >
<property name="sourceEntityType" value="TestEntity" />
<property name="sourceItemMetadataFields">
<list>
<value>dc.contributor.author</value>
<value>dc.contributor.editor</value>
</list>
</property>
<property name="relatedItemMetadataFields">
<list>
<value>person.affiliation.name</value>
<value>person.identifier.orcid</value>
</list>
</property>
<property name="virtualQualifier" value="testmultival" />
</bean>

</beans>
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public void testWorkbookBuildingFromItemDtos() throws Exception {
with("dc.contributor.author", "White, Walter", authorId, 600),
with("oairecerif.author.affiliation", PLACEHOLDER_PARENT_METADATA_VALUE),
with("cris.virtual.department", PLACEHOLDER_PARENT_METADATA_VALUE),
with("cris.virtual.author-orcid", PLACEHOLDER_PARENT_METADATA_VALUE)));
with("cris.virtual.orcid", PLACEHOLDER_PARENT_METADATA_VALUE)));

assertThat(getItemBitstreamsByBundle(firstItem, "ORIGINAL"), contains(
bitstreamWith("Bitstream 1", "First bitstream content"),
Expand All @@ -242,8 +242,8 @@ public void testWorkbookBuildingFromItemDtos() throws Exception {
with("oairecerif.author.affiliation", "Company", 1),
with("cris.virtual.department", PLACEHOLDER_PARENT_METADATA_VALUE),
with("cris.virtual.department", PLACEHOLDER_PARENT_METADATA_VALUE),
with("cris.virtual.author-orcid", PLACEHOLDER_PARENT_METADATA_VALUE),
with("cris.virtual.author-orcid", PLACEHOLDER_PARENT_METADATA_VALUE)
with("cris.virtual.orcid", PLACEHOLDER_PARENT_METADATA_VALUE),
with("cris.virtual.orcid", PLACEHOLDER_PARENT_METADATA_VALUE)
));

assertThat(getItemBitstreamsByBundle(secondItem, "ORIGINAL"), contains(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ protected boolean matchesSafely(MetadataValue metadataValue) {
Objects.equals(metadataValue.getMetadataField().toString('.'), field) &&
Objects.equals(metadataValue.getLanguage(), language) &&
Objects.equals(metadataValue.getAuthority(), authority) &&
Objects.equals(metadataValue.getPlace(), place) &&
(Objects.isNull(place)
|| Objects.equals(metadataValue.getPlace(), place)) &&
Objects.equals(metadataValue.getConfidence(), confidence) &&
Objects.equals(metadataValue.getSecurityLevel(), securityLevel);
}
Expand All @@ -91,6 +92,10 @@ public static MetadataValueMatcher with(String field, String value) {
return with(field, value, null, null, 0, -1);
}

public static MetadataValueMatcher withNoPlace(String field, String value) {
return with(field, value, null, null, null, -1);
}

public static MetadataValueMatcher withSecurity(String field, String value, Integer securityLevel) {
return with(field, value, null, null, 0, -1, securityLevel);
}
Expand Down
Loading

0 comments on commit 73beed3

Please sign in to comment.