2
|
1 <tool id="sparql_import" name="SPARQL Import" version="1.0.0">
|
|
2 <description>Import data from a SPARQL Endpoint</description>
|
|
3 <command interpreter="python">sparql_import.py -u $url -q "$sparqlquery" -o $outfile</command>
|
|
4 <inputs>
|
|
5 <param name="url" type="text" format="text" size="80" label="SPARQL Endpoint URL"/>
|
|
6 <param name="sparqlquery" type="text" format="text" area="True" size="5x80" label="SPARQL Query"/>
|
|
7 </inputs>
|
|
8 <outputs>
|
|
9 <data name="outfile" format="tabular"/>
|
|
10 </outputs>
|
|
11 <help>
|
|
12 **What it does**
|
|
13
|
|
14 The SPARQL import executes a SPARQL query against a SPARQL endpoint and returns the results in tabular format, with one column per variable in the SPARQL query.
|
|
15
|
|
16 -------
|
|
17
|
|
18 **Example**
|
|
19
|
|
20 You could for example use this SPARQL Endpoint URL:
|
|
21
|
|
22 http://sparql.wikipathways.org/
|
|
23
|
|
24 and the following SPARQL query, which will select 25 sets of "subject", "predicate" and "object" out of the database, with no filtering at all::
|
|
25
|
|
26 SELECT ?s ?p ?o
|
|
27 WHERE { ?s ?p ?o }
|
|
28 LIMIT 10
|
|
29
|
|
30 This will generate a 3-column tabular output like this::
|
|
31
|
5
|
32 <http://identifiers.org/pubmed/12860264> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vocabularies.wikipathways.org/wp#PublicationReference>
|
|
33 <http://identifiers.org/pubmed/15782111> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vocabularies.wikipathways.org/wp#PublicationReference>
|
|
34 <http://identifiers.org/pubmed/11017945> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vocabularies.wikipathways.org/wp#PublicationReference>
|
|
35 <http://identifiers.org/pubmed/10997684> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vocabularies.wikipathways.org/wp#PublicationReference>
|
|
36 <http://identifiers.org/pubmed/19635799> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vocabularies.wikipathways.org/wp#PublicationReference>
|
|
37 <http://identifiers.org/pubmed/16480962> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vocabularies.wikipathways.org/wp#PublicationReference>
|
|
38 <http://identifiers.org/pubmed/15976321> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vocabularies.wikipathways.org/wp#PublicationReference>
|
|
39 <http://identifiers.org/pubmed/17218259> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vocabularies.wikipathways.org/wp#PublicationReference>
|
|
40 <http://identifiers.org/pubmed/17215298> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vocabularies.wikipathways.org/wp#PublicationReference>
|
|
41 <http://identifiers.org/pubmed/11177571> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vocabularies.wikipathways.org/wp#PublicationReference>
|
|
42
|
2
|
43
|
|
44 </help>
|
|
45 </tool>
|