怎么在C#中执行spatql?
我下面的代码执行的时候总是提示错误
public void GetGraphFromDB()
{
SemanticServerStorage db = new SemanticServerStorage(
_connectionString,
_graphURI,
@"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
CONSTRUCT {?s rdfs:label ?name}
FROM <http://www.intellidimension.com/resources/samples/RoundTrip>
WHERE {?s rdf:type rdfs:Class; rdfs:label ?name}"); _graph = new GraphDataSource();
db.Load(_graph); StringWriter s = new StringWriter();
_graph.Format<NTriplesFormatter>(s); Console.Write("Graph retrieved from DB\n:" + s);
}
错误信息是: Expected command
我下面的代码执行的时候总是提示错误
public void GetGraphFromDB()
{
SemanticServerStorage db = new SemanticServerStorage(
_connectionString,
_graphURI,
@"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
CONSTRUCT {?s rdfs:label ?name}
FROM <http://www.intellidimension.com/resources/samples/RoundTrip>
WHERE {?s rdf:type rdfs:Class; rdfs:label ?name}"); _graph = new GraphDataSource();
db.Load(_graph); StringWriter s = new StringWriter();
_graph.Format<NTriplesFormatter>(s); Console.Write("Graph retrieved from DB\n:" + s);
}
错误信息是: Expected command
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货