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

optimizations for setSpec functionality

parent 63f60878
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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);
        });
        
+2 −0
Original line number Diff line number Diff line
@@ -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>
+15 −0
Original line number Diff line number Diff line
@@ -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 {
        
+12 −12

File changed.

Contains only whitespace changes.