annotate tab2rdf.xml @ 16:d779893dec56 draft default tip

Uploaded
author sem4j
date Wed, 11 Dec 2013 10:22:41 -0500
parents 8d4ee8bac6a6
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4
8c7a1b951bb3 Uploaded
sem4j
parents:
diff changeset
1 <tool id="tab2rdf" name="Tab-to-RDF" version="0.1">
8c7a1b951bb3 Uploaded
sem4j
parents:
diff changeset
2 <description>Converter</description>
8c7a1b951bb3 Uploaded
sem4j
parents:
diff changeset
3 <command interpreter="python">
8c7a1b951bb3 Uploaded
sem4j
parents:
diff changeset
4 tab2rdf.py $input_file $output_file $output_format $namespace
8c7a1b951bb3 Uploaded
sem4j
parents:
diff changeset
5 #for $i in $triples
8c7a1b951bb3 Uploaded
sem4j
parents:
diff changeset
6 ${i.s_col} ${i.p_val} ${i.o_col} ${i.o_type}
8c7a1b951bb3 Uploaded
sem4j
parents:
diff changeset
7 #end for
8c7a1b951bb3 Uploaded
sem4j
parents:
diff changeset
8 </command>
8c7a1b951bb3 Uploaded
sem4j
parents:
diff changeset
9 <inputs>
8c7a1b951bb3 Uploaded
sem4j
parents:
diff changeset
10 <param name="input_file" type="data" format="tabular" label="Input File (tabular)"/>
14
8d4ee8bac6a6 Uploaded
sem4j
parents: 11
diff changeset
11 <param name="namespace" type="text" size="50" value="http://localhost/" label="Namespace" />
4
8c7a1b951bb3 Uploaded
sem4j
parents:
diff changeset
12 <param name="output_format" type="select" label="Output Format">
8c7a1b951bb3 Uploaded
sem4j
parents:
diff changeset
13 <option value="ntriples">N-Triples</option>
8c7a1b951bb3 Uploaded
sem4j
parents:
diff changeset
14 <option value="turtle">Turtle</option>
8c7a1b951bb3 Uploaded
sem4j
parents:
diff changeset
15 <option value="rdfxml">RDF/XML</option>
8c7a1b951bb3 Uploaded
sem4j
parents:
diff changeset
16 </param>
8c7a1b951bb3 Uploaded
sem4j
parents:
diff changeset
17 <repeat name="triples" title="Triples">
11
6d2424f16a83 Uploaded
sem4j
parents: 4
diff changeset
18 <param name="s_col" type="data_column" data_ref="input_file" label="Subject (column)" />
6d2424f16a83 Uploaded
sem4j
parents: 4
diff changeset
19 <param name="p_val" type="text" size="50" value="a" label="Predicate (text)" />
6d2424f16a83 Uploaded
sem4j
parents: 4
diff changeset
20 <param name="o_col" type="data_column" data_ref="input_file" label="Object (column)" />
6d2424f16a83 Uploaded
sem4j
parents: 4
diff changeset
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
8c7a1b951bb3 Uploaded
sem4j
parents:
diff changeset
22 </repeat>
8c7a1b951bb3 Uploaded
sem4j
parents:
diff changeset
23 </inputs>
8c7a1b951bb3 Uploaded
sem4j
parents:
diff changeset
24 <outputs>
8c7a1b951bb3 Uploaded
sem4j
parents:
diff changeset
25 <data name="output_file" format="tabular" label="${tool.name} on ${on_string}"/>
8c7a1b951bb3 Uploaded
sem4j
parents:
diff changeset
26 </outputs>
8c7a1b951bb3 Uploaded
sem4j
parents:
diff changeset
27 <help>
11
6d2424f16a83 Uploaded
sem4j
parents: 4
diff changeset
28
4
8c7a1b951bb3 Uploaded
sem4j
parents:
diff changeset
29 **What it does**
11
6d2424f16a83 Uploaded
sem4j
parents: 4
diff changeset
30
6d2424f16a83 Uploaded
sem4j
parents: 4
diff changeset
31 Sample Input::
6d2424f16a83 Uploaded
sem4j
parents: 4
diff changeset
32
6d2424f16a83 Uploaded
sem4j
parents: 4
diff changeset
33 name age superviser
6d2424f16a83 Uploaded
sem4j
parents: 4
diff changeset
34 Micheal 42 John
6d2424f16a83 Uploaded
sem4j
parents: 4
diff changeset
35 Anne 30 Micheal
6d2424f16a83 Uploaded
sem4j
parents: 4
diff changeset
36
6d2424f16a83 Uploaded
sem4j
parents: 4
diff changeset
37 Sample Parameters::
6d2424f16a83 Uploaded
sem4j
parents: 4
diff changeset
38
6d2424f16a83 Uploaded
sem4j
parents: 4
diff changeset
39 Namespace - 'http://localhost/'
6d2424f16a83 Uploaded
sem4j
parents: 4
diff changeset
40 Triple 1 - c1 'age' c2(literal)
6d2424f16a83 Uploaded
sem4j
parents: 4
diff changeset
41 Triple 2 - c3 'supervises' c1(URI)
6d2424f16a83 Uploaded
sem4j
parents: 4
diff changeset
42
6d2424f16a83 Uploaded
sem4j
parents: 4
diff changeset
43 Sample Output::
6d2424f16a83 Uploaded
sem4j
parents: 4
diff changeset
44
6d2424f16a83 Uploaded
sem4j
parents: 4
diff changeset
45 &lt;http://localhost/Michael&gt; &lt;http://localhost/age&gt; "42"
6d2424f16a83 Uploaded
sem4j
parents: 4
diff changeset
46 &lt;http://localhost/Anne&gt; &lt;http://localhost/age&gt; "30"
6d2424f16a83 Uploaded
sem4j
parents: 4
diff changeset
47 &lt;http://localhost/John&gt; &lt;http://localhost/supervises&gt; &lt;http://localhost/Micheal&gt;
6d2424f16a83 Uploaded
sem4j
parents: 4
diff changeset
48 &lt;http://localhost/Micheal&gt; &lt;http://localhost/supervises&gt; &lt;http://localhost/Anne&gt;
6d2424f16a83 Uploaded
sem4j
parents: 4
diff changeset
49
6d2424f16a83 Uploaded
sem4j
parents: 4
diff changeset
50 **Output Format**
6d2424f16a83 Uploaded
sem4j
parents: 4
diff changeset
51
6d2424f16a83 Uploaded
sem4j
parents: 4
diff changeset
52 Output RDF format is N-Triples by default.
6d2424f16a83 Uploaded
sem4j
parents: 4
diff changeset
53
6d2424f16a83 Uploaded
sem4j
parents: 4
diff changeset
54 Raptor's Rapper has to be installed to generate the output in Turtle or RDF/XML.
6d2424f16a83 Uploaded
sem4j
parents: 4
diff changeset
55
4
8c7a1b951bb3 Uploaded
sem4j
parents:
diff changeset
56 </help>
8c7a1b951bb3 Uploaded
sem4j
parents:
diff changeset
57 </tool>