use of org.apache.jena.shared.PrefixMapping in project jena by apache.
the class AbstractTestGraphOverDataset method graphDSG_prefixes_4.
@Test
public void graphDSG_prefixes_4() {
// All graphs exist.
Graph g = makeNamedGraph(baseDSG, gnNotSuchGraph);
PrefixMapping pmap = g.getPrefixMapping();
assertNotNull(pmap);
}
use of org.apache.jena.shared.PrefixMapping in project jena by apache.
the class AbstractTestPrefixMapping2 method prefix2.
@Test
public void prefix2() {
PrefixMapping pmap = create();
pmap.setNsPrefix("ex", "http://example/");
assertNotNull(pmap.getNsPrefixURI("ex"));
}
use of org.apache.jena.shared.PrefixMapping in project jena by apache.
the class AbstractTestPrefixMapping2 method prefix7.
@Test
public void prefix7() {
String uri1 = "http://example/";
String uri2 = "http://example/ns#";
PrefixMapping pmap = create();
pmap.setNsPrefix("ex1", uri1);
pmap.setNsPrefix("ex2", uri2);
assertEquals("ex2:foo", pmap.qnameFor("http://example/ns#foo"));
}
use of org.apache.jena.shared.PrefixMapping in project jena by apache.
the class AbstractTestPrefixMapping2 method prefix6.
@Test
public void prefix6() {
String uri = "http://example/";
PrefixMapping pmap = create();
pmap.setNsPrefix("ex", uri);
assertEquals("ex:foo", pmap.qnameFor("http://example/foo"));
}
use of org.apache.jena.shared.PrefixMapping in project jena by apache.
the class AbstractTestPrefixMapping2 method prefix4.
@Test
public void prefix4() {
String uri = "http://example/";
PrefixMapping pmap = create();
pmap.setNsPrefix("ex", uri);
assertEquals("ex", pmap.getNsURIPrefix("http://example/"));
}
Aggregations