Hubert,
A complete, minimal example makes it much easier to answer questions or
fix bugs.
In TDB, getNamedModel will always return a Model. You can check whether
it current exists with containsNamedModel.
TDB does not track empty graphs - it just has a set of quads and a set
of triples.
containsNamedModel => there is at least one quad with the G field begin
the URI given.
Dataset ds = TDBFactory.createDataset() ;
boolean b = ds.containsNamedModel("http://example/") ;
System.out.println("contains: "+b) ;
Model m = ds.getNamedModel("http://example/") ;
System.out.println("Is model null?: "+(m==null)) ;
Adding management of graph names would be quite a burden, impacting
efficiency as well as complicating many application tasks.
The general purpose dataset performs the role of being able to
incorporate any model from any storage system. Adding a model is like
adding to a map (in fact it is adding to a map!). TDB doesn't do that;
adding a model is a copy into TDB storage.
Andy
On 23/08/14 05:01, Rob Vesse wrote:
Hubert
Please show your actual code otherwise we can't tell what (if anything)
you might be doing wrong
Also versions matter, what versions of ARQ and TDB are you using?
Rob
On 22/08/2014 16:52, "Hubert A Le Van Gong" <[email protected]> wrote:
Hello,
For some reason I just can't seem to be able to completely delete a named
model from a dataset...
I initially thought of simply using removeNamedModel() - didn't work
(model & statements still available).
I've searched the mailing list and found a similar (old) thread where it
was recommended to do
a removeAll() which I did. This effectively empties the model but a
getNamedModel() will return
the Model (albeit empty).
I even tried to do both removeAll() followed by a removeNameModel() but
no success.
In case it makes a difference, I'm using TDB.
What am I doing wrong?
Andy
Cheers,
Hubert