{"id":1512,"date":"2025-08-29T11:43:52","date_gmt":"2025-08-29T02:43:52","guid":{"rendered":"https:\/\/id.ndl.go.jp\/information\/?page_id=1512"},"modified":"2025-08-29T11:48:25","modified_gmt":"2025-08-29T02:48:25","slug":"example","status":"publish","type":"page","link":"https:\/\/id.ndl.go.jp\/information\/sparql-11\/example\/","title":{"rendered":"SPARQL\u691c\u7d22\u30af\u30a8\u30ea\u4f8b"},"content":{"rendered":"<style>img {max-width: 650px;} fieldset{\/*border:none;*\/ padding: 1em; margin-bottom: 1em} .entry form {text-align: left} .example {background: #f3f3f3; padding: 0.1em 1em} p {margin: 1em 0} h3, h4 {margin: 2em 0 1em} #systemname {margin:0} h4 {font-size: 110%; font-weight: bold} textarea {font-size: 95%; padding: 0.3em; width: 100%; height: 10em} #note1 {color: #444} figcaption {text-align:center} table {width: 100%; border-collapse: collapse; } thead {background: #f3f3f3} th, td {border: 1px solid #333; padding: 0.5em} th {text-align:center} td.hilite, em {background: #ffffdd} em {font-style: normal; text-decoration: underline} br {display:none} .topnav {text-align: right} code {font-size: 100%} html>body .entry ul {padding-left: 40px}  div.utilmenu>p{margin:0} p.nakanavi:before {content: '\u25b2'; display: inline-block; width: 1em;  text-indent: 0;} .menu ol { counter-reset: section; } .menu li { list-style: none; display:block; } .menu ol>li:before { content : counters(section, '-') '. ';  counter-increment : section;}<\/style>\n<hr\/>\n<div class=\"menu\" style=\"padding: 10px; margin-bottom: 10px; border: 1px solid #A9A9A9;\">\n<ol>\n<li><a href=\"#sec1\">\u7279\u5b9a\u306e\u65e5\u4ed8\u4ee5\u964d\u306b\u4f5c\u6210\u307e\u305f\u306f\u66f4\u65b0\u3055\u308c\u305f\u8457\u4f5c\u5178\u62e0\u3092\u691c\u7d22<\/a><\/li>\n<li><a href=\"#sec2\">\u7d4c\u6b74\u307e\u305f\u306f\u8077\u696d\u304b\u3089\u500b\u4eba\u540d\u3092\u691c\u7d22<\/a><\/li>\n<li><a href=\"#sec3\">\u3042\u308b\u65e5\u4ed8\u4ee5\u964d\u306b\u4f5c\u6210\u3055\u308c\u305f\u666e\u901a\u4ef6\u540d\u307e\u305f\u306f\u5730\u540d\u4ef6\u540d\u3092\u691c\u7d22<\/a><\/li>\n<\/ol>\n<\/div>\n<p>\u3053\u306e\u30da\u30fc\u30b8\u3067\u306f\u3001<a href=\"\/auth\/ndla\/sparql\"><abbr title=\"SPARQL Protocol and RDF Query Language\">SPARQL<\/abbr> 1.1\u306b\u5bfe\u5fdc\u3057\u305f\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8<\/a>\u3067\u53ef\u80fd\u306b\u306a\u3063\u305f\u691c\u7d22\u65b9\u6cd5\u3092\u7528\u3044\u3066\u3001\u3088\u304f\u4f7f\u308f\u308c\u308b\u4fbf\u5229\u306a\u691c\u7d22\u306e\u4e8b\u4f8b\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u4e8b\u4f8b\u3054\u3068\u306b\u691c\u7d22\u5f0f\u304c\u3042\u3089\u304b\u3058\u3081\u5165\u529b\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u300c\u30af\u30a8\u30ea\u5b9f\u884c\u300d\u30dc\u30bf\u30f3\u3092\u62bc\u4e0b\u3059\u308b\u3060\u3051\u3067\u7d50\u679c\u3092\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002SPARQL\u3092\u7528\u3044\u305f\u691c\u7d22\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u306f\u3001\u300c<a href=\"\/information\/sparql\/\">SPARQL\u306b\u3064\u3044\u3066<\/a>\u300d\u3001\u300c<a href=\"\/information\/sparql-11\/\">SPARQL1.1\u306b\u3064\u3044\u3066<\/a>\u300d\u306e\u30da\u30fc\u30b8\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<section>\n<h3 id=\"sec1\">1. \u7279\u5b9a\u306e\u65e5\u4ed8\u4ee5\u964d\u306b\u4f5c\u6210\u307e\u305f\u306f\u66f4\u65b0\u3055\u308c\u305f\u8457\u4f5c\u5178\u62e0\u3092\u691c\u7d22<\/h3>\n<p>\u56fd\u7acb\u56fd\u4f1a\u56f3\u66f8\u9928\u304c\u63d0\u4f9b\u3057\u3066\u3044\u308b\u8457\u4f5c\u5178\u62e0\u306e\u3046\u3061\u3001\u7279\u5b9a\u306e\u65e5\u4ed8\u4ee5\u964d\u306b\u4f5c\u6210\u307e\u305f\u306f\u66f4\u65b0\u3055\u308c\u305f\u3082\u306e\u3092\u691c\u7d22\u3067\u304d\u307e\u3059\u3002\u524a\u9664\u3055\u308c\u305f\u5178\u62e0\u306f\u691c\u7d22\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n<p>2025\u5e748\u67081\u65e5\u4ee5\u964d\u306b\u4f5c\u6210\u307e\u305f\u306f\u66f4\u65b0\u304c\u3042\u3063\u305f\u8457\u4f5c\u5178\u62e0\u3092\u691c\u7d22\u3059\u308b\u30af\u30a8\u30ea\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3067\u3059\u3002\u6307\u5b9a\u3059\u308b\u65e5\u4ed8\u3092\u5909\u66f4\u3057\u3066\u691c\u7d22\u3059\u308b\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u691c\u7d22\u5f0f\u306e<\/p>\n<p>FILTER ( xsd:dateTime(?\u6700\u7d42\u66f4\u65b0\u65e5) >= &#8220;2025-08-01T00:00:00&#8243;^^xsd:dateTime )<\/p>\n<p>\u3068\u3044\u3046\u884c\u306e\u65e5\u4ed8\u3092\u4fee\u6b63\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u306a\u304a\u3001\u3053\u306e\u30af\u30a8\u30ea\u3067\u306f\u8457\u4f5c\u5178\u62e0\u306b\u5225\u540d\/\u5225\u30bf\u30a4\u30c8\u30eb\u307e\u305f\u306f\u5275\u4f5c\u8005\u304c\u8907\u6570\u5b58\u5728\u3059\u308b\u5834\u5408\u306b\u306f\u3001\u540c\u3058URI\u306e\u8457\u4f5c\u5178\u62e0\u304c\u8907\u6570\u884c\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n<form action=\"\/auth\/ndla\/sparql\" method=\"get\">\n<fieldset>\n<legend>SPARQL\u30af\u30a8\u30ea\u691c\u7d22\u30d5\u30a9\u30fc\u30e0<\/legend>\n<div>\n<label for=\"query\">SPARQL\u30af\u30a8\u30ea<\/label><\/p>\n<pre><textarea name=\"query\">PREFIX xl: <http:\/\/www.w3.org\/2008\/05\/skos-xl#>\r\nPREFIX skos: <http:\/\/www.w3.org\/2004\/02\/skos\/core#>\r\nPREFIX rdfs: <http:\/\/www.w3.org\/2000\/01\/rdf-schema#>\r\nPREFIX foaf: <http:\/\/xmlns.com\/foaf\/0.1\/>\r\nPREFIX xsd: <http:\/\/www.w3.org\/2001\/XMLSchema#>\r\nprefix dct: <http:\/\/purl.org\/dc\/terms\/>\r\nSELECT DISTINCT ?URI ?\u540d\u79f0\u30fb\u30bf\u30a4\u30c8\u30eb ?\u5225\u540d\u30fb\u5225\u30bf\u30a4\u30c8\u30eb ?\u5275\u4f5c\u8005 ?\u5275\u4f5c\u8005URI ?\u4f5c\u6210\u65e5 ?\u6700\u7d42\u66f4\u65b0\u65e5 WHERE {\r\n?URI skos:inScheme <http:\/\/id.ndl.go.jp\/auth#work> ;\r\nxl:prefLabel\/xl:literalForm ?\u540d\u79f0\u30fb\u30bf\u30a4\u30c8\u30eb ;\r\ndct:created ?\u4f5c\u6210\u65e5 ;\r\ndct:modified ?\u6700\u7d42\u66f4\u65b0\u65e5 .\r\nOPTIONAL {\r\n?URI xl:altLabel\/xl:literalForm ?\u5225\u540d\u30fb\u5225\u30bf\u30a4\u30c8\u30eb ;\r\nskos:exactMatch ?exactmatch .\r\n}\r\nOPTIONAL {\r\n?URI foaf:primaryTopic\/dct:creator ?\u5275\u4f5c\u8005URI .\r\nBIND (URI(REPLACE(str(?\u5275\u4f5c\u8005URI),\"entity\",\"ndlna\")) as ?crea3).\r\n?crea3 rdfs:label ?\u5275\u4f5c\u8005\r\n}\r\nFILTER ( xsd:dateTime(?\u6700\u7d42\u66f4\u65b0\u65e5) >= \"2025-08-01T00:00:00\"^^xsd:dateTime )\r\n}\r\nORDER BY DESC(?\u6700\u7d42\u66f4\u65b0\u65e5) LIMIT 1000<\/textarea><\/pre>\n<p><select name=\"format\"><option selected=\"selected\">HTML<\/option><option>Turtle<\/option><option>JSON<\/option><option>XML<\/option><option>CSV<\/option><\/select><\/div>\n<p><input type=\"submit\" value=\"\u30af\u30a8\u30ea\u5b9f\u884c\"\/><\/fieldset>\n<\/form>\n<div align=\"right\">\n<p class=\"nakanavi\"><a href=\"#header\">\u3053\u306e\u30da\u30fc\u30b8\u306e\u5148\u982d\u3078<\/a><\/p>\n<\/div>\n<p><!--eos(1)--><\/section>\n<section>\n<h3 id=\"sec2\">2. \u7d4c\u6b74\u307e\u305f\u306f\u8077\u696d\u304b\u3089\u500b\u4eba\u540d\u3092\u691c\u7d22<\/h3>\n<p>SPARQL\u3092\u7528\u3044\u305f\u691c\u7d22\u306b\u3088\u308a\u3001\u901a\u5e38\u306e\u691c\u7d22\u753b\u9762\u3067\u306f\u691c\u7d22\u5bfe\u8c61\u3068\u3057\u3066\u3044\u306a\u3044\u3001\u5178\u62e0\u306b\u8a18\u9332\u3055\u308c\u305f\u7d4c\u6b74\u7b49\u304b\u3089\u3082\u500b\u4eba\u3092\u691c\u7d22\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u5178\u62e0\u3092\u4f5c\u6210\u3057\u305f\u5e74\u4ee3\u306b\u3088\u308a\u3001\u500b\u4eba\u306e\u80a9\u66f8\u304d\u3084\u8077\u696d\u306f\u3001\u300c\u7d4c\u6b74\uff08rda:biographicalInformation\uff09\u300d\u3060\u3051\u3067\u306f\u306a\u304f\u300c\u8077\u696d\uff08rda:professionOrOccupation\uff09\u300d\u3068\u3057\u3066\u3082\u8a18\u9332\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u304c\u3042\u308b\u305f\u3081\u3001\u7db2\u7f85\u7684\u306a\u691c\u7d22\u306e\u305f\u3081\u306bOR\u6761\u4ef6\u3092\u7528\u3044\u3066\u300c\u7d4c\u6b74\u300d\u307e\u305f\u306f\u300c\u8077\u696d\u300d\u3092\u691c\u7d22\u3057\u307e\u3059\u3002<\/p>\n<p>\u7d4c\u6b74\u307e\u305f\u306f\u8077\u696d\u306b\u300c\u5c0f\u8aac\u5bb6\u300d\u3068\u3044\u3046\u6587\u5b57\u5217\u3092\u542b\u307f\u3001\u540d\u79f0\u304c\u300c\u5c71\u300d\u3068\u3044\u3046\u6587\u5b57\u3067\u59cb\u307e\u308b\u4eba\u7269\u3092\u53d6\u308a\u51fa\u3059SPARQL\u30af\u30a8\u30ea\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\nSPARQL1.1\u306b\u3088\u308b\u691c\u7d22\u306e\u4e0a\u9650\u304c1,000\u4ef6\u306e\u305f\u3081\u3001\u540d\u79f0\u306e\u6700\u521d\u306e\u6587\u5b57\u3067\u7d5e\u308a\u8fbc\u3080\u3088\u3046FILTER\u3092\u7528\u3044\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u6761\u4ef6\u304c\u4e0d\u8981\u306a\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u304b\u3089<\/p>\n<p>\u300cFILTER regex(?heading, &#8216;^\u5c71&#8217;).\u300d<\/p>\n<p>\u90e8\u5206\u306e\u884c\u3092\u524a\u9664\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<form action=\"\/auth\/ndla\/sparql\" method=\"get\">\n<fieldset>\n<legend>SPARQL\u30af\u30a8\u30ea\u691c\u7d22\u30d5\u30a9\u30fc\u30e0<\/legend>\n<div>\n<label for=\"query\">SPARQL\u30af\u30a8\u30ea<\/label><\/p>\n<pre><textarea name=\"query\">PREFIX skos: <http:\/\/www.w3.org\/2004\/02\/skos\/core#>\r\nPREFIX rdfs: <http:\/\/www.w3.org\/2000\/01\/rdf-schema#>\r\nPREFIX rda: <http:\/\/RDVocab.info\/ElementsGr2\/>\r\nPREFIX foaf: <http:\/\/xmlns.com\/foaf\/0.1\/>\r\nPREFIX xl: <http:\/\/www.w3.org\/2008\/05\/skos-xl#>\r\nPREFIX ndl: <http:\/\/ndl.go.jp\/dcndl\/terms\/>\r\nSELECT ?uri1 ?\u540d\u79f0\u30fb\u30bf\u30a4\u30c8\u30eb ?\u7d4c\u6b74\u7b49 WHERE {\r\n?uri1 foaf:primaryTopic ?uri2 ;\r\nxl:prefLabel [ xl:literalForm ?\u540d\u79f0\u30fb\u30bf\u30a4\u30c8\u30eb].\r\n?uri2 (rda:biographicalInformation|rda:professionOrOccupation) ?\u7d4c\u6b74\u7b49 .\r\nFILTER regex(?\u7d4c\u6b74\u7b49, \"\u5c0f\u8aac\u5bb6\").\r\nFILTER regex(?\u540d\u79f0\u30fb\u30bf\u30a4\u30c8\u30eb, '^\u5c71').\r\n}<\/textarea><\/pre>\n<p><select name=\"format\"><option selected=\"selected\">HTML<\/option><option>Turtle<\/option><option>JSON<\/option><option>XML<\/option><option>CSV<\/option><\/select><\/div>\n<p><input type=\"submit\" value=\"\u30af\u30a8\u30ea\u5b9f\u884c\"\/><\/fieldset>\n<\/form>\n<div align=\"right\">\n<p class=\"nakanavi\"><a href=\"#header\">\u3053\u306e\u30da\u30fc\u30b8\u306e\u5148\u982d\u3078<\/a><\/p>\n<\/div>\n<p><!--eos(2)--><\/section>\n<section>\n<h3 id=\"sec3\">3. \u3042\u308b\u65e5\u4ed8\u4ee5\u964d\u306b\u4f5c\u6210\u3055\u308c\u305f\u666e\u901a\u4ef6\u540d\u307e\u305f\u306f\u5730\u540d\u4ef6\u540d\u3092\u691c\u7d22<\/h3>\n<p>\u56fd\u7acb\u56fd\u4f1a\u56f3\u66f8\u9928\u3067\u306f\u3001\u8cc7\u6599\u306e\u30c6\u30fc\u30de\u3068\u306a\u308b\u3082\u306e\u3054\u3068\u3092\u8868\u3059\u4ef6\u540d\u5178\u62e0\u3092\u4f5c\u6210\u3057\u3066\u3044\u307e\u3059\u30022025\u5e748\u67081\u65e5\u4ee5\u964d\u306b\u65b0\u3057\u304f\u4f5c\u6210\u3055\u308c\u305f\u4ef6\u540d\u5178\u62e0\u3092\u691c\u7d22\u3059\u308b\u30af\u30a8\u30ea\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u3088\u308a\u65b0\u3057\u3044\u4f5c\u6210\u65e5\u306e\u5178\u62e0\u3092\u691c\u7d22\u3059\u308b\u5834\u5408\u306f\u3001<\/p>\n<p>( xsd:dateTime(?\u4f5c\u6210\u65e5) >= &#8220;2025-08-01T00:00:00&#8243;^^xsd:dateTime )<\/p>\n<p>\u3068\u3044\u3046\u884c\u306e\u65e5\u4ed8\u3092\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<form action=\"\/auth\/ndla\/sparql\" method=\"get\">\n<fieldset>\n<legend>SPARQL\u30af\u30a8\u30ea\u691c\u7d22\u30d5\u30a9\u30fc\u30e0<\/legend>\n<div>\n<label for=\"query\">SPARQL\u30af\u30a8\u30ea<\/label><\/p>\n<pre>\r\n<textarea name=\"query\">PREFIX dct: <http:\/\/purl.org\/dc\/terms\/>\r\nPREFIX xsd: <http:\/\/www.w3.org\/2001\/XMLSchema#>\r\nPREFIX skos: <http:\/\/www.w3.org\/2004\/02\/skos\/core#>\r\nPREFIX rdfs: <http:\/\/www.w3.org\/2000\/01\/rdf-schema#>\r\nSELECT ?URI ?\u540d\u79f0\u30fb\u30bf\u30a4\u30c8\u30eb  ?\u4f5c\u6210\u65e5\r\nWHERE {\r\n  ?URI skos:inScheme ?inScheme ;\r\n           dct:created ?\u4f5c\u6210\u65e5 ;\r\n           rdfs:label ?\u540d\u79f0\u30fb\u30bf\u30a4\u30c8\u30eb .\r\n  FILTER (\r\n    ( ?inScheme = <http:\/\/id.ndl.go.jp\/auth#topicalTerms>\r\n      || ?inScheme = <http:\/\/id.ndl.go.jp\/auth#geographicNames> )\r\n    &&\r\n    ( xsd:dateTime(?\u4f5c\u6210\u65e5) >= \"2025-08-01T00:00:00\"^^xsd:dateTime )\r\n  )\r\n}\r\nORDER BY DESC(?\u4f5c\u6210\u65e5)<\/textarea><\/pre>\n<p><select name=\"format\"><option selected=\"selected\">HTML<\/option><option>Turtle<\/option><option>JSON<\/option><option>XML<\/option><option>CSV<\/option><\/select><\/div>\n<p><input type=\"submit\" value=\"\u30af\u30a8\u30ea\u5b9f\u884c\"\/><\/fieldset>\n<\/form>\n<div align=\"right\">\n<p class=\"nakanavi\"><a href=\"#header\">\u3053\u306e\u30da\u30fc\u30b8\u306e\u5148\u982d\u3078<\/a><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u7279\u5b9a\u306e\u65e5\u4ed8\u4ee5\u964d\u306b\u4f5c\u6210\u307e\u305f\u306f\u66f4\u65b0\u3055\u308c\u305f\u8457\u4f5c\u5178\u62e0\u3092\u691c\u7d22 \u7d4c\u6b74\u307e\u305f\u306f\u8077\u696d\u304b\u3089\u500b\u4eba\u540d\u3092\u691c\u7d22 \u3042\u308b\u65e5\u4ed8\u4ee5\u964d\u306b\u4f5c\u6210\u3055\u308c\u305f\u666e\u901a\u4ef6\u540d\u307e\u305f\u306f\u5730\u540d\u4ef6\u540d\u3092\u691c\u7d22 \u3053\u306e\u30da\u30fc\u30b8\u3067\u306f\u3001SPARQL 1.1\u306b\u5bfe\u5fdc\u3057\u305f\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3067\u53ef\u80fd\u306b\u306a\u3063\u305f\u691c\u7d22\u65b9\u6cd5 [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":0,"parent":820,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1512","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/id.ndl.go.jp\/information\/wp-json\/wp\/v2\/pages\/1512"}],"collection":[{"href":"https:\/\/id.ndl.go.jp\/information\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/id.ndl.go.jp\/information\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/id.ndl.go.jp\/information\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/id.ndl.go.jp\/information\/wp-json\/wp\/v2\/comments?post=1512"}],"version-history":[{"count":2,"href":"https:\/\/id.ndl.go.jp\/information\/wp-json\/wp\/v2\/pages\/1512\/revisions"}],"predecessor-version":[{"id":1515,"href":"https:\/\/id.ndl.go.jp\/information\/wp-json\/wp\/v2\/pages\/1512\/revisions\/1515"}],"up":[{"embeddable":true,"href":"https:\/\/id.ndl.go.jp\/information\/wp-json\/wp\/v2\/pages\/820"}],"wp:attachment":[{"href":"https:\/\/id.ndl.go.jp\/information\/wp-json\/wp\/v2\/media?parent=1512"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}