On 14/12/12 12:59, markh wrote:
Hello

I have a case I cannot see how to support, any advice gratefully
received.

I have a graph which has a collection of properties which enable me to
logically subset the graph to give me a graph of currently valid
statements.  This concept of validity is an emergent property,
constantly changing as the graph evolves.

There are a number of queries I would like to run against the 'valid'
graph, for example examining complex property paths.

So, I would like to create a 'valid graph' on the fly, run queries
against it, then dump this graph.  All other work happen with respect
to the full graph.

I thought I could use SPARQL subquery functionality, but it seems to
me that a subquery returns results, not a graph.

I hoped to have a query a bit like this:

SELECT ?someinfo
WHERE{
GRAPH <transient valid graph> {
?someinfo has conditions
}

{construct{
foo}
where
{validity constraints}
  as <transient valid graph>}

}

Is there a part of the Jena/Fuseki implementation which might support
this?

SPARQL Query has sub-SELECTs, not sub-CONSTRUCTs. It does not need it because the information used to make the CONSTRUCT graph comes from variables of a WHERE pattern. The table produced by {SELECT} should be enough.

What you might do is use a combination of SPARQL Update and SPARQL Query. Do an update to create a graph in the dataset, query it, and then drop the graph.

        Andy


many thanks
mark


Reply via email to