2013-10-15 2 views
1

Fuseki를 사용하여 로컬 온톨로지에서 SPARQL 쿼리를 실행하려고하는데 결과를 얻을 수 없습니다.SPARQL 쿼리가 결과를 제공하지 않습니다.

### http://localhost:2020/country/6 

<http://localhost:2020/country/6> rdf:type <http://localhost:2020/vocab/country> , owl:NamedIndividual ; 
rdfs:label "country #6" ; 
<http://localhost:2020/vocab/country_id> 6 ; 
<http://localhost:2020/vocab/country_name_nl> "Nederland" ;        
<http://localhost:2020/vocab/country_code> "nl" . 

그리고 속성이 하나처럼 :

### http://localhost:2020/vocab/country_code 

<http://localhost:2020/vocab/country_code> rdfs:label "country code" . 

내가 실행하는 데 노력하고있어 테스트 쿼리는 다음과 같습니다

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> 
SELECT ?name WHERE {?name rdfs:type <http://localhost:2020/vocab/country>} LIMIT 50 

왜 내 온톨로지는이 같은 국가의 목록이 포함되어 있습니다 이게 나에게 국가 목록을주지 않는가? 대신 빈 "이름"열이 생깁니다

답변

3

실수는 '유형'은 rdf가 아니라 rdfs ... 지금 매력처럼 작동합니다!

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 
SELECT ?name WHERE {?name rdf:type <http://localhost:2020/vocab/country>} LIMIT 50 
+0

@ 하루 내로 답변을 수락 할 수 있음을 잊지 마세요. – RobV

+0

@RobV 감사합니다. 알림을 설정합니다 :) – Tumtum

관련 문제