"실습 SQARPLE"의 두 판 사이의 차이

workshop
둘러보기로 가기 검색하러 가기
(새 문서: # 국가서지 LOD, 국립중앙도서관 http://lod.nl.go.kr/sparql #* 주제가 수원 화성인 도서를 검색 해보기 - ‘주제’ 클래스의 ‘수원 화성‘ 개체...)
 
17번째 줄: 17번째 줄:
  
 
limit 100
 
limit 100
 +
</pre>
 +
 +
#한국사LOD - http://lod.koreanhistory.or.kr/lodSparqlEndPoint.do
 +
#*정약용이 역임했던 관직 검색해보기 - '인물’ 클래스의 ‘정약용‘ 개체의 id > http://lod.koreanhistory.or.kr/resources/page/인명_정약용
 +
 +
<pre>
 +
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 +
PREFIX hlod: http://lod.koreanhistory.or.kr/
 +
 +
select *
 +
 +
where {
 +
hlod:인명_정약용 hlod:hasCareerInfo ?careerinfo.
 +
?careerinfo hlod:careerName ?career.
 +
?careerinfo hlod:hasStartDate ?startDate.
 +
?careerinfo hlod:hasEndDate ?endDate.
 +
?careerinfo hlod:hasDynasty ?dynasty.
 +
 +
}
 +
</pre>
 +
 +
# 스마트관광정보LOD - http://data.visitkorea.or.kr/sparql
 +
#* 수원에 있는 문화유적지와 위경도 검색해보기
 +
 +
<pre>
 +
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
 +
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 +
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
 +
PREFIX kto: <http://data.visitkorea.or.kr/ontology/>
 +
PREFIX ktop: <http://data.visitkorea.or.kr/property/>
 +
PREFIX wgs: <http://www.w3.org/2003/01/geo/wgs84_pos#>
 +
 +
SELECT ?HistoricalPlace ?label ?address ?lat ?long
 +
WHERE {
 +
?HistoricalPlace rdf:type kto:HistoricalPlace.
 +
?HistoricalPlace ktop:location ?location.
 +
?location skos:broader <http://data.visitkorea.or.kr/resource/CATEGORY:311300>.
 +
 +
  ?HistoricalPlace ktop:address ?address.
 +
  ?HistoricalPlace rdfs:label ?label.
 +
 
 +
  ?HistoricalPlace wgs:lat ?lat.
 +
  ?HistoricalPlace wgs:long ?long.                     
 +
}
 
</pre>
 
</pre>

2019년 8월 8일 (목) 13:38 판

  1. 국가서지 LOD, 국립중앙도서관 http://lod.nl.go.kr/sparql
prefix dc: <http://purl.org/dc/elements/1.1/>
PREFIX dcterms: <http://purl.org/dc/terms/> 
PREFIX nlon: <http://lod.nl.go.kr/ontology/> 

SELECT * 

WHERE { 
<http://lod.nl.go.kr/resource/KSH00246771> nlon:isSubjectOf ?book.
?book rdf:type nlon:Book.
?book dcterms:title ?bookname.
?book dc:creator ?creator.
?book nlon:remainderOfTitle ?subtitle.
}

limit 100
  1. 한국사LOD - http://lod.koreanhistory.or.kr/lodSparqlEndPoint.do
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX hlod: http://lod.koreanhistory.or.kr/

select * 

where {
hlod:인명_정약용 hlod:hasCareerInfo ?careerinfo.
?careerinfo hlod:careerName ?career.
?careerinfo hlod:hasStartDate ?startDate.
?careerinfo hlod:hasEndDate ?endDate.
?careerinfo hlod:hasDynasty ?dynasty.

}
  1. 스마트관광정보LOD - http://data.visitkorea.or.kr/sparql
    • 수원에 있는 문화유적지와 위경도 검색해보기
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX kto: <http://data.visitkorea.or.kr/ontology/>
PREFIX ktop: <http://data.visitkorea.or.kr/property/>
PREFIX wgs: <http://www.w3.org/2003/01/geo/wgs84_pos#>

SELECT ?HistoricalPlace ?label ?address ?lat ?long
WHERE {
 ?HistoricalPlace rdf:type kto:HistoricalPlace.
 ?HistoricalPlace ktop:location ?location.
 ?location skos:broader <http://data.visitkorea.or.kr/resource/CATEGORY:311300>.
 
  ?HistoricalPlace ktop:address ?address.
  ?HistoricalPlace rdfs:label ?label.
  
   ?HistoricalPlace wgs:lat ?lat.
   ?HistoricalPlace wgs:long ?long.                      
}