4
|
1 <tool id="tab2rdf" name="Tab-to-RDF" version="0.1">
|
|
2 <description>Converter</description>
|
|
3 <command interpreter="python">
|
|
4 tab2rdf.py $input_file $output_file $output_format $namespace
|
|
5 #for $i in $triples
|
|
6 ${i.s_col} ${i.p_val} ${i.o_col} ${i.o_type}
|
|
7 #end for
|
|
8 </command>
|
|
9 <inputs>
|
|
10 <param name="input_file" type="data" format="tabular" label="Input File (tabular)"/>
|
11
|
11 <param name="namespace" type="text" size="50" value="http://localhost/" label="Namespace (Subject)" />
|
4
|
12 <param name="output_format" type="select" label="Output Format">
|
|
13 <option value="ntriples">N-Triples</option>
|
|
14 <option value="turtle">Turtle</option>
|
|
15 <option value="rdfxml">RDF/XML</option>
|
|
16 </param>
|
|
17 <repeat name="triples" title="Triples">
|
11
|
18 <param name="s_col" type="data_column" data_ref="input_file" label="Subject (column)" />
|
|
19 <param name="p_val" type="text" size="50" value="a" label="Predicate (text)" />
|
|
20 <param name="o_col" type="data_column" data_ref="input_file" label="Object (column)" />
|
|
21 <param name="o_type" label="Check if this object is Literal (Keep unchecked if this object is URI)" type="boolean" truevalue="1" falsevalue="0" checked="False"/>
|
4
|
22 </repeat>
|
|
23 </inputs>
|
|
24 <outputs>
|
|
25 <data name="output_file" format="tabular" label="${tool.name} on ${on_string}"/>
|
|
26 </outputs>
|
|
27 <help>
|
11
|
28
|
4
|
29 **What it does**
|
11
|
30
|
|
31 Sample Input::
|
|
32
|
|
33 name age superviser
|
|
34 Micheal 42 John
|
|
35 Anne 30 Micheal
|
|
36
|
|
37 Sample Parameters::
|
|
38
|
|
39 Namespace - 'http://localhost/'
|
|
40 Triple 1 - c1 'age' c2(literal)
|
|
41 Triple 2 - c3 'supervises' c1(URI)
|
|
42
|
|
43 Sample Output::
|
|
44
|
|
45 <http://localhost/Michael> <http://localhost/age> "42"
|
|
46 <http://localhost/Anne> <http://localhost/age> "30"
|
|
47 <http://localhost/John> <http://localhost/supervises> <http://localhost/Micheal>
|
|
48 <http://localhost/Micheal> <http://localhost/supervises> <http://localhost/Anne>
|
|
49
|
|
50 **Output Format**
|
|
51
|
|
52 Output RDF format is N-Triples by default.
|
|
53
|
|
54 Raptor's Rapper has to be installed to generate the output in Turtle or RDF/XML.
|
|
55
|
4
|
56 </help>
|
|
57 </tool>
|