-
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: UBO-385 Tolerate surrounding mycoreobject when filtering mods Added OA Diamond (#447) UBO-378 Allow to choose data sources used for enrichment in list import (#446) UBO-372 layout fixes in import list (#441) UBO-383 Update to current pica2mods version 2.11 (#444) UBO-382 Allow to set preconfigured classification values during scopus import (#443) UBO-381 Added leading brace to role when role is interviewer (#442) UBO-380 Allow to disable generation of data-subtext attributes in myc… (#440) UBO-372 fixed missing jquery-ui UBO-372 Replace chosen with bootstrap-select UBO-373 Fixed NullPointerException, store realm attribute of user in MCRJob (#438) UBO-370 Do not discard already assign roles hotfix - set mycore parent version back to 53, 55 is for MyCoRe 2024.06 UBO-369 Add link to destatis metadata to find all objects of a given destatis categid (#433) UBO-369 Support resolving of values of destatis category id's in response-facets.xsl (#432) UBO-367 FSU040THUL-5319 Set MCR.ContentTransformer.solr2csv.TransformerFactoryClass = net.sf.saxon.TransformerFactoryImpl, fixed XSLT-3 function invocations (#431) UBO-366 Updated i18n ubo.destatis to 'DESTATIS Fachsystematik' UBO-366 Removed obsolete index code for destatis by fachreferate (once needed by ThUniBib) UBO-366 Display destatis as metadata UBO-365 FSU040THUL-5159 Support "person_dgs" option in import-search.xed (#429)
- Loading branch information
Showing
37 changed files
with
486 additions
and
586 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
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
48 changes: 48 additions & 0 deletions
48
ubo-common/src/main/java/org/mycore/ubo/importer/EnrichmentConfigMgr.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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package org.mycore.ubo.importer; | ||
|
||
import org.jdom2.Element; | ||
import org.mycore.common.config.MCRConfiguration2; | ||
|
||
import java.util.Optional; | ||
|
||
/** | ||
* Class retrieves the enricher id from the form input of import-list.xed. | ||
* | ||
* @author shermann (Silvio Hermann) | ||
*/ | ||
public class EnrichmentConfigMgr { | ||
static final String DEFAULT_CONFIG_ID = "custom"; | ||
|
||
private EnrichmentConfigMgr() { | ||
} | ||
|
||
/** | ||
* Retrieves the enricher id from the import list form element. | ||
* If the value of the DataSource element is a valid enrichment config id that id is returned. Otherwise, | ||
* it assumed a list of enrichment sources e.g. <em>GBV Unpaywall ...</em> is provided. In that case a new | ||
* configuration with id <code>custom</code> is created and the returned id will be <code>custom</code>. | ||
* | ||
* @param formInput the form input (usually provided by import-list.xed) | ||
* | ||
* @return the enricher id or <code>null</code> | ||
*/ | ||
public static String getEnricherId(Element formInput) { | ||
Optional<Element> dataSource = formInput.getChildren("DataSources") | ||
.stream() | ||
.filter(element -> !element.getText().isEmpty()) | ||
.findFirst(); | ||
|
||
if (dataSource.isEmpty()) { | ||
return null; | ||
} | ||
|
||
String dataSrcTxt = dataSource.get().getText(); | ||
if (MCRConfiguration2.getString("MCR.MODS.EnrichmentResolver.DataSources." + dataSrcTxt).isPresent()) { | ||
return dataSrcTxt; | ||
} else { | ||
String property = "MCR.MODS.EnrichmentResolver.DataSources." + DEFAULT_CONFIG_ID; | ||
MCRConfiguration2.set(property, dataSrcTxt); | ||
return DEFAULT_CONFIG_ID; | ||
} | ||
} | ||
} |
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
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
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
Binary file removed
BIN
-559 Bytes
ubo-common/src/main/resources/META-INF/resources/external/chosen/chosen-sprite.png
Binary file not shown.
Oops, something went wrong.