1

我查看了各种示例,并尝试INSERT使用 ARC2。没有任何结果。也许这是一些语法错误?

<?php

include_once("./vendor/semsol/arc2/ARC2.php");

  $dbpconfig = array(
  "remote_store_endpoint" => "http://dbpedia.org/sparql",
   );

  $store = ARC2::getRemoteStore($dbpconfig); 

  if ($errs = $store->getErrors()) {
     echo "<h1>getRemoteSotre error<h1>" ;
  }
$query = '
PREFIX untitled-ontology-3: http://.../untitled-ontology-3#>
PREFIX dbpedia-owl: <http://dbpedia.org/ontology/>
  PREFIX owl: <http://www.w3.org/2002/07/owl#>
  PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
  PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
  PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>

  INSERT INTO <http://localhost:8080/proyecto1/data/proveedRDF2.rdf> 
 {untitled-ontology-3#MMM  rfd:type dbpedia-owl:City; 
    ?untitled-ontology-3:nombreLocalidad  rdfs:label ?label .
}';

`

4

1 回答 1

0

在您的代码中,您有

untitled-ontology-3#MMM

代替

untitled-ontology-3:MMM
于 2017-08-15T06:09:01.250 回答