Mercurial > repos > greg > greg_sparql
comparison sparql-7785ad38967f/sparql/executor.xml @ 0:46996d3b1cfb default tip
Uploaded
| author | greg |
|---|---|
| date | Tue, 13 Mar 2012 16:29:09 -0400 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:46996d3b1cfb |
|---|---|
| 1 <?xml version="1.0"?> | |
| 2 <tool id="sparql query executor" name="SPARQL Query Tool" is_multi_byte="true"> | |
| 3 <description>gets RDF graphs by using SPARQL.</description> | |
| 4 <description lang="ja">SPARQLを使ってRDFグラフを取得します</description> | |
| 5 | |
| 6 <inputs> | |
| 7 <param name="endpoint" type="text" value="" size="60" label="Endpoint URL" /> | |
| 8 <param name="query" format="txt" type="data" label="Query" /> | |
| 9 </inputs> | |
| 10 | |
| 11 <outputs> | |
| 12 <data format="txt" name="output" /> | |
| 13 </outputs> | |
| 14 | |
| 15 <command interpreter="ruby">executor.rb -e '$endpoint' --query-file '$query' -o '$output'</command> | |
| 16 | |
| 17 <help> | |
| 18 **What it does** | |
| 19 | |
| 20 SPARQL is a query language for RDF graphs. | |
| 21 | |
| 22 About SPARQL, see http://www.w3.org/TR/rdf-sparql-query/ | |
| 23 | |
| 24 ----- | |
| 25 | |
| 26 **How to use** | |
| 27 | |
| 28 To use this tool a user first needs SPARQL query as an input. | |
| 29 | |
| 30 For example:: | |
| 31 | |
| 32 SELECT * WHERE { | |
| 33 ?s ?p ?o | |
| 34 } LIMIT 10 | |
| 35 | |
| 36 Please input a SPARQL endpoint URL ( e.g. http://www.semantic-systems-biology.org/biogateway/endpoint ) and select the SPARQL query dataset. | |
| 37 | |
| 38 And click the execute button. | |
| 39 | |
| 40 The results can be shown on the middle pane by clicking the eye symbol on the history pane. | |
| 41 | |
| 42 ----- | |
| 43 | |
| 44 .. class:: infomark | |
| 45 | |
| 46 **Note:** SPARQL results has a header line (e.g. ?S ?V ?O). If you want to remove the header line, use the `'Text Manipulation / Remove beginning' tool`_, and remove a first line. | |
| 47 | |
| 48 .. _`'Text Manipulation / Remove beginning' tool`: /tool_runner?tool_id=Remove+beginning1 | |
| 49 | |
| 50 ----- | |
| 51 | |
| 52 **Output** | |
| 53 | |
| 54 SPARQL results as tabular format. | |
| 55 | |
| 56 ----- | |
| 57 | |
| 58 **Example** | |
| 59 | |
| 60 If you specify example parameter, the results was:: | |
| 61 | |
| 62 ?s ?p ?o | |
| 63 <http://www.openlinksw.com/virtrdf-data-formats#default-iid> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.openlinksw.com/schemas/virtrdf#QuadMapFormat> | |
| 64 <http://www.openlinksw.com/virtrdf-data-formats#default-iid-nullable> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.openlinksw.com/schemas/virtrdf#QuadMapFormat> | |
| 65 <http://www.openlinksw.com/virtrdf-data-formats#default-iid-nonblank> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.openlinksw.com/schemas/virtrdf#QuadMapFormat> | |
| 66 <http://www.openlinksw.com/virtrdf-data-formats#default-iid-nonblank-nullable> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.openlinksw.com/schemas/virtrdf#QuadMapFormat> | |
| 67 <http://www.openlinksw.com/virtrdf-data-formats#default> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.openlinksw.com/schemas/virtrdf#QuadMapFormat> | |
| 68 <http://www.openlinksw.com/virtrdf-data-formats#default-nullable> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.openlinksw.com/schemas/virtrdf#QuadMapFormat> | |
| 69 <http://www.openlinksw.com/virtrdf-data-formats#sql-varchar> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.openlinksw.com/schemas/virtrdf#QuadMapFormat> | |
| 70 <http://www.openlinksw.com/virtrdf-data-formats#sql-varchar-nullable> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.openlinksw.com/schemas/virtrdf#QuadMapFormat> | |
| 71 <http://www.openlinksw.com/virtrdf-data-formats#sql-varchar-dt> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.openlinksw.com/schemas/virtrdf#QuadMapFormat> | |
| 72 <http://www.openlinksw.com/virtrdf-data-formats#sql-varchar-dt-nullable> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.openlinksw.com/schemas/virtrdf#QuadMapFormat> | |
| 73 | |
| 74 </help> | |
| 75 | |
| 76 <help lang="ja"> | |
| 77 **概要** | |
| 78 | |
| 79 SPARQLはRDFグラフを取得するための問い合わせ言語です。 | |
| 80 | |
| 81 SPARQLに関する詳しい情報は http://www.w3.org/TR/rdf-sparql-query/ を参照してください。 | |
| 82 | |
| 83 ----- | |
| 84 | |
| 85 **使い方** | |
| 86 | |
| 87 ツールを使う準備として、以下のようなSPARQLクエリーをヒストリーに用意してください:: | |
| 88 | |
| 89 SELECT * WHERE { | |
| 90 ?s ?p ?o | |
| 91 } LIMIT 10 | |
| 92 | |
| 93 クエリーをヒストリーに用意したら、このツールを表示しSPARQL endpoint URL( 例: http://www.semantic-systems-biology.org/biogateway/endpoint )を入力し、そして先ほど用意したクエリーのデータセットをSPARQL queryとして指定して下さい。 | |
| 94 | |
| 95 以上が完了したら、executeボタンを押して下さい。 | |
| 96 | |
| 97 問い合わせが行われ、結果がデータセットとしてヒストリーに積まれます。目で描かれたアイコンを押すと問い合わせ結果が真ん中のペインに表示されます。 | |
| 98 | |
| 99 ----- | |
| 100 | |
| 101 .. class:: infomark | |
| 102 | |
| 103 **ノート:** SPARQLの問い合わせ結果には「?S ?V ?O」のようなヘッダ行が含まれます。もしこれを取り除きたい場合は、`'Text Manipulation / Remove beginning' tool`_ ツールを利用して下さい。 | |
| 104 | |
| 105 .. _`'Text Manipulation / Remove beginning' tool`: /tool_runner?tool_id=Remove+beginning1 | |
| 106 | |
| 107 ----- | |
| 108 | |
| 109 **出力** | |
| 110 | |
| 111 タブ区切り形式でSPARQLの問い合わせ結果が出力されます。 | |
| 112 | |
| 113 ----- | |
| 114 | |
| 115 **使用例** | |
| 116 | |
| 117 上記の「使い方」で示したクエリを指定して問い合わせた場合、以下のような結果が得られます。:: | |
| 118 | |
| 119 ?s ?p ?o | |
| 120 <http://www.openlinksw.com/virtrdf-data-formats#default-iid> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.openlinksw.com/schemas/virtrdf#QuadMapFormat> | |
| 121 <http://www.openlinksw.com/virtrdf-data-formats#default-iid-nullable> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.openlinksw.com/schemas/virtrdf#QuadMapFormat> | |
| 122 <http://www.openlinksw.com/virtrdf-data-formats#default-iid-nonblank> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.openlinksw.com/schemas/virtrdf#QuadMapFormat> | |
| 123 <http://www.openlinksw.com/virtrdf-data-formats#default-iid-nonblank-nullable> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.openlinksw.com/schemas/virtrdf#QuadMapFormat> | |
| 124 <http://www.openlinksw.com/virtrdf-data-formats#default> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.openlinksw.com/schemas/virtrdf#QuadMapFormat> | |
| 125 <http://www.openlinksw.com/virtrdf-data-formats#default-nullable> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.openlinksw.com/schemas/virtrdf#QuadMapFormat> | |
| 126 <http://www.openlinksw.com/virtrdf-data-formats#sql-varchar> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.openlinksw.com/schemas/virtrdf#QuadMapFormat> | |
| 127 <http://www.openlinksw.com/virtrdf-data-formats#sql-varchar-nullable> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.openlinksw.com/schemas/virtrdf#QuadMapFormat> | |
| 128 <http://www.openlinksw.com/virtrdf-data-formats#sql-varchar-dt> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.openlinksw.com/schemas/virtrdf#QuadMapFormat> | |
| 129 <http://www.openlinksw.com/virtrdf-data-formats#sql-varchar-dt-nullable> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.openlinksw.com/schemas/virtrdf#QuadMapFormat> | |
| 130 | |
| 131 </help> | |
| 132 | |
| 133 </tool> |
