0

I'm trying to execute a SPARQL CONSTRUCT query against either a local TDB or a remote SPARQL endpoint. Now execConstruct on the QueryExecution returns a Model, which has no reference (that I know of) to any graph (and thus quads).

Is there a way to get quads from a construct query in Jena? I've seen references to execConstructDataset but it's not implemented in Jena 3.0 ...

JoelKuiper
  • 4,362
  • 2
  • 22
  • 33

1 Answers1

1

The grammar extension and QueryExecution operations execConstructDataset , execConstructQuads are post-jena 3.0.0. They are in the current codebase and development builds.

AndyS
  • 16,345
  • 17
  • 21
  • Are they deployed to Maven somewhere? Also will this allow me to do execConstructDataset on remote SPARQL endpoints? – JoelKuiper Aug 26 '15 at 20:42
  • Snapshots are available in the Apache snapshot repo. Snapshots are not releases and have not been as tested or checked. The only remote endpoint supporting it is the development Fuseki2 build. This is a language extension. – AndyS Aug 26 '15 at 20:51
  • I guess its's a bit premature to be using the SNAPSHOTS `QueryExecException Attempt to CONSTRUCT quads from a CONSTRUCT query, which is not ARQ Syntax org.apache.jena.sparql.engine.QueryExecutionBase.execConstructQuads (QueryExecutionBase.java:269)` – JoelKuiper Aug 26 '15 at 21:00
  • That's because the query was parsed as as SPARQL 1.1, not with ARQ extensions. Could you send a full example to the users@jena list? – AndyS Aug 28 '15 at 08:31
  • Simply calling execConstructQuads is only going to get you quads for triples in the default model of some dataset. What are you looking for when you say "no reference to any graph"? – AndyS Aug 28 '15 at 09:43
  • The specific exception is code that should have been removed and now has. You can call `execConstructQuads` if you want. – AndyS Aug 28 '15 at 09:44