When I run the same query against a fresh Open Anzo install I get:
>anzo query -A "SELECT DISTINCT ?graph { GRAPH ?graph { [] ?p [] } }"
?graph
--------------------------------------------------
datasource:systemDatasource
http://openanzo.org/internal/osgi
http://openanzo.org/namedGraphs/defaultSystemGraph
oareg:Datasources
oareg:SemanticService
http://openanzo.org/semanticServices/datasources
http://openanzo.org/semanticServices/echoService
It's possible that a bug's been fixed since the version you downloaded,
Andy, so I'd recommend refreshing to the latest nightly distribution.
> I have been looking at the SPARQL specification and I have not figured
> out a way that you can get rid of the items in the list that <b>start
> with</b> "
http://openanzo.org/" so only my graphs appear. Anybody
> have a suggestion on how I can do that?
Sure. You can use the built-in SPARQL regex filter to do this. Something
like:
SELECT DISTINCT ?graph {
GRAPH ?graph {
[] ?p []
}
FILTER(!regex(str(?graph), '
openanzo.org'))
}
> Also, why do you need -A on
> the command line to get this query to work. Looking at the anzo query
> help it says: "Query against a dataset composed of all named graphs in
> the repository". Maybe I missed something in the SPARQL
> specification, but doesn't the GRAPH keyword in the query do that?
No, GRAPH simply scopes part of the query to the named graph portion of
the RDF dataset in effect. You still need to tell the query engine what
should go in the named graph portion of the RDF dataset. This can be
accomplished via FROM NAMED clauses, via the SPARQL protocol
named-graph-uri parameter, or via an API. In the case of the Open Anzo
CLI, the -A flag says "include every graph you know about as a named
graph in the query's RDF dataset".
Some SPARQL implementations default to this behavior when querying
against an unspecified RDF dataset. Glitter (Open Anzo's SPARQL engine)
simply defaults to querying against an empty RDF dataset if nothing is
specified.
Lee