Fixed in SVN (on SourceForge).

        Andy

On 22/01/11 20:13, Timo Westkämper wrote:
Hi Andy.

Thanks for the fast response. I will follow the issue for progress.

Br,
Timo

On 01/22/2011 09:54 PM, Andy Seaborne wrote:
Timo,

It's a bug. You are using the API right [low level API]. I've raised a
JIRA JENA-32 to make sure it does not get lost. (Too late here to fix
today)

Andy

https://issues.apache.org/jira/browse/JENA-32

On 22/01/11 19:25, Timo Westkämper wrote:
Hi.

Same problem with Node.ANY :

DataSource dataSource = DataSourceImpl.createMem();
Node subject = Node.createURI(TEST.NS);
Node predicate = Node.createURI(RDFS.label.getId());
Node object = Node.createAnon();
dataSource.asDatasetGraph().add(new Quad(Quad.defaultGraphIRI, subject,
predicate, object));
dataSource.asDatasetGraph().deleteAny(Node.ANY, subject, Node.ANY,
Node.ANY);

I am using the SPI, since the lower level integration seems to be
enough. I am writing Jean support for another RDF abstraction layer, the
stuff of the higher level API is not needed.

Br,
Timo Westkämper

On 01/22/2011 09:25 PM, Damian Steer wrote:

On 22 Jan 2011, at 14:31, Timo Westkämper<[email protected]>
wrote:

Hi.

Hi Timo,


I am having issues with the following code

DataSource dataSource = DataSourceImpl.createMem();
Node subject = Node.createURI(TEST.NS);
Node predicate = Node.createURI(RDFS.label.getId());
Node object = Node.createAnon();
dataSource.asDatasetGraph().add(new Quad(Quad.defaultGraphIRI,
subject, predicate, object));
dataSource.asDatasetGraph().deleteAny(null, subject, null, null);

The last line throws the following Exception :

java.lang.NullPointerException
at com.hp.hpl.jena.sparql.core.Quad.isDefaultGraph(Quad.java:87)
at
com.hp.hpl.jena.sparql.core.DatasetGraphCollection.fetchGraph(DatasetGraphCollection.java:75)


at
com.hp.hpl.jena.sparql.core.DatasetGraphCollection.delete(DatasetGraphCollection.java:33)


at
com.hp.hpl.jena.sparql.core.DatasetGraphBase.deleteAny(DatasetGraphBase.java:79)



Am I using the API wrong?
You're using the SPI, not the API (the model / resource stuff). Unlike
the API, where you use 'null' to match anything, the SPI uses Node.ANY
(hence your issue).

Out of interest, why are you using the SPI?

Damian


Reply via email to