Hi Reto, all
Two issues here:
First the query: SELECT DISTINCT ?g { GRAPH ?g { ?s ?p ?o } }
does not specify NAMED graphs.
If the query is as follows
SELECT DISTINCT ?g FROM NAMED http://example.org/g1 { GRAPH ?g { ?s ?p ?o }
}
then the engine will return http://example.org/g1
because the clause GRAPH refers only NAMED graphs as mentioned by Andy
Second the parser: I think the parser needs not know about TcManager or
other providers in this case, because
the named graphs are all specified in the query.
Cheers
Hasan
On Fri, Mar 29, 2013 at 1:47 PM, Reto Bachmann-Gmür (JIRA)
<[email protected]>wrote:
>
> [
> https://issues.apache.org/jira/browse/CLEREZZA-761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13617295#comment-13617295]
>
> Reto Bachmann-Gmür commented on CLEREZZA-761:
> ---------------------------------------------
>
> zz>import org.apache.clerezza.rdf.core.sparql._
> import org.apache.clerezza.rdf.core.sparql._
> zz>val spp = $[SparqlPreParser]
> spp: org.apache.clerezza.rdf.core.sparql.SparqlPreParser =
> org.apache.clerezza.rdf.core.sparql.SparqlPreParser@3aa78e7a
> zz>spp.getReferredGraphs("SELECT DISTINCT ?g { GRAPH ?g { ?s ?p ?o } }",
> new UriRef("urn:x-localinstance:/content.graph"))
> res0: java.util.Set[org.apache.clerezza.rdf.core.UriRef] =
> [<urn:x-localinstance:/content.graph>]
> zz>
>
> As discussed in
> http://mail-archives.apache.org/mod_mbox/clerezza-dev/201303.mbox/%[email protected]%3Ethis
> should return all the graphs in the dataset. I think that
> SParqlPreParser being a service it could consider by default TcManager
> being the dataset, but it probably should also have a method that takes any
> TcProvider as dataset and return it's triple collections.
>
> > Implement SPARQL PreParser to support fastlane
> > ----------------------------------------------
> >
> > Key: CLEREZZA-761
> > URL: https://issues.apache.org/jira/browse/CLEREZZA-761
> > Project: Clerezza
> > Issue Type: New Feature
> > Reporter: Hasan
> > Assignee: Hasan
> >
> > The purpose is to have a class with a method to obtain referred graphs
> in a SPARQL Query or SPARQL Update
>
> --
> This message is automatically generated by JIRA.
> If you think it was sent incorrectly, please contact your JIRA
> administrators
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>