use of org.apache.jena.sdb.graph.PrefixMappingSDB in project jena by apache.
the class TestPrefixMappingSDB method prefix4.
@Test
public void prefix4() {
String uri = "http://example/";
PrefixMapping pmap = new PrefixMappingSDB(defaultPrefixURI, sdb);
pmap.setNsPrefix("ex", uri);
assertEquals("ex", pmap.getNsURIPrefix("http://example/"));
}
use of org.apache.jena.sdb.graph.PrefixMappingSDB in project jena by apache.
the class TestPrefixMappingSDB method prefix3.
@Test
public void prefix3() {
String uri = "http://example/";
PrefixMapping pmap = new PrefixMappingSDB(defaultPrefixURI, sdb);
pmap.setNsPrefix("ex", uri);
PrefixMapping pmap2 = new PrefixMappingSDB(defaultPrefixURI, sdb);
String x = pmap2.getNsPrefixURI("ex");
assertNotNull(x);
assertEquals(uri, x);
}
use of org.apache.jena.sdb.graph.PrefixMappingSDB in project jena by apache.
the class TestPrefixMappingSDB method prefix6.
@Test
public void prefix6() {
String uri = "http://example/";
PrefixMapping pmap = new PrefixMappingSDB(defaultPrefixURI, sdb);
pmap.setNsPrefix("ex", uri);
assertEquals("ex:foo", pmap.qnameFor("http://example/foo"));
}
use of org.apache.jena.sdb.graph.PrefixMappingSDB in project jena by apache.
the class TestPrefixMappingSDB method prefix2.
@Test
public void prefix2() {
PrefixMapping pmap = new PrefixMappingSDB(defaultPrefixURI, sdb);
pmap.setNsPrefix("ex", "http://example/");
assertNotNull(pmap.getNsPrefixURI("ex"));
}
use of org.apache.jena.sdb.graph.PrefixMappingSDB in project jena by apache.
the class TestPrefixMappingSDB method prefix7.
@Test
public void prefix7() {
String uri1 = "http://example/";
String uri2 = "http://example/ns#";
PrefixMapping pmap = new PrefixMappingSDB(defaultPrefixURI, sdb);
pmap.setNsPrefix("ex1", uri1);
pmap.setNsPrefix("ex2", uri2);
assertEquals("ex2:foo", pmap.qnameFor("http://example/ns#foo"));
}
Aggregations