Question

I have a problem with asking DBpedia about all graphs using dotNetRDF. After executing code below:

SparqlRemoteEndpoint endpoint = new SparqlRemoteEndpoint(
    new Uri("http://dbpedia.org/sparql"), "http://dbpedia.org"
);
SparqlResultSet results = endpoint.QueryWithResultSet(
    "SELECT DISTINCT ?g WHERE { GRAPH ?g {?s ?p ?o} }"
);

I've got UriFormattedException with message Invalid URI: The format of the URI could not be determined.

There is a problem with the following graphs: b3sonto, b3sifp, dbprdf-label, virtrdf-label, facets - probably dotNetRDF forgets about default graph URI

BTW. I can successfully execute this query form dotNetRDF: SELECT ?s ?p ?o FROM <b3sonto> WHERE { ?s ?p ?o} limit 20

Do you have any idea why it doesn't work?

Was it helpful?

Solution

Those are not valid URIs and so dotNetRDF cannot handle them when they are returned. This is a bug with Virtuoso and should be reported as such to them (virtuoso-users@lists.sf.net)

They are not related to the default graph since the default graph is by definition unnamed and does not have a URI.

You can query Virtuoso with these fake URIs because dotNetRDF does not by default parse the query at all prior to sending the query. This allows for you to send non-standard syntax to the remote endpoint which dotNetRDF's standards compliant implementation may otherwise reject.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top