use of org.apache.jena.riot.system.PrefixEntry in project jena by apache.
the class StoragePrefixesSimpleMem method get.
@Override
public Iterator<PrefixEntry> get(Node graphNode) {
graphNode = canonicalGraphName(graphNode);
PrefixMap pmap = map.get(graphNode);
if (pmap == null)
return Iter.nullIterator();
return pmap.getMapping().entrySet().stream().map(e -> PrefixEntry.create(e.getKey(), e.getValue())).iterator();
}
use of org.apache.jena.riot.system.PrefixEntry in project jena by apache.
the class AbstractTestDatasetPrefixesStorage method dsg_prefixes_11.
// Accessors
@Test
public void dsg_prefixes_11() {
StoragePrefixes prefixes = create();
prefixes.add(g1, pref1, "http://example.net/ns#");
List<Node> x = Iter.toList(prefixes.listGraphNodes());
assertEquals(1, x.size());
List<PrefixEntry> y = Iter.toList(prefixes.get(g1));
assertEquals(1, y.size());
}
Aggregations