The short answer is that the filegraph does not meet the contract of the Graph interface.
On Wed, Apr 29, 2015 at 1:14 PM, Andy Seaborne <[email protected]> wrote: > On 29/04/15 07:06, Claude Warren wrote: > >> Information I should have provided: >> >> The error occurs at: >> >> Caused by: java.lang.NullPointerException: null >> at >> >> org.apache.jena.n3.N3JenaWriterPP.preparePropertiesForSubject(N3JenaWriterPP.java:257) >> > > FYI - that is the old Turtle-writer and is to be retired. > > The RIOT one won't work either. > > Andy > > >> at that line we find >> if ( p.getURI().startsWith(RDF.getURI()) || >> >> since "p" is an anonymous node the getURI() returns null. >> >> Claude >> >> On Tue, Apr 28, 2015 at 10:47 PM, Claude Warren <[email protected]> wrote: >> >> I'm not sure this is an error so I thought I'd see what the consensus is >>> here before I do anything. >>> >>> My understanding is that the Graph interface has no restrictions on the >>> types of objects in the subject, predicate or object. That is that I >>> could >>> store an anonymous node as the predicate in a triple even though this is >>> not allowed in a model. >>> >>> The FileGraph implementation uses a model internally and when it writes >>> the data out the model restrictions seem to apply -- that is I can not >>> store an anonymous node as a predicate. >>> >>> All other graphs tested thus far allow saving the anonymous node as a >>> predicate. >>> >>> It may be that the format of the output is enforcing the restrictions. I >>> am currently using a TURTLE format. However any functional format would >>> be >>> acceptable. Is there a way to write the filegraph output when the graph >>> does not meet the model restrictions? >>> >>> Claude >>> >>> -- >>> I like: Like Like - The likeliest place on the web >>> <http://like-like.xenei.com> >>> LinkedIn: http://www.linkedin.com/in/claudewarren >>> >>> >> >> >> > -- I like: Like Like - The likeliest place on the web <http://like-like.xenei.com> LinkedIn: http://www.linkedin.com/in/claudewarren
