Is there an API function that lists all models (graphs) within a given dataset?
There is a function listNames() in Dataset. I am not sure if it is used to
return all named graphs. When I tried to use it like this:
Iterator<String> models = ds.listNames(); //ds is a dataset object that has
been created and connected.
while (models.hasNext())
{
System.out.println(models.next());
}
Java gave me the following error:
Exception in thread "main" java.lang.NullPointerException
at com.hp.hpl.jena.sparql.util.NodeUtils$1.accept(NodeUtils.java:94)
at com.hp.hpl.jena.sparql.util.NodeUtils$1.accept(NodeUtils.java:90)
at
com.hp.hpl.jena.util.iterator.MapFilterIterator.hasNext(MapFilterIterator.java:55)
I am using TDB.
Could anyone help me figure that out ?
Thanks in advance.
Site (Victor) Guo