-
Trying to build a query as follows (ignore prefixes): select ?org Th code is here: SparqlVariable org = new SparqlVariable("org"); The query which is built is as follows: SELECT ?org WHERE What might be wrong here? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Answered: The value that you provided for the object is being treated as a full URI and not as a compact URI. You can fix this by declaring the namespace prefix mapping for the prefix cids and then using .Object("cids:Organization") to add the object part of the triple pattern. To set the namespace mapping, create a NamespaceMapper and add the prefix mapping to it. e.g. var prefixes = new NamespaceMapper(); |
Beta Was this translation helpful? Give feedback.
Answered:
The value that you provided for the object is being treated as a full URI and not as a compact URI.
You can fix this by declaring the namespace prefix mapping for the prefix cids and then using .Object("cids:Organization") to add the object part of the triple pattern. To set the namespace mapping, create a NamespaceMapper and add the prefix mapping to it. e.g.
var prefixes = new NamespaceMapper();
prefixes.AddNamespace("cids", new Uri("http://some.url/here/"));