From 3108c26587b16a7d46215eef153840ff5fb5fcb1 Mon Sep 17 00:00:00 2001 From: Sebastian Hofmann Date: Fri, 16 Jun 2023 11:28:42 +0200 Subject: [PATCH 01/11] Fix dependency management --- pom.xml | 23 ++++++++++------------- ubo-cli/pom.xml | 3 +-- ubo-common/pom.xml | 39 ++++++++++----------------------------- ubo-webapp/pom.xml | 11 ++++------- 4 files changed, 25 insertions(+), 51 deletions(-) diff --git a/pom.xml b/pom.xml index 3538a1711..d71ffe95b 100644 --- a/pom.xml +++ b/pom.xml @@ -1,13 +1,11 @@ - + 4.0.0 org.mycore mycore-parent 49 - org.mycore.ubo @@ -58,9 +56,7 @@ 2022.06.2-SNAPSHOT v16.0.0 scope,groupId,artifactId - - https://gist.githubusercontent.com/yagee-de/dfd3698c1b49173dbf251f74eb6a9297/raw/406460c088ff3cb6354e4ae6b40535e6f841607d/mycore_sort.xml - + https://gist.githubusercontent.com/yagee-de/dfd3698c1b49173dbf251f74eb6a9297/raw/406460c088ff3cb6354e4ae6b40535e6f841607d/mycore_sort.xml true ${maven.build.timestamp} v1.22.10 @@ -171,8 +167,7 @@ dev -DMCR.AppName=${MCR.AppName} -Dsolr.solr.home=${solr.home} - -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=${cargo.debug.suspend},address=${cargo.debug.address} - + -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=${cargo.debug.suspend},address=${cargo.debug.address} @@ -209,8 +204,7 @@ ${cargo.servlet.port} - -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.JavaUtilLog - + -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.JavaUtilLog Restricted @@ -260,9 +254,7 @@ ${cargo.tomcat.ajp.port} UTF-8 - - -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true${cargo.start.jvmargs} - + -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true${cargo.start.jvmargs} @@ -376,6 +368,11 @@ + + org.mycore + mycore-classifications + runtime + org.webjars highlightjs diff --git a/ubo-cli/pom.xml b/ubo-cli/pom.xml index 5453f85e1..1e268830c 100644 --- a/ubo-cli/pom.xml +++ b/ubo-cli/pom.xml @@ -1,6 +1,5 @@ - + 4.0.0 org.mycore.ubo diff --git a/ubo-common/pom.xml b/ubo-common/pom.xml index 7b37604ec..a107f9595 100644 --- a/ubo-common/pom.xml +++ b/ubo-common/pom.xml @@ -1,6 +1,5 @@ - + 4.0.0 org.mycore.ubo @@ -13,23 +12,6 @@ Universitätsbibliographie - Common Jar Module - - org.apache.maven.plugins - maven-dependency-plugin - - - analyze - - analyze-only - - - - org.mycore.pica2mods:pica2mods-xslt:jar - - - - - org.apache.maven.plugins maven-jar-plugin @@ -37,7 +19,7 @@ true - + ${project.artifactId} @@ -140,14 +122,12 @@ prepare-package - - # generated by ubo-common/pom.xml + # generated by ubo-common/pom.xml UBO.Frontend.jquery.version = ${jquery.version} UBO.Frontend.jquery-ui.version = ${jquery.ui.version} UBO.Frontend.chosen.version = ${chosen.version} UBO.Frontend.bootstrap.version = ${bootstrap.version} - UBO.Frontend.font-awesome.version = ${font-awesome.version} - + UBO.Frontend.font-awesome.version = ${font-awesome.version} @@ -263,11 +243,6 @@ org.mycore mycore-user2 - - org.mycore.pica2mods - pica2mods-xslt - 2.5-SNAPSHOT - org.webjars highlightjs @@ -366,6 +341,12 @@ mycore-xeditor runtime + + org.mycore.pica2mods + pica2mods-xslt + 2.5-SNAPSHOT + runtime + org.webjars bootstrap diff --git a/ubo-webapp/pom.xml b/ubo-webapp/pom.xml index dd550cb36..f63d6bb6c 100644 --- a/ubo-webapp/pom.xml +++ b/ubo-webapp/pom.xml @@ -1,6 +1,5 @@ - + 4.0.0 org.mycore.ubo @@ -12,20 +11,18 @@ war Universitätsbibliographie - WAR Module - ${settings.localRepository}/../cargo/containers - + ${settings.localRepository}/../cargo/containers 8295 n ${project.artifactId} / ${project.groupId} -DMCR.AppName=${MCR.AppName} -Dsolr.solr.home=${solr.home} -Xms512m -Xmx2048m - -Xrunjdwp:transport=dt_socket,server=y,suspend=${cargo.debug.suspend},address=${cargo.debug.address} - + -Xrunjdwp:transport=dt_socket,server=y,suspend=${cargo.debug.suspend},address=${cargo.debug.address} 8290 8080 UTF-8 - + 8292 1.7.8 9.4.51.v20230217 From 8ee0e6be6760f49a39bf5ec6ffdf36fb76bbf4c7 Mon Sep 17 00:00:00 2001 From: Kathleen Neumann Date: Tue, 27 Jun 2023 13:41:52 +0200 Subject: [PATCH 02/11] fix order (is datatype text) and link to new duplication report --- .../src/main/resources/xsl/duplicates.xsl | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/ubo-common/src/main/resources/xsl/duplicates.xsl b/ubo-common/src/main/resources/xsl/duplicates.xsl index 537f747b8..f5deaa0a1 100644 --- a/ubo-common/src/main/resources/xsl/duplicates.xsl +++ b/ubo-common/src/main/resources/xsl/duplicates.xsl @@ -35,7 +35,7 @@ - + @@ -48,8 +48,9 @@ - DozBibServlet? - + DozBibEntryServlet?id= + + &XSL.Style=structure Anzeigen @@ -59,7 +60,7 @@ - + @@ -90,12 +91,4 @@ - - dedup= - - - & - - - From f92dd86255966adf2377a89ab0cb6153e7c5cc04 Mon Sep 17 00:00:00 2001 From: Kathleen Neumann Date: Mon, 3 Jul 2023 09:09:13 +0200 Subject: [PATCH 03/11] UBO-250 make user profile more generic (#297) * UBO-250 make user profile more generic * UBO-250 fix password change link if current user is logged in --- .../config/ubo-common/messages_de.properties | 24 ++++++++-------- .../config/ubo-common/messages_en.properties | 28 +++++++++---------- ubo-common/src/main/resources/xsl/user.xsl | 14 +++++----- 3 files changed, 33 insertions(+), 33 deletions(-) diff --git a/ubo-common/src/main/resources/config/ubo-common/messages_de.properties b/ubo-common/src/main/resources/config/ubo-common/messages_de.properties index f00e8e187..899892a88 100644 --- a/ubo-common/src/main/resources/config/ubo-common/messages_de.properties +++ b/ubo-common/src/main/resources/config/ubo-common/messages_de.properties @@ -1194,27 +1194,27 @@ upload.successful = Upload erfolgreich urn.create = URN erzeugen -user.profile = Mein Profil -user.profile.account = Ihre Benutzerkennung -user.profile.eMail = Ihre E-Mail-Adresse -user.profile.id.connection = interne Connection-ID -user.profile.id.gnd = Ihre GND -user.profile.id.local = Ihre lokale ID -user.profile.id.lsf = Ihre LSF iD -user.profile.id.orcid = Ihre ORCID iD -user.profile.id.scopus = Ihre SCOPUS Autoren-iD -user.profile.publications = Ihre Publikationen +user.profile = Profil +user.profile.account = Benutzerkennung +user.profile.eMail = E-Mail-Adresse +user.profile.id.connection = Interne Connection-ID +user.profile.id.gnd = GND +user.profile.id.local = Lokale ID +user.profile.id.lsf = LSF iD +user.profile.id.orcid = ORCID iD +user.profile.id.scopus = SCOPUS Autoren-iD +user.profile.publications = Publikationen user.profile.publications.num.multiple = {0} Publikationen user.profile.publications.num.none = keine Publikationen user.profile.publications.num.one = eine Publikation user.profile.publications.orcid.intro = Ihr ORCID-Profil enth\u00E4lt user.profile.publications.ubo.intro = Die Universit\u00E4tsbibliographie enth\u00E4lt -user.profile.publications.ubo.outro = \ mit Ihnen eindeutig zugeordneter LSF ID +user.profile.publications.ubo.outro = \ mit diesem Profil eindeutig zugeordneter LSF ID user.profile.publications.ubo.published.extro.plural.false = im Status redaktionell gepr\u00FCft. user.profile.publications.ubo.published.extro.plural.true = im Status redaktionell gepr\u00FCft. user.profile.publications.ubo.published.intro.plural.false = Davon ist user.profile.publications.ubo.published.intro.plural.true = Davon sind -user.profile.realName = Ihr Name +user.profile.realName = Name video.bitRate = Bitrate video.bitRate.kBit = kBit diff --git a/ubo-common/src/main/resources/config/ubo-common/messages_en.properties b/ubo-common/src/main/resources/config/ubo-common/messages_en.properties index d03e0e977..a40b15be6 100644 --- a/ubo-common/src/main/resources/config/ubo-common/messages_en.properties +++ b/ubo-common/src/main/resources/config/ubo-common/messages_en.properties @@ -1186,28 +1186,28 @@ upload.successful = Upload successful urn.create = Create URN -user.profile = My profile -user.profile.account = Your account -user.profile.eMail = Your e-mail address -user.profile.id.connection = internal connection id -user.profile.id.gnd = Your GND -user.profile.id.local = Your local ID -user.profile.id.lsf = Your LSF iD -user.profile.id.orcid = Your ORCID iD -user.profile.id.scopus = Your SCOPUS author iD -user.profile.publications = Your publications +user.profile = Profile +user.profile.account = Account +user.profile.eMail = E-Mail address +user.profile.id.connection = Internal connection id +user.profile.id.gnd = GND +user.profile.id.local = Local ID +user.profile.id.lsf = LSF iD +user.profile.id.orcid = ORCID iD +user.profile.id.scopus = SCOPUS author iD +user.profile.publications = Publications user.profile.publications.num.multiple = {0} publications user.profile.publications.num.none = no publications user.profile.publications.num.one = one publication user.profile.publications.orcid.intro = Your ORCID record contains user.profile.publications.ubo.intro = The university bibliography contains -user.profile.publications.ubo.outro = \ linked to your personal LSF ID -user.profile.publications.ubo.published.extro.plural.false = is in state editorially checked. -user.profile.publications.ubo.published.extro.plural.true = are in state editorially checked. +user.profile.publications.ubo.outro = \ linked to this LSF ID +user.profile.publications.ubo.published.extro.plural.false = is in state editorially checked. +user.profile.publications.ubo.published.extro.plural.true = are in state editorially checked. user.profile.publications.ubo.published.intro = With actually user.profile.publications.ubo.published.intro.plural.false = Thereof user.profile.publications.ubo.published.intro.plural.true = Therof -user.profile.realName = Your name +user.profile.realName = Name video.bitRate = Bitrate video.bitRate.kBit = kBit diff --git a/ubo-common/src/main/resources/xsl/user.xsl b/ubo-common/src/main/resources/xsl/user.xsl index 10ff1e976..ba6fd16e7 100644 --- a/ubo-common/src/main/resources/xsl/user.xsl +++ b/ubo-common/src/main/resources/xsl/user.xsl @@ -415,19 +415,19 @@ - - - + + + + + + + From 7f9724b8e09977b298b21311d874b30aa5407b70 Mon Sep 17 00:00:00 2001 From: Kathleen Neumann Date: Mon, 3 Jul 2023 15:54:07 +0200 Subject: [PATCH 04/11] add missing coreFunction include --- ubo-common/src/main/resources/xsl/debugEnrichment.xsl | 1 + 1 file changed, 1 insertion(+) diff --git a/ubo-common/src/main/resources/xsl/debugEnrichment.xsl b/ubo-common/src/main/resources/xsl/debugEnrichment.xsl index 06904367a..4497cb933 100644 --- a/ubo-common/src/main/resources/xsl/debugEnrichment.xsl +++ b/ubo-common/src/main/resources/xsl/debugEnrichment.xsl @@ -5,6 +5,7 @@ + From 9d6ee60758788230bd34fb4221d467cd8f4e2522 Mon Sep 17 00:00:00 2001 From: Kathleen Neumann Date: Mon, 3 Jul 2023 17:00:39 +0200 Subject: [PATCH 05/11] add missing coreFunction include --- ubo-common/src/main/resources/xsl/response-duplicates.xsl | 1 + 1 file changed, 1 insertion(+) diff --git a/ubo-common/src/main/resources/xsl/response-duplicates.xsl b/ubo-common/src/main/resources/xsl/response-duplicates.xsl index 3589267b8..702290b15 100644 --- a/ubo-common/src/main/resources/xsl/response-duplicates.xsl +++ b/ubo-common/src/main/resources/xsl/response-duplicates.xsl @@ -14,6 +14,7 @@ > + From 20512e08248e7940ffd88f1efc5a369cbb68cf5b Mon Sep 17 00:00:00 2001 From: Silvio Hermann Date: Tue, 4 Jul 2023 10:03:26 +0200 Subject: [PATCH 06/11] UBO-247 Do not check for pid id in App.vue --- ubo-common/src/main/vue/author_search/src/App.vue | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ubo-common/src/main/vue/author_search/src/App.vue b/ubo-common/src/main/vue/author_search/src/App.vue index 2317ea649..43d52767a 100644 --- a/ubo-common/src/main/vue/author_search/src/App.vue +++ b/ubo-common/src/main/vue/author_search/src/App.vue @@ -134,10 +134,8 @@ export default class App extends Vue { const parms = [encodeURIComponent(xpFam) + "=" + encodeURIComponent(this.personModel.lastName), encodeURIComponent(xpGiven) + "=" + encodeURIComponent(this.personModel.firstName)] - if (this.personModel.pid != null && this.personModel.pid.length > 0 || this.pid != "") { + if (this.personModel.pid.length > 0 || this.pid != "") { parms.push(encodeURIComponent(xpPid) + "=" + encodeURIComponent(this.personModel.pid)); - } else { - return; } let urlParams = new URLSearchParams(window.location.href); From 3fc70e3fb2901829fa3259b8f8efd2be092ea96d Mon Sep 17 00:00:00 2001 From: Possommi Date: Tue, 4 Jul 2023 13:39:44 +0200 Subject: [PATCH 07/11] UBO-251 Add local user when publication is created and person selected in IdentityPicker does not exist yet (#298) * UBO-251 Add local user when publication is created and person selected in IdentityPicker does not exist yet * UBO-251 Only store MCRUser when lead id is present in name element * UBO-251 Set realm to UNVALIDATED_REALM * UBO-251 Set realm to 'local' --- .../publication/PublicationEventHandler.java | 32 +++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/ubo-common/src/main/java/org/mycore/ubo/publication/PublicationEventHandler.java b/ubo-common/src/main/java/org/mycore/ubo/publication/PublicationEventHandler.java index b8eb78d45..0c927b4ee 100644 --- a/ubo-common/src/main/java/org/mycore/ubo/publication/PublicationEventHandler.java +++ b/ubo-common/src/main/java/org/mycore/ubo/publication/PublicationEventHandler.java @@ -10,6 +10,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.jdom2.Element; +import org.jdom2.filter.Filters; import org.jdom2.output.Format; import org.jdom2.output.XMLOutputter; import org.mycore.common.MCRClassTools; @@ -23,10 +24,13 @@ import org.mycore.ubo.matcher.MCRUserMatcherDTO; import org.mycore.ubo.matcher.MCRUserMatcherLocal; import org.mycore.ubo.matcher.MCRUserMatcherUtils; +import org.mycore.user2.MCRRealmFactory; import org.mycore.user2.MCRUser; import org.mycore.user2.MCRUserAttribute; import org.mycore.user2.MCRUserManager; +import static org.mycore.common.MCRConstants.XPATH_FACTORY; +import static org.mycore.ubo.matcher.MCRUserMatcherUtils.MODS_NAMESPACE; /** * EventHandler for new publications in MODS-format. @@ -184,7 +188,17 @@ protected void handleObjectCreated(MCREvent evt, MCRObject obj) { enrichModsNameElementByLeadID(modsNameElement, leadIDName, affiliatedUser); connectModsNameElementWithMCRUser(modsNameElement, affiliatedUser); } else { - // ignore Person, do NOT create a new MCRUser + Optional leadId = modsNameElement.getChildren("nameIdentifier", MCRConstants.MODS_NAMESPACE) + .stream() + .filter(element -> element.getAttributeValue("type").equals(leadIDName)) + .findFirst(); + + if(leadId.isPresent()) { + MCRUser newLocalUser = MCRUserMatcherUtils.createNewMCRUserFromModsNameElement( + modsNameElement, MCRRealmFactory.getLocalRealm().getID()); + newLocalUser.setRealName(getRealNameFromNameElement(modsNameElement, newLocalUser)); + connectModsNameElementWithMCRUser(modsNameElement, newLocalUser); + } } } @@ -228,7 +242,7 @@ private void enrichModsNameElementByLeadID(Element modsNameElement, String leadI private void enrichModsNameElementByNameIdentifierElement(Element modsNameElement, String attributeType, String attributeValue) { - Element nameIdentifier = new Element("nameIdentifier", MCRUserMatcherUtils.MODS_NAMESPACE) + Element nameIdentifier = new Element("nameIdentifier", MODS_NAMESPACE) .setAttribute("type", attributeType) .setText(attributeValue); modsNameElement.addContent(nameIdentifier); @@ -259,4 +273,18 @@ private void connectModsNameElementWithMCRUser(Element modsNameElement, MCRUser } } } + + protected String getRealNameFromNameElement(Element nameElement, MCRUser mcrUser){ + Element givenName = XPATH_FACTORY.compile("mods:namePart[@type='given']", + Filters.element(), null, MODS_NAMESPACE).evaluateFirst(nameElement); + + Element familyName = XPATH_FACTORY.compile("mods:namePart[@type='family']", + Filters.element(), null, MODS_NAMESPACE).evaluateFirst(nameElement); + + if((givenName != null) && (familyName != null)) { + return givenName.getText() + " " + familyName.getText(); + } + + return mcrUser.getUserID(); + } } From ce70413ab59eb81bc2699de84a990a0a0b87183c Mon Sep 17 00:00:00 2001 From: Silvio Hermann Date: Thu, 6 Jul 2023 12:10:28 +0200 Subject: [PATCH 08/11] UBO-252 Fixed odd display of subjects generated from origin classification --- ubo-common/src/main/resources/xsl/mods-display.xsl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ubo-common/src/main/resources/xsl/mods-display.xsl b/ubo-common/src/main/resources/xsl/mods-display.xsl index d9025a9a8..e292d5f05 100644 --- a/ubo-common/src/main/resources/xsl/mods-display.xsl +++ b/ubo-common/src/main/resources/xsl/mods-display.xsl @@ -91,7 +91,6 @@ - @@ -99,12 +98,13 @@ - - - - + + + + + + - From 1bf3d71162612fba24fba9d1f1392fcdd646087b Mon Sep 17 00:00:00 2001 From: Tilo Neumann Date: Tue, 11 Jul 2023 09:28:03 +0200 Subject: [PATCH 09/11] UBO-254 enables variable counter length in facet tile --- .../META-INF/resources/scss/_ubo-facets.scss | 34 ++++++++++++++++++- .../main/resources/xsl/response-facets.xsl | 10 ++++-- 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/ubo-common/src/main/resources/META-INF/resources/scss/_ubo-facets.scss b/ubo-common/src/main/resources/META-INF/resources/scss/_ubo-facets.scss index e91223dd1..989a289f7 100644 --- a/ubo-common/src/main/resources/META-INF/resources/scss/_ubo-facets.scss +++ b/ubo-common/src/main/resources/META-INF/resources/scss/_ubo-facets.scss @@ -7,7 +7,8 @@ // facets (sidebar searchresults etc.) .mycore-facet-count:after { - content: " | "; + content: "|"; + padding: 0 .25rem; } .mycore-facet-exclude, .mycore-facet-remove { @@ -23,6 +24,37 @@ margin: 0; padding: 0; text-align: right; + text-overflow: ellipsis; + overflow: hidden; + word-wrap: normal; + padding-right: .25rem; + } + + .counter-length { + &-1 { + .mycore-facet-count { width: 20px; } + .mycore-facet-value { width: 215px; } + } + &-2 { + .mycore-facet-count { width: 30px; } + .mycore-facet-value { width: 205px; } + } + &-3 { + .mycore-facet-count { width: 40px; } + .mycore-facet-value { width: 195px; } + } + &-4 { + .mycore-facet-count { width: 50px; } + .mycore-facet-value { width: 185px; } + } + &-5 { + .mycore-facet-count { width: 60px; } + .mycore-facet-value { width: 175px; } + } + &-6 { + .mycore-facet-count { width: 70px; } + .mycore-facet-value { width: 165px; } + } } .mycore-facet-value { diff --git a/ubo-common/src/main/resources/xsl/response-facets.xsl b/ubo-common/src/main/resources/xsl/response-facets.xsl index 3ac6f80e1..db06b5cad 100644 --- a/ubo-common/src/main/resources/xsl/response-facets.xsl +++ b/ubo-common/src/main/resources/xsl/response-facets.xsl @@ -104,12 +104,18 @@ + + + + + +
-

+

-
    +
      From b12fe96ffeeaf2131e2f2a007b8619801e8c475f Mon Sep 17 00:00:00 2001 From: Kathleen Neumann Date: Tue, 11 Jul 2023 11:07:51 +0200 Subject: [PATCH 10/11] UBO-254 fix facet count padding --- .../src/main/resources/META-INF/resources/scss/_ubo-facets.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ubo-common/src/main/resources/META-INF/resources/scss/_ubo-facets.scss b/ubo-common/src/main/resources/META-INF/resources/scss/_ubo-facets.scss index 989a289f7..0608604af 100644 --- a/ubo-common/src/main/resources/META-INF/resources/scss/_ubo-facets.scss +++ b/ubo-common/src/main/resources/META-INF/resources/scss/_ubo-facets.scss @@ -8,7 +8,7 @@ // facets (sidebar searchresults etc.) .mycore-facet-count:after { content: "|"; - padding: 0 .25rem; + padding: 0 0 0 0.25rem; } .mycore-facet-exclude, .mycore-facet-remove { From 5d29f87800acfd11b4bdeb78a4e1bdb77e31a9b0 Mon Sep 17 00:00:00 2001 From: Kathleen Neumann Date: Tue, 11 Jul 2023 11:29:48 +0200 Subject: [PATCH 11/11] UBO-254 fix facet counter length for 1 --- .../main/resources/META-INF/resources/scss/_ubo-facets.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ubo-common/src/main/resources/META-INF/resources/scss/_ubo-facets.scss b/ubo-common/src/main/resources/META-INF/resources/scss/_ubo-facets.scss index 0608604af..4fcad6fde 100644 --- a/ubo-common/src/main/resources/META-INF/resources/scss/_ubo-facets.scss +++ b/ubo-common/src/main/resources/META-INF/resources/scss/_ubo-facets.scss @@ -32,8 +32,8 @@ .counter-length { &-1 { - .mycore-facet-count { width: 20px; } - .mycore-facet-value { width: 215px; } + .mycore-facet-count { width: 25px; } + .mycore-facet-value { width: 210px; } } &-2 { .mycore-facet-count { width: 30px; }