실습 SQARPLE

workshop
김사현 (토론 | 기여)님의 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.                      
}