Permalink
Browse files

Fixing ceskaexpedice/ceska-digitalni-knihovna#21

  • Loading branch information...
Pavel Stastny
Pavel Stastny committed Mar 3, 2017
1 parent 5f1a470 commit 75f7b6f6c2d1c75bc28ee4d4e3e714ca8cddb0b7
@@ -9,3 +9,4 @@ cz.incad.kramerius.security.impl.criteria.DefaultDomainFilter
cz.incad.kramerius.security.impl.criteria.StrictDomainFilter
cz.incad.kramerius.security.impl.criteria.NegativeBenevolentModelFilter
cz.incad.kramerius.security.impl.criteria.BenevolentModelFilter
cz.knav.cdk.CDKStrictFilter

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1,31 @@
package cz.knav.cdk;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.xpath.XPathExpressionException;
import javax.xml.xpath.XPathFactory;
import org.junit.Assert;
import org.junit.Test;
import org.w3c.dom.Document;
import org.xml.sax.SAXException;
import cz.incad.kramerius.utils.XMLUtils;
public class CDKStrictFilterTest {
@Test
public void testFilter() throws IOException, ParserConfigurationException, SAXException, XPathExpressionException {
URL resource = CDKStrictFilterTest.class.getResource("rels-ext.xml");
InputStream is = resource.openStream();
Assert.assertNotNull(is);
Document document = XMLUtils.parseDocument(is, true);
XPathFactory factory = XPathFactory.newInstance();
String testURL = CDKStrictFilter.disectURL(factory, document);
Assert.assertEquals("http://cdk-test.lib.cas.cz/search/img?uuid=uuid:e15bdb43-41d4-48c7-bb64-7d3d1e2f769c&stream=TEXT_OCR&action=GETRAW", testURL);
}
}
@@ -0,0 +1,9 @@
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:kramerius="http://www.nsdl.org/ontologies/relationships#">
<rdf:Description rdf:about="info:fedora/uuid:e15bdb43-41d4-48c7-bb64-7d3d1e2f769c">
<fedora-model:hasModel xmlns:fedora-model="info:fedora/fedora-system:def/model#" rdf:resource="info:fedora/model:map"></fedora-model:hasModel>
<oai:itemID xmlns:oai="http://www.openarchives.org/OAI/2.0/">uuid:e15bdb43-41d4-48c7-bb64-7d3d1e2f769c</oai:itemID>
<kramerius:policy>policy:public</kramerius:policy>
<kramerius:hasPage rdf:resource="info:fedora/uuid:8925543d-2edc-4541-9108-bcca9dff25d6"></kramerius:hasPage>
<replicatedFrom xmlns="http://www.nsdl.org/ontologies/relationships#">http://kramerius.mzk.cz/search/handle/uuid:e15bdb43-41d4-48c7-bb64-7d3d1e2f769c</replicatedFrom><replicatedFrom xmlns="http://www.nsdl.org/ontologies/relationships#">http://cdk-test.lib.cas.cz/search/handle/uuid:e15bdb43-41d4-48c7-bb64-7d3d1e2f769c</replicatedFrom></rdf:Description>
</rdf:RDF>

0 comments on commit 75f7b6f

Please sign in to comment.