Hi, 

How can I get the prefixes from the TDB store using latest tdb version 0.9.0?

Previously, using version 0.8.10, I managed to get the prefixes using the 
following code

Model bModel = TDBFactory.createModel(repoDir);
OntModel aModel = ModelFactory.createOntologyModel(spec, bModel);
Map<String, String> prefixMap = new HashMap<String, String>();
prefixMap = aModel.getNsPrefixMap();


Now, with the latest version and in order to support transactions, the code has 
changed to:

Dataset aDataset = TDBFactory.createDataset(repoDir);
Map<String, String> prefixMap = new HashMap<String, String>();
Model model = dataset.getDefaultModel();
prefixMap = model.getNsPrefixMap();

but it doesn't retrieve all prefixes from the model.

Should I use a different method or API to retrieve the prefixes stored in the 
tdb?


Cheers,
Emilio

Reply via email to