use of org.apache.jena.iri.IRIFactory in project jena by apache.
the class MoreTests method testNotIDN.
public void testNotIDN() {
@SuppressWarnings("deprecation") IRIFactory f = IRIFactory.jenaImplementation();
IRI base = f.create("http://example.org/");
IRI frag = base.resolve("outbind://4-00000000C45F478BF9F2A048A7A59DE" + "3AE35F7230700D3E3AEE226D20A49A390BCD779EC5D4700" + "00003DB3650000D3E3AEE226D20A49A390BCD779EC5D470" + "00001182DB0000/www.uconnectevent.org");
Iterator<Violation> it = frag.violations(false);
assertTrue(it.hasNext());
// while (it.hasNext()) {
// System.err.println(it.next().getLongMessage());
// }
}
use of org.apache.jena.iri.IRIFactory in project jena by apache.
the class MoreTests method testRelativizeFrag1.
public void testRelativizeFrag1() {
@SuppressWarnings("deprecation") IRIFactory f = IRIFactory.jenaImplementation();
IRI base = f.create("http://example.org/somefolder/mybase.rdf");
IRI frag = f.create("http://example.org#foo");
IRI rel = base.relativize(frag);
assertEquals(frag, rel);
// System.err.println(rel.toString());
IRI back = base.resolve(rel);
assertEquals(frag, back);
}
use of org.apache.jena.iri.IRIFactory in project jena by apache.
the class MoreTests method testRelativizeFrag2.
public void testRelativizeFrag2() {
@SuppressWarnings("deprecation") IRIFactory f = IRIFactory.jenaImplementation();
IRI base = f.create("http://example.org/somefolder/mybase.rdf");
IRI frag = f.create("http://example.org/#foo");
IRI rel = base.relativize(frag);
assertEquals("/#foo", rel.toString());
IRI back = base.resolve(rel);
assertEquals(frag, back);
}
use of org.apache.jena.iri.IRIFactory in project jena by apache.
the class Additional method relDotSlash2.
@Test
public void relDotSlash2() throws MalformedURLException {
IRIFactory f = IRIFactory.iriImplementation();
IRI iri = f.construct("http://a/b/c/dddd;pppp?qqqqq");
IRI iri2 = iri.resolve("./foo");
test(iri2, "http://a/b/c/foo");
}
use of org.apache.jena.iri.IRIFactory in project jena by apache.
the class Additional method relDotSlash1.
@Test
public void relDotSlash1() throws MalformedURLException {
IRIFactory f = IRIFactory.iriImplementation();
IRI iri = f.construct("http://a/b/c/dddd;pppp?qqqqq");
IRI iri2 = iri.resolve("./");
test(iri2, "http://a/b/c/");
}
Aggregations