[CST-5303] refactoring WOS

This commit is contained in:
Mykhaylo
2022-06-09 15:09:18 +02:00
parent 3f57305529
commit b16780d816
6 changed files with 83 additions and 52 deletions

View File

@@ -90,8 +90,7 @@ public class WosAttribute2ValueContributor implements MetadataContributor<Elemen
for (String id : attributeValue2metadata.keySet()) {
if (StringUtils.equals(id, attributeValue)) {
if (this.firstChild) {
String value = "";
//el.getFirstChildWithName(new QName(this.childName)).getText();
String value = el.getChild(this.childName).getValue();
values.add(metadataFieldMapping.toDCValue(attributeValue2metadata.get(id), value));
} else {
values.add(metadataFieldMapping.toDCValue(attributeValue2metadata.get(id), el.getText()));

View File

@@ -34,9 +34,9 @@ public class AbstractLiveImportIntegrationTest extends AbstractControllerIntegra
protected void matchRecords(ArrayList<ImportRecord> recordsImported, ArrayList<ImportRecord> records2match) {
assertEquals(records2match.size(), recordsImported.size());
for (int i = 0; i < recordsImported.size(); i++) {
ImportRecord firstImported = recordsImported.get(i);
ImportRecord first2match = records2match.get(i);
checkMetadataValue(firstImported.getValueList(), first2match.getValueList());
ImportRecord imported = recordsImported.get(i);
ImportRecord toMatch = records2match.get(i);
checkMetadataValue(imported.getValueList(), toMatch.getValueList());
}
}

View File

@@ -106,26 +106,56 @@ public class WOSImportMetadataSourceServiceIT extends AbstractLiveImportIntegrat
MetadatumDTO startPage = createMetadatumDTO("oaire","citation", "startPage", "225");
MetadatumDTO endPage = createMetadatumDTO("oaire","citation", "endPage", "234");
MetadatumDTO type = createMetadatumDTO("dc", "type", null, "Book in series");
MetadatumDTO issn = createMetadatumDTO("dc", "relation", "issn", "2340-1117");
MetadatumDTO ispartof = createMetadatumDTO("dc", "relation", "ispartof",
"EDULEARN19: 11TH INTERNATIONAL CONFERENCE ON EDUCATION AND NEW LEARNING TECHNOLOGIES");
MetadatumDTO ispartofseries = createMetadatumDTO("dc", "relation", "ispartofseries",
"EDULEARN19: 11TH INTERNATIONAL CONFERENCE ON EDUCATION AND NEW LEARNING TECHNOLOGIES");
MetadatumDTO title = createMetadatumDTO("dc", "title", null,
"MENTORING IN EDUCATION. FEMALE ROLE MODELS IN ITALIAN DESIGN ACADEMIC CULTURE");
MetadatumDTO issn = createMetadatumDTO("dc", "identifier", "issn", "2340-1117");
MetadatumDTO isbn = createMetadatumDTO("dc", "identifier", "isbn", "978-84-09-12031-4");
MetadatumDTO description = createMetadatumDTO("dc", "description", "abstract",
"It is widely recognized that mentors and tutors are");
MetadatumDTO iso = createMetadatumDTO("dc", "language", "iso", "1");
MetadatumDTO author = createMetadatumDTO("dc", "contributor", "author", "Bollini, Letizia");
MetadatumDTO author2 = createMetadatumDTO("dc", "contributor", "author", "Chova, LG");
MetadatumDTO author3 = createMetadatumDTO("dc", "contributor", "author", "Martinez, AL");
MetadatumDTO author4 = createMetadatumDTO("dc", "contributor", "author", "Torres, IC");
MetadatumDTO isi = createMetadatumDTO("dc", "identifier", "isi", "WOS:000551093100034");
MetadatumDTO subject = createMetadatumDTO("dc", "subject", null, "VISUAL DESIGN");
MetadatumDTO subject2 = createMetadatumDTO("dc", "subject", null, "EXPERIENCE");
MetadatumDTO subject3 = createMetadatumDTO("dc", "subject", null, "Design education");
MetadatumDTO subject4 = createMetadatumDTO("dc", "subject", null, "female role models");
MetadatumDTO subject5 = createMetadatumDTO("dc", "subject", null, "mentoring in education");
MetadatumDTO subject6 = createMetadatumDTO("dc", "subject", null, "Social Sciences");
MetadatumDTO editor = createMetadatumDTO("dc", "contributor", "editor", "Chova, LG");
MetadatumDTO editor2 = createMetadatumDTO("dc", "contributor", "editor", "Martinez, AL");
MetadatumDTO editor3 = createMetadatumDTO("dc", "contributor", "editor", "Torres, IC");
MetadatumDTO isi = createMetadatumDTO("dc", "identifier", "other", "WOS:000551093100034");
metadatums.add(edition);
metadatums.add(date);
metadatums.add(startPage);
metadatums.add(endPage);
metadatums.add(type);
metadatums.add(ispartof);
metadatums.add(ispartofseries);
metadatums.add(title);
metadatums.add(issn);
metadatums.add(isbn);
metadatums.add(description);
metadatums.add(iso);
metadatums.add(author);
metadatums.add(author2);
metadatums.add(author3);
metadatums.add(author4);
metadatums.add(subject);
metadatums.add(subject2);
metadatums.add(subject3);
metadatums.add(subject4);
metadatums.add(subject5);
metadatums.add(subject6);
metadatums.add(editor);
metadatums.add(editor2);
metadatums.add(editor3);
metadatums.add(isi);
ImportRecord firstrRecord = new ImportRecord(metadatums);
@@ -136,19 +166,34 @@ public class WOSImportMetadataSourceServiceIT extends AbstractLiveImportIntegrat
MetadatumDTO startPage2 = createMetadatumDTO("oaire","citation", "startPage", "224");
MetadatumDTO endPage2 = createMetadatumDTO("oaire","citation", "endPage", "224");
MetadatumDTO type2 = createMetadatumDTO("dc", "type", null, "Book in series");
MetadatumDTO issn2 = createMetadatumDTO("dc", "relation", "issn", "2340-1117");
MetadatumDTO ispartof2 = createMetadatumDTO("dc", "relation", "ispartof",
"EDULEARN19: 11TH INTERNATIONAL CONFERENCE ON EDUCATION AND NEW LEARNING TECHNOLOGIES");
MetadatumDTO ispartofseries2 = createMetadatumDTO("dc", "relation", "ispartofseries",
"EDULEARN19: 11TH INTERNATIONAL CONFERENCE ON EDUCATION AND NEW LEARNING TECHNOLOGIES");
MetadatumDTO title2 = createMetadatumDTO("dc", "title", null,
"DYSLEXIA AND TYPOGRAPHY: HOW TO IMPROVE EDUCATIONAL PUBLISHING FOR INCLUSIVE DESIGN - A CRITICAL REVIEW");
MetadatumDTO issn2 = createMetadatumDTO("dc", "identifier", "issn", "2340-1117");
MetadatumDTO isbn2 = createMetadatumDTO("dc", "identifier", "isbn", "978-84-09-12031-4");
MetadatumDTO iso2 = createMetadatumDTO("dc", "language", "iso", "1");
MetadatumDTO author5 = createMetadatumDTO("dc", "contributor", "author", "Bollini, Letizia");
MetadatumDTO author5 = createMetadatumDTO("dc", "contributor", "author", "Bollini, L.");
MetadatumDTO author6 = createMetadatumDTO("dc", "contributor", "author", "Chova, LG");
MetadatumDTO author7 = createMetadatumDTO("dc", "contributor", "author", "Martinez, AL");
MetadatumDTO author8 = createMetadatumDTO("dc", "contributor", "author", "Torres, IC");
MetadatumDTO isi2 = createMetadatumDTO("dc", "identifier", "isi", "WOS:000551093100033");
MetadatumDTO subject7 = createMetadatumDTO("dc", "subject", null, "Dyslexia and Typography");
MetadatumDTO subject8 = createMetadatumDTO("dc", "subject", null, "Font design");
MetadatumDTO subject9 = createMetadatumDTO("dc", "subject", null, "educational publishing");
MetadatumDTO subject10 = createMetadatumDTO("dc", "subject", null, "Design for all");
MetadatumDTO subject11 = createMetadatumDTO("dc", "subject", null, "Universal design");
MetadatumDTO subject12 = createMetadatumDTO("dc", "subject", null, "Social Sciences");
MetadatumDTO isi2 = createMetadatumDTO("dc", "identifier", "other", "WOS:000551093100033");
metadatums2.add(edition2);
metadatums2.add(date2);
metadatums2.add(startPage2);
metadatums2.add(endPage2);
metadatums2.add(type2);
metadatums2.add(ispartof2);
metadatums2.add(ispartofseries2);
metadatums2.add(title2);
metadatums2.add(issn2);
metadatums2.add(isbn2);
metadatums2.add(iso2);
@@ -156,6 +201,15 @@ public class WOSImportMetadataSourceServiceIT extends AbstractLiveImportIntegrat
metadatums2.add(author6);
metadatums2.add(author7);
metadatums2.add(author8);
metadatums2.add(subject7);
metadatums2.add(subject8);
metadatums2.add(subject9);
metadatums2.add(subject10);
metadatums2.add(subject11);
metadatums2.add(subject12);
metadatums2.add(editor);
metadatums2.add(editor2);
metadatums2.add(editor3);
metadatums2.add(isi2);
ImportRecord secondRecord = new ImportRecord(metadatums2);

View File

@@ -17,14 +17,12 @@
<page begin="225" end="234" page_count="10">225-234</page>
</pub_info>
<titles count="7">
<title type="source">EDULEARN19: 11TH INTERNATIONAL CONFERENCE ON
EDUCATION AND NEW LEARNING TECHNOLOGIES</title>
<title type="source">EDULEARN19: 11TH INTERNATIONAL CONFERENCE ON EDUCATION AND NEW LEARNING TECHNOLOGIES</title>
<title type="series">EDULEARN Proceedings</title>
<title type="source_abbrev">EDULEARN PROC</title>
<title type="abbrev_11">EDULEARN PR</title>
<title type="abbrev_29">EDULEARN PROC</title>
<title type="item">MENTORING IN EDUCATION. FEMALE ROLE MODELS IN
ITALIAN DESIGN ACADEMIC CULTURE</title>
<title type="item">MENTORING IN EDUCATION. FEMALE ROLE MODELS IN ITALIAN DESIGN ACADEMIC CULTURE</title>
<title type="book_series" translated="N">EDULEARN Proceedings</title>
</titles>
<names count="4">
@@ -181,37 +179,7 @@
<abstracts count="1">
<abstract>
<abstract_text count="1">
<p>It is widely recognized that mentors and tutors are
empowering roles in education systems. Students can benefit
to be raised in an inclusive environment in which senior
peers or professors play a positive and significant role
model. In particular, looking at the field of design studies,
a tradition of collaborative and collective culture shared
between students and teachers can be identified both in the
Bauhaus and in the Hochschule fur Gestaltung Ulm experiences.
In more recent time, studies show how junior designers
benefit from the presence, and the confront of significant
grown-up or more experienced figures able to listen to, to
coach and to mentor them. Nevertheless, when we look at the
issue from a gender perspective, we may notice a lack of
examples and reference figures, even if female students are a
significant percentage, when not the majority, in the
design&apos;s bachelors and masters degrees university
courses. Moreover, in Italy - at the 82 place on 144 in the
worldwide ranking for gender equality and women rights
according to the &quot;Global Gender Gap Index 2017&quot; -
the situation seems to be more difficult than in the other
European or developed countries, also due to the
representation of female roles in society and female bodies
in mass media. On the one hand, the paper offers a deeper
insight into the problem. The results of a census in the
field of digital product design - including human-centered,
interaction, user experience and interface design - are
mapped and discussed to understand the presence of female
professors and their role in BA/BS and MD courses. On the
other hand, the paper proposes some possible initiatives to
spread consciousness and participation and to improve some
changes in academic design culture.</p>
<p>It is widely recognized that mentors and tutors are</p>
</abstract_text>
</abstract>
</abstracts>
@@ -266,14 +234,12 @@
<page begin="224" end="224" page_count="1">224-224</page>
</pub_info>
<titles count="7">
<title type="source">EDULEARN19: 11TH INTERNATIONAL CONFERENCE ON
EDUCATION AND NEW LEARNING TECHNOLOGIES</title>
<title type="source">EDULEARN19: 11TH INTERNATIONAL CONFERENCE ON EDUCATION AND NEW LEARNING TECHNOLOGIES</title>
<title type="series">EDULEARN Proceedings</title>
<title type="source_abbrev">EDULEARN PROC</title>
<title type="abbrev_11">EDULEARN PR</title>
<title type="abbrev_29">EDULEARN PROC</title>
<title type="item">DYSLEXIA AND TYPOGRAPHY: HOW TO IMPROVE
EDUCATIONAL PUBLISHING FOR INCLUSIVE DESIGN - A CRITICAL REVIEW</title>
<title type="item">DYSLEXIA AND TYPOGRAPHY: HOW TO IMPROVE EDUCATIONAL PUBLISHING FOR INCLUSIVE DESIGN - A CRITICAL REVIEW</title>
<title type="book_series" translated="N">EDULEARN Proceedings</title>
</titles>
<names count="4">

View File

@@ -190,4 +190,16 @@
</property>
</bean>
<bean id="wosLiveImportDataProvider" class="org.dspace.external.provider.impl.LiveImportDataProvider">
<property name="metadataSource" ref="WosImportService"/>
<property name="sourceIdentifier" value="wos"/>
<property name="recordIdMetadata" value="dc.identifier.other"/>
<property name="supportedEntityTypes">
<list>
<value>Publication</value>
<value>none</value>
</list>
</property>
</bean>
</beans>

View File

@@ -118,10 +118,10 @@
</util:map>
<bean id="wos.doi" class="org.dspace.importer.external.metadatamapping.MetadataFieldConfig">
<constructor-arg value="dc.identifier.doi"/>
<constructor-arg value="dc.identifier"/>
</bean>
<bean id="wos.issn" class="org.dspace.importer.external.metadatamapping.MetadataFieldConfig">
<constructor-arg value="dc.relation.issn"/>
<constructor-arg value="dc.identifier.issn"/>
</bean>
<bean id="wos.isbn" class="org.dspace.importer.external.metadatamapping.MetadataFieldConfig">
<constructor-arg value="dc.identifier.isbn"/>
@@ -262,7 +262,7 @@
<property name="prefixToNamespaceMapping" ref="wosNs"/>
</bean>
<bean id="wos.wosId" class="org.dspace.importer.external.metadatamapping.MetadataFieldConfig">
<constructor-arg value="dc.identifier.isi"/>
<constructor-arg value="dc.identifier.other"/>
</bean>
<util:map id="contributorEditor2fields" map-class="java.util.HashMap"