Commit d4287809 authored by Steinberg, Jan's avatar Steinberg, Jan
Browse files

optimizations for setSpec functionality

parent 63f60878
......@@ -135,6 +135,9 @@ public class XsltTransformerOaiPmhBundlesStreamSource implements BundlesStreamSo
stream().
flatMap(mp -> {
LOG.debug("filling list identifier stream with mp {}, from {}, until {}, setSpec {}", mp, from, until, setSpec);
if (setSpec.isEmpty() || setSpec == null) {
return client.listIdentifiersStream(mp, from, until, null);
}
return client.listIdentifiersStream(mp, from, until, setSpec);
});
......
......@@ -11,6 +11,8 @@
<label>Base URL
<input type="text" name="input" ng-model="dataDto.oaiPmhEndpoint">
</label>
</div>
<div>
<label>Set Specification
<input type="text" name="input" ng-model="dataDto.setSpec">
</label>
......
......@@ -1175,6 +1175,21 @@ public class XsltTransformerOaiPmhBundlesStreamSourceTest {
}
/*
@Test
public void streamWzbSpecificSet() throws IOException {
Map<String, String> map = new HashMap<>();
String oaiDcXsltString = IOUtils.toString(
getClass().
getClassLoader().
getResourceAsStream("xslt/wzb-oai_dc-2-xmlbundle.xslt"), StandardCharsets.UTF_8);
map.put("oai_dc", oaiDcXsltString);
XsltTransformerOaiPmhBundlesStreamSource bss = new XsltTransformerOaiPmhBundlesStreamSource("https://www.econstor.eu/oai/request", "col_10419_48639", map);
bss.getBundlesStream().map(Object::toString).forEach(LOG::info);
}
*/
@Test
public void getSinglePublicationWzb() throws IOException {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment