-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* develop: add facet support for peer reviewed DMS-301 add css class for JOP service images and fix layout revert UBO-269 FSU040THUL-1276 - need some clarification UBO-293 FSU040THUL-2186 Fixed heading generated by org.mycore.ubo.publication.PublicationEventHandler.getRealNameFromNameElement for local users to "family name, given name" (#344) UBO-292 Made org.mycore.ubo.matcher.MCRUserMatcherLDAP#getUserNameFromLDAPUser protected (#343) UBO-285 Added missing i18n ubo.interviewer.abbreviated UBO-289 Surround 'MCRORCIDSessionUtils.getCurrentUser()' with try/catch (#341) UBO-287 Use xsl:key to speed up transformation DMS-300 adds a better way to show authors without floating UBO-281 Do not rely on certain values of display index of a work. Improved code readability (#333) UBO-282 Include mycore2orcid.js inresponse.xsl (was accidentally remo… (#339) UBO-282 Include mycore2orcid.js only when user is not guest (#334) UBO-280 Fixed incorrect display of ; (#332) add type submit to editor buttons layout fix: prevent breaking in names add partOf, connectionID and origin facets to default configuration UBO-275 Do not reuse stream UBO-277 Removed @min="4" from repeat element UBO-274 Fixed ArrayIndexOutBoundException when language code cannot be resolved layout finetuning for popover header close button do not reuse person.search.information for person details dialog UBO-272 Fixed StackOverflowError during indexing Fixed JOP link Save publication after repair event (#326) deactivate ORCIDWorkEventHandler until MCR-2960 is solved show affiliation only for admin role UBO-68 use the name identifier classification also in user editor (#325) Issues/ubo 266 tolerate repeated lead (#322) UBO-265 FSU040THUL-972 Made solr field fundingType multivalued (#321) UBO-269 FSU040THUL-1276 Changed cite of in.host from e.g. 'Jg. 13 (2023), Heft 1, S. 1 - 10, Artikel 9489' to 'Jg. 13 (2023), Heft 1, Artikel 9489, S. 1 - 10' UBO-267 PublicationEventHandler now also repairs Added ResearcherID UBO-18 use position for popup close button UBO-18 layout finetuning and add more details (#320) UBO-18 unify name identifier handling (#316) UBO-263 FSU040THUL-405 Allow to search arbitrary realm in LocalService UBO-31 add kdsf editor fields and other minor adoptions from koeln UBO-261 FSU040THUL-1243 Added/index dynamic solr field "*_nid_text" to solr-schema.json UBO-96 ORCID-Anbindung optimieren (#284) UBO-262 Set version of pica2mods to 2.8-SNAPSHOT UBO-259 FSU40THUL-1218 Made solr field "origin_exact" stored UBO-18 unify name identifier handling (#316) UBO-263 FSU040THUL-405 Allow to search arbitrary realm in LocalService UBO-31 add kdsf editor fields and other minor adoptions from koeln UBO-261 FSU040THUL-1243 Added/index dynamic solr field "*_nid_text" to solr-schema.json UBO-96 ORCID-Anbindung optimieren (#284) UBO-262 Set version of pica2mods to 2.8-SNAPSHOT UBO-259 FSU40THUL-1218 Made solr field "origin_exact" stored UBO-260 FSU040THUL-972 Support fundingType facet UBO-256 Add random UUID to user id of MCRUser generated in MCRUserMatcherUtils#getUserNameFromModsNameElement UBO-258 FSU040THUL-1065 Applied requested changes UBO-258 FSU040THUL-1065 Mark corresponding author in mods-display.xsl UBO-257 Upgrade version of pica2mods to 2.7-SNAPSHOT (#307) UBO-253 Apply classes to segments generated by <xsl:template match="item" mode="output.category" /> UBO-255 Upgrade to mycore to version 2022.06.3-SNAPSHOT and pica2mods to version 2.6-SNAPSHOT
- Loading branch information
Showing
45 changed files
with
3,252 additions
and
1,846 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<mycoreclass xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="MCRClassification.xsd" ID="accessrights"> | ||
<label xml:lang="en" text="Access Rights" description="Access Rights - KDSF" /> | ||
<label xml:lang="de" text="Zugangsrechte" description="Zugangsrechte - Werte nach KDSF" /> | ||
<label xml:lang="x-color" text="#8f989d" /> | ||
<categories> | ||
<category ID="oa"> | ||
<label xml:lang="de" text="Open Access" /> | ||
<label xml:lang="x-color" text="#ea5a00" /> | ||
<label xml:lang="en" text="open access" /> | ||
</category> | ||
<category ID="ea"> | ||
<label xml:lang="de" text="Zugang unterliegt Embargo" /> | ||
<label xml:lang="x-color" text="#d3d3d3" /> | ||
<label xml:lang="en" text="embargoed access" /> | ||
</category> | ||
<category ID="ra"> | ||
<label xml:lang="de" text="eingeschränkter Zugang" /> | ||
<label xml:lang="x-color" text="#a6a6a8" /> | ||
<label xml:lang="en" text="restricted access" /> | ||
</category> | ||
<category ID="moa"> | ||
<label xml:lang="de" text="nur Zugriff auf Metadaten" /> | ||
<label xml:lang="x-color" text="#7a7a7c" /> | ||
<label xml:lang="en" text="metadata only access" /> | ||
</category> | ||
</categories> | ||
</mycoreclass> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<mycoreclass xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="MCRClassification.xsd" ID="peerreviewed"> | ||
|
||
<label xml:lang="en" text="Peer Reviewed" description="todo" /> | ||
<label xml:lang="de" text="Peer Reviewed" description="todo" /> | ||
|
||
<categories> | ||
<category ID="true"> | ||
<label xml:lang="de" text="Ja" /> | ||
<label xml:lang="en" text="Yes" /> | ||
</category> | ||
<category ID="false"> | ||
<label xml:lang="de" text="Nein" /> | ||
<label xml:lang="en" text="No" /> | ||
</category> | ||
</categories> | ||
|
||
</mycoreclass> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<mycoreclass xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="MCRClassification.xsd" ID="typeOfResource"> | ||
<label xml:lang="en" text="typeOfResource" /> | ||
<label xml:lang="de" text="typeOfResource" /> | ||
<label xml:lang="x-uri" text="http://www.mycore.org/classifications/typeOfResource" /> | ||
<categories> | ||
<category ID="txt"> | ||
<label xml:lang="de" text="Text" /> | ||
<label xml:lang="en" text="Text" description="Resource intended to be perceived visually and understood through the use of language in written or spoken form." /> | ||
<url xlink:href="https://id.loc.gov/vocabulary/resourceTypes/txt.html" xlink:type="locator" /> | ||
</category> | ||
<category ID="aud"> | ||
<label xml:lang="en" text="Audio" description="Resources expressed in an audible form, including music or other sounds." /> | ||
<label xml:lang="de" text="Audio" /> | ||
<url xlink:href="https://id.loc.gov/vocabulary/resourceTypes/aud.html" xlink:type="locator" /> | ||
</category> | ||
<category ID="dat"> | ||
<label xml:lang="de" text="Datensatz" /> | ||
<label xml:lang="en" text="Dataset" description="Data encoded in a defined structure, but not normally displayed in its raw form." /> | ||
<url xlink:href="https://id.loc.gov/vocabulary/resourceTypes/dat.html" xlink:type="locator" /> | ||
</category> | ||
<category ID="mov"> | ||
<label xml:lang="de" text="Bewegte Bilder" /> | ||
<label xml:lang="en" text="Moving image" description="Images intended to be perceived as moving, including motion pictures and video recordings." /> | ||
<url xlink:href="https://id.loc.gov/vocabulary/resourceTypes/mov.html" xlink:type="locator" /> | ||
</category> | ||
<category ID="mul"> | ||
<label xml:lang="de" text="Multimedia" /> | ||
<label xml:lang="en" text="Multimedia" description="Electronic resource that is a computer program or which consists of multiple media types that are software driven." /> | ||
<url xlink:href="https://id.loc.gov/vocabulary/resourceTypes/mul.html" xlink:type="locator" /> | ||
</category> | ||
<category ID="img"> | ||
<label xml:lang="de" text="Bild" /> | ||
<label xml:lang="en" text="Still image" description="Resource expressed through line, shape, shading, etc., intended to be perceived visually as a still image or images in two dimensions." /> | ||
<url xlink:href="https://id.loc.gov/vocabulary/resourceTypes/img.html" xlink:type="locator" /> | ||
</category> | ||
</categories> | ||
</mycoreclass> |
36 changes: 0 additions & 36 deletions
36
ubo-cli/src/main/setup/classifications/user_attributes.xml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 64 additions & 16 deletions
80
ubo-common/src/main/java/org/mycore/ubo/importer/orcid/Orcid2WorksTransformer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,78 @@ | ||
package org.mycore.ubo.importer.orcid; | ||
|
||
import java.io.IOException; | ||
|
||
import org.apache.logging.log4j.LogManager; | ||
import org.apache.logging.log4j.Logger; | ||
import org.jdom2.Element; | ||
import org.jdom2.JDOMException; | ||
import org.mycore.common.content.MCRContent; | ||
import org.mycore.common.content.MCRJDOMContent; | ||
import org.mycore.common.content.transformer.MCRContentTransformer; | ||
import org.mycore.orcid.MCRORCIDProfile; | ||
import org.mycore.orcid.works.MCRWorksSection; | ||
import org.xml.sax.SAXException; | ||
import org.mycore.orcid2.MCRORCIDUtils; | ||
import org.mycore.orcid2.client.exception.MCRORCIDRequestException; | ||
import org.mycore.orcid2.v3.client.MCRORCIDClientHelper; | ||
import org.mycore.orcid2.v3.client.MCRORCIDSectionImpl; | ||
import org.mycore.orcid2.v3.work.MCRORCIDWorkUtils; | ||
import org.orcid.jaxb.model.v3.release.record.Work; | ||
import org.orcid.jaxb.model.v3.release.record.summary.WorkGroup; | ||
import org.orcid.jaxb.model.v3.release.record.summary.WorkSummary; | ||
import org.orcid.jaxb.model.v3.release.record.summary.Works; | ||
|
||
import java.io.IOException; | ||
import java.util.ArrayList; | ||
import java.util.Arrays; | ||
import java.util.Comparator; | ||
import java.util.List; | ||
|
||
public class Orcid2WorksTransformer extends MCRContentTransformer { | ||
public class Orcid2WorksTransformer extends MCRContentTransformer implements Comparator<WorkSummary> { | ||
|
||
protected Logger LOGGER = LogManager.getLogger(Orcid2WorksTransformer.class); | ||
|
||
public MCRJDOMContent transform(MCRContent source) throws IOException { | ||
String orcid = source.asString(); | ||
List<Work> workList = new ArrayList<>(); | ||
|
||
MCRORCIDProfile profile = new MCRORCIDProfile(orcid); | ||
try { | ||
MCRWorksSection worksSection = profile.getWorksSection(); | ||
worksSection.fetchDetails(); | ||
Arrays.stream(source.asString().split("\\s")) | ||
.filter(orcid -> orcid.trim().length() > 0) | ||
.forEach(orcid -> { | ||
try { | ||
Works works = MCRORCIDClientHelper | ||
.getClientFactory() | ||
.createReadClient() | ||
.fetch(orcid, MCRORCIDSectionImpl.WORKS, Works.class); | ||
|
||
works.getWorkGroup() | ||
.stream() | ||
.map(WorkGroup::getWorkSummary) | ||
.filter(wg -> wg.size() > 0) | ||
.forEach(workSummaries -> { | ||
workSummaries.sort(this); | ||
WorkSummary workSummary = workSummaries.get(0); | ||
|
||
Element modsCollection = worksSection.buildMODSCollection(); | ||
return new MCRJDOMContent(modsCollection); | ||
} catch (JDOMException | SAXException ex) { | ||
throw new IOException(ex); | ||
Work work = MCRORCIDClientHelper | ||
.getClientFactory() | ||
.createReadClient() | ||
.fetch(orcid, MCRORCIDSectionImpl.WORK, Work.class, workSummary.getPutCode()); | ||
|
||
workList.add(work); | ||
}); | ||
} catch (MCRORCIDRequestException e) { | ||
LOGGER.warn("Could not get works for ORCID {}. {}", orcid, e.getMessage()); | ||
} | ||
}); | ||
|
||
List<Element> workElements = MCRORCIDWorkUtils.buildUnmergedMODSFromWorks(workList); | ||
Element modsCollection = MCRORCIDUtils.buildMODSCollection(workElements); | ||
|
||
return new MCRJDOMContent(modsCollection); | ||
} | ||
|
||
@Override | ||
public int compare(WorkSummary ws1, WorkSummary ws2) { | ||
int v = 0; | ||
try { | ||
v = Integer.parseInt(ws1.getDisplayIndex()) - Integer.parseInt( | ||
ws2.getDisplayIndex()); | ||
} catch (Exception e) { | ||
LOGGER.error("Could not compare WorkSummaries", e); | ||
} | ||
return v; | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
ubo-common/src/main/java/org/mycore/ubo/ldap/picker/LDAPWithLocalService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,31 @@ | ||
package org.mycore.ubo.ldap.picker; | ||
|
||
import java.util.Optional; | ||
|
||
import javax.naming.OperationNotSupportedException; | ||
|
||
import org.mycore.common.config.MCRConfiguration2; | ||
import org.mycore.ubo.local.LocalService; | ||
import org.mycore.ubo.picker.PersonSearchResult; | ||
import org.mycore.user2.MCRRealmFactory; | ||
|
||
public class LDAPWithLocalService extends LDAPService { | ||
|
||
public static final String LDAP_REALM = MCRConfiguration2.getString( | ||
"MCR.user2.IdentityManagement.UserCreation.LDAP.Realm").orElse(null); | ||
|
||
@Override | ||
public PersonSearchResult searchPerson(String query) throws OperationNotSupportedException { | ||
PersonSearchResult results = super.searchPerson(query); | ||
LocalService localService = new LocalService(); | ||
PersonSearchResult personSearchResult = localService.searchPerson(query); | ||
results.join(personSearchResult, 0); | ||
|
||
if (LDAP_REALM != null) { | ||
Optional.ofNullable(MCRRealmFactory.getRealm(LDAP_REALM)) | ||
.ifPresent(realm -> results.join(localService.searchPerson(query, realm), 0)); | ||
} | ||
|
||
return results; | ||
} | ||
} |
Oops, something went wrong.