use of org.apache.jena.tdb.store.DatasetPrefixesTDB in project jena by apache.
the class TestPrefixMappingTDB method persistent2.
// Persistent.
@Test
public void persistent2() {
String dir = ConfigTest.getTestingDir();
FileOps.clearDirectory(dir);
DatasetPrefixesTDB prefixes = createTesting(Location.create(dir), new DatasetControlMRSW());
PrefixMapping pmap1 = prefixes.getPrefixMapping();
pmap1.setNsPrefix("x", "http://foo/");
prefixes.close();
prefixes = createTesting(Location.create(dir), new DatasetControlMRSW());
assertEquals("http://foo/", pmap1.getNsPrefixURI("x"));
prefixes.close();
}
use of org.apache.jena.tdb.store.DatasetPrefixesTDB in project jena by apache.
the class TestPrefixMappingTDB1 method multiple2.
@Test
public void multiple2() {
DatasetPrefixesTDB prefixes = createTestingMem();
// Same
PrefixMapping pmap1 = getPrefixMapping("http://graph/");
PrefixMapping pmap2 = getPrefixMapping("http://graph/");
pmap1.setNsPrefix("x", "http://foo/");
assertNotNull(pmap2.getNsPrefixURI("x"));
assertNotNull(pmap1.getNsPrefixURI("x"));
}
use of org.apache.jena.tdb.store.DatasetPrefixesTDB in project jena by apache.
the class TestPrefixMappingTDB method persistent1.
// Persistent.
@Test
public void persistent1() {
String dir = ConfigTest.getTestingDir();
FileOps.clearDirectory(dir);
DatasetPrefixesTDB prefixes = createTesting(Location.create(dir), new DatasetControlMRSW());
PrefixMapping pmap1 = prefixes.getPrefixMapping();
String x = pmap1.getNsPrefixURI("x");
assertNull(x);
prefixes.close();
}
use of org.apache.jena.tdb.store.DatasetPrefixesTDB in project jena by apache.
the class TestPrefixMappingTDB method multiple2.
@Test
public void multiple2() {
DatasetPrefixesTDB prefixes = createTestingMem();
// Same
PrefixMapping pmap1 = prefixes.getPrefixMapping("http://graph/");
PrefixMapping pmap2 = prefixes.getPrefixMapping("http://graph/");
pmap1.setNsPrefix("x", "http://foo/");
assertNotNull(pmap2.getNsPrefixURI("x"));
assertNotNull(pmap1.getNsPrefixURI("x"));
}
use of org.apache.jena.tdb.store.DatasetPrefixesTDB in project jena by apache.
the class TestPrefixMappingTDB method multiple1.
@Test
public void multiple1() {
DatasetPrefixesTDB prefixes = createTestingMem();
PrefixMapping pmap1 = prefixes.getPrefixMapping();
PrefixMapping pmap2 = prefixes.getPrefixMapping("http://graph/");
pmap1.setNsPrefix("x", "http://foo/");
assertNull(pmap2.getNsPrefixURI("x"));
assertNotNull(pmap1.getNsPrefixURI("x"));
}
Aggregations