use of org.apache.jena.iri.IRI in project jena by apache.
the class TestMERelativize method computeIRI.
@Override
IRI computeIRI() {
IRI base = ((TestMoreExamples) parent.testAt(0)).getIRI();
IRI rel = ((TestMoreExamples) parent.testAt(2)).getIRI();
return base.relativize(rel, TestCreator.RelativizeFlags);
}
use of org.apache.jena.iri.IRI in project jena by apache.
the class TestMEResult method computeIRI.
@Override
IRI computeIRI() {
IRI base = ((TestMoreExamples) parent.testAt(0)).getIRI();
IRI rel = ((TestMoreExamples) parent.testAt(1)).getIRI();
return base.create(rel);
}
use of org.apache.jena.iri.IRI in project jena by apache.
the class MoreTests method testXPointer.
public void testXPointer() {
@SuppressWarnings("deprecation") IRIFactory f = IRIFactory.jenaImplementation();
IRI base = f.create("http://example.org/");
IRI frag = base.resolve("http://eg.com/test.txt#xpointer(/unit[5])");
Iterator<Violation> it = frag.violations(false);
assertTrue(it.hasNext());
// while (it.hasNext()) {
// System.err.println(it.next().getLongMessage());
// }
}
use of org.apache.jena.iri.IRI in project jena by apache.
the class TestErrorMessages method runTest.
@Override
public void runTest() {
IRI iri = f.create(uri);
Iterator<Violation> it = iri.violations(true);
while (it.hasNext()) {
Violation v = it.next();
printErrorMessages(v);
}
}
use of org.apache.jena.iri.IRI in project jena by apache.
the class TestExample method runTestJustSpec.
private void runTestJustSpec() {
IRIFactory f = specs[specID].isSchemeSpec() ? IRIFactory.iriImplementation() : all[specID][Force.MUST];
IRI iri = f.create(uri);
if (iri.hasViolation(false)) {
if (good)
fail("Unexpected violation found: " + ((iri.violations(false).next())).codeName());
} else {
if (!good)
fail("Expected a violation, none found.");
}
}
Aggregations