Skip to content

Commit

Permalink
Merged in dspace-cris-2023_02_x-DSC-1641 (pull request DSpace#2006)
Browse files Browse the repository at this point in the history
Fix dc.type mapping for scopus and set default value

Approved-by: Vincenzo Mecca
  • Loading branch information
atarix83 authored and vins01-4science committed May 2, 2024
2 parents eedae59 + fac74f2 commit 3ec591e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public Choices getMatches(String query, int start, int limit, String locale) {
}
}
Choice[] vArray = new Choice[v.size()];
return new Choices(v.toArray(vArray), start, found, Choices.CF_AMBIGUOUS, false, dflt);
return new Choices(v.toArray(vArray), start, found, Choices.CF_UNSET, false, dflt);
}

@Override
Expand All @@ -187,8 +187,8 @@ public Choices getBestMatch(String text, String locale) {
for (int i = 0; i < valuesLocale.length; ++i) {
if (text.equalsIgnoreCase(valuesLocale[i])) {
Choice v[] = new Choice[1];
v[0] = new Choice(String.valueOf(i), valuesLocale[i], labelsLocale[i]);
return new Choices(v, 0, v.length, Choices.CF_UNCERTAIN, false, 0);
v[0] = new Choice(null, valuesLocale[i], labelsLocale[i]);
return new Choices(v, 0, v.length, Choices.CF_UNSET, false, 0);
}
}
return new Choices(Choices.CF_NOTFOUND);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ private ArrayList<ImportRecord> getRecords() {
MetadatumDTO doi = createMetadatumDTO("dc", "identifier", null, "10.3934/mine.2023004");
MetadatumDTO title = createMetadatumDTO("dc","title", null,
"Hardy potential versus lower order terms in Dirichlet problems: regularizing effects<sup>†</sup>");
MetadatumDTO type = createMetadatumDTO("dc", "type", null, "Resource Types::text::journal::journal article");
MetadatumDTO type = createMetadatumDTO("dc", "type", null, "text::journal::journal article");
MetadatumDTO date = createMetadatumDTO("dc", "date", "issued", "2023-01-01");
MetadatumDTO scopusId = createMetadatumDTO("dc", "identifier", "scopus", "2-s2.0-85124241875");
MetadatumDTO citationVolume = createMetadatumDTO("oaire", "citation", "volume", "5");
Expand Down Expand Up @@ -233,7 +233,7 @@ private ArrayList<ImportRecord> getRecords() {
"Large deviations for a binary collision model: energy evaporation<sup>†</sup>");
MetadatumDTO date2 = createMetadatumDTO("dc", "date", "issued", "2023-01-01");
MetadatumDTO scopusId2 = createMetadatumDTO("dc", "identifier", "scopus", "2-s2.0-85124226483");
MetadatumDTO type2 = createMetadatumDTO("dc", "type", null, "Resource Types::text::journal::journal article");
MetadatumDTO type2 = createMetadatumDTO("dc", "type", null, "text::journal::journal article");
MetadatumDTO citationVolume2 = createMetadatumDTO("oaire", "citation", "volume", "5");
MetadatumDTO citationIssue2 = createMetadatumDTO("oaire", "citation", "issue", "1");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
ar = Resource Types::text::journal::journal article
er = Resource Types::text::journal::journal article::corrigendum
re = Resource Types::text::journal::journal article::review article
cp = Resource Types::text::conference output::conference proceedings::conference paper
bk = Resource Types::text::book
ch = Resource Types::text::book chapter
ed = Resource Types::text::journal::editorial
le = Resource Types::text::letter
cr = Resource Types::text::review
ab = Resource Types::text::report
bz = Resource Types::text::journal::journal article
no = Resource Types::text
pr = Resource Types::text
sh = Resource Types::text
ar = text::journal::journal article
er = text::journal::journal article::corrigendum
re = text::journal::journal article::review article
cp = text::conference output::conference proceedings::conference paper
bk = text::book
ch = text::book chapter
ed = text::journal::editorial
le = text::letter
cr = text::review
ab = text::report
bz = text::journal::journal article
no = text
pr = text
sh = text
2 changes: 1 addition & 1 deletion dspace/config/spring/api/crosswalks.xml
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@
<bean name="mapConverterScopusToCoarPublicationTypes" class="org.dspace.util.SimpleMapConverter" init-method="init">
<property name="converterNameFile" value="mapConverter-scopusToCoarPublicationTypes.properties" />
<property name="configurationService" ref="org.dspace.services.ConfigurationService" />
<property name="defaultValue" value=""/>
<property name="defaultValue" value="other"/>
</bean>

<bean name="mapConverterDataciteToPublicationTypes" class="org.dspace.util.SimpleMapConverter" init-method="init">
Expand Down

0 comments on commit 3ec591e

Please sign in to comment.