I believe the API had changed across versions, so I did this:

    DatasetGraphTransaction dst = (DatasetGraphTransaction) ds.asDatasetGraph();
    DatasetGraphTDB datasetGraphTDB = dst.getBaseDatasetGraph();

 
 
Tkx,
Jim



________________________________
 From: Dick Murray <[email protected]>
To: [email protected] 
Sent: Monday, May 21, 2012 10:08 AM
Subject: ExQuadFilter cast error.
 
Hi all.

I needed to apply a low level filter so pulled the ExQuadFilter code to get
started but the following line in setup()...

DatasetGraphTDB dsg = (DatasetGraphTDB)(ds.asDatasetGraph()) ;

throws a...

Exception in thread "main" java.lang.ClassCastException:
com.hp.hpl.jena.tdb.transaction.DatasetGraphTransaction cannot be cast to
com.hp.hpl.jena.tdb.store.DatasetGraphTDB
    at com.unit4.dev.QuadFilter.setup(QuadFilter.java:66)
    at com.unit4.dev.QuadFilter.main(QuadFilter.java:57)

It looked standalone but as I'm fresh on this aspect of Jena an idea..? :-)

Regards Dick.

Reply via email to