diff --git a/ubo-common/pom.xml b/ubo-common/pom.xml index 78d33b2fb..732800f78 100644 --- a/ubo-common/pom.xml +++ b/ubo-common/pom.xml @@ -326,7 +326,7 @@ org.mycore.pica2mods pica2mods-xslt - 2.4-SNAPSHOT + 2.5-SNAPSHOT runtime diff --git a/ubo-common/src/main/java/org/mycore/ubo/importer/ppn/PPN2XMLTransformer.java b/ubo-common/src/main/java/org/mycore/ubo/importer/ppn/PPN2XMLTransformer.java new file mode 100644 index 000000000..1c78ed5e7 --- /dev/null +++ b/ubo-common/src/main/java/org/mycore/ubo/importer/ppn/PPN2XMLTransformer.java @@ -0,0 +1,36 @@ +/** + * Copyright (c) 2017 Duisburg-Essen University Library + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the GNU Public License v2.0 + * which accompanies this distribution, and is available at + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + **/ + +package org.mycore.ubo.importer.ppn; + +import java.io.IOException; +import java.util.Arrays; + +import org.jdom2.Document; +import org.jdom2.Element; +import org.mycore.common.content.MCRContent; +import org.mycore.common.content.MCRJDOMContent; +import org.mycore.common.content.transformer.MCRContentTransformer; + +public class PPN2XMLTransformer extends MCRContentTransformer { + + @Override + public MCRJDOMContent transform(MCRContent source) throws IOException { + Element root = new Element("list"); + Document xml = new Document(root); + + Arrays.stream(source.asString().split("\\s")).filter(p -> p.trim().length() > 0) + .forEach(ppn -> { + Element e = new Element("ppn"); + e.setText(ppn); + root.addContent(e); + }); + return new MCRJDOMContent(xml); + } +} diff --git a/ubo-common/src/main/java/org/mycore/ubo/ldap/picker/LDAPWithLocalService.java b/ubo-common/src/main/java/org/mycore/ubo/ldap/picker/LDAPWithLocalService.java new file mode 100644 index 000000000..21ee10978 --- /dev/null +++ b/ubo-common/src/main/java/org/mycore/ubo/ldap/picker/LDAPWithLocalService.java @@ -0,0 +1,18 @@ +package org.mycore.ubo.ldap.picker; + +import javax.naming.OperationNotSupportedException; + +import org.mycore.ubo.local.LocalService; +import org.mycore.ubo.picker.PersonSearchResult; + +public class LDAPWithLocalService extends LDAPService { + + @Override + public PersonSearchResult searchPerson(String query) throws OperationNotSupportedException { + PersonSearchResult results = super.searchPerson(query); + LocalService ls = new LocalService(); + PersonSearchResult localSr = ls.searchPerson(query); + results.personList.addAll(0, localSr.personList); + return results; + } +} diff --git a/ubo-common/src/main/java/org/mycore/ubo/resources/UBOPersonSearchResource.java b/ubo-common/src/main/java/org/mycore/ubo/resources/UBOPersonSearchResource.java index 12eab1617..9dc3aae52 100644 --- a/ubo-common/src/main/java/org/mycore/ubo/resources/UBOPersonSearchResource.java +++ b/ubo-common/src/main/java/org/mycore/ubo/resources/UBOPersonSearchResource.java @@ -18,22 +18,18 @@ package org.mycore.ubo.resources; -import com.google.gson.Gson; -import org.mycore.access.MCRAccessManager; -import org.mycore.common.MCRSession; -import org.mycore.common.MCRSessionMgr; -import org.mycore.common.MCRSystemUserInformation; -import org.mycore.common.MCRUserInformation; -import org.mycore.common.config.MCRConfiguration2; -import org.mycore.ubo.picker.IdentityService; -import org.mycore.ubo.picker.PersonSearchResult; - import javax.naming.OperationNotSupportedException; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.QueryParam; import javax.ws.rs.core.Response; +import com.google.gson.Gson; +import org.mycore.access.MCRAccessManager; +import org.mycore.common.config.MCRConfiguration2; +import org.mycore.ubo.picker.IdentityService; +import org.mycore.ubo.picker.PersonSearchResult; + @Path(UBOPersonSearchResource.PATH) public class UBOPersonSearchResource { diff --git a/ubo-common/src/main/resources/META-INF/resources/edit-admin.xed b/ubo-common/src/main/resources/META-INF/resources/edit-admin.xed index 2602a9ce8..c7d9245ce 100644 --- a/ubo-common/src/main/resources/META-INF/resources/edit-admin.xed +++ b/ubo-common/src/main/resources/META-INF/resources/edit-admin.xed @@ -2,6 +2,7 @@ Publikation bearbeiten + Edit publication
@@ -47,7 +48,7 @@
- Publikation: + : @@ -68,7 +69,7 @@
- erschienen in: + : diff --git a/ubo-common/src/main/resources/META-INF/resources/edit-publication.xed b/ubo-common/src/main/resources/META-INF/resources/edit-publication.xed index e550cb22e..b1e595149 100644 --- a/ubo-common/src/main/resources/META-INF/resources/edit-publication.xed +++ b/ubo-common/src/main/resources/META-INF/resources/edit-publication.xed @@ -115,7 +115,7 @@
- + @@ -140,7 +140,7 @@
- Projektinformationen: + :
diff --git a/ubo-common/src/main/resources/META-INF/resources/import-editor.xed b/ubo-common/src/main/resources/META-INF/resources/import-editor.xed index 43e26a8fd..3b543c286 100644 --- a/ubo-common/src/main/resources/META-INF/resources/import-editor.xed +++ b/ubo-common/src/main/resources/META-INF/resources/import-editor.xed @@ -69,8 +69,8 @@ - Neue Publikation erfassen: - Eintrag korrigieren: + + @@ -404,7 +404,7 @@
-
@@ -828,16 +828,16 @@
- Verweise: + :
:
diff --git a/ubo-common/src/main/resources/META-INF/resources/import-list.xed b/ubo-common/src/main/resources/META-INF/resources/import-list.xed index 6eb31df71..704143cf3 100644 --- a/ubo-common/src/main/resources/META-INF/resources/import-list.xed +++ b/ubo-common/src/main/resources/META-INF/resources/import-list.xed @@ -57,12 +57,13 @@
- +
@@ -89,13 +90,14 @@