Difference between revisions of "Template:CalculateMapping"

From DBpedia Mappings
Jump to: navigation, search
(Created page with '<table class="wikitable"> <tr><th style="text-align:left" colspan="2">Calculate Mapping </th></tr> {{#if:{{{operation|}}}|<tr> <td width="200px">operation</td> <td width="350px">...')
 
 
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<table class="wikitable">
+
<includeonly><table class="wikitable">
<tr><th style="text-align:left" colspan="2">Calculate Mapping
+
<tr><th style="text-align:left" colspan="2">Calculate Mapping <small>([[Template:CalculateMapping|<span style="cursor:help;">help</span>]])</small>
 
</th></tr>
 
</th></tr>
 
{{#if:{{{operation|}}}|<tr>
 
{{#if:{{{operation|}}}|<tr>
Line 12: Line 12:
 
{{#if:{{{unit1|}}}|<tr>
 
{{#if:{{{unit1|}}}|<tr>
 
<td width="200px">template property unit 1</td>
 
<td width="200px">template property unit 1</td>
<td width="350px">{{{unit1}}}</td>
+
<td width="350px">[[Datatype:{{{unit1}}}|{{{unit1}}}]]</td>
 
</tr>}}
 
</tr>}}
 
{{#if:{{{templateProperty2|}}}|<tr>
 
{{#if:{{{templateProperty2|}}}|<tr>
Line 20: Line 20:
 
{{#if:{{{unit2|}}}|<tr>
 
{{#if:{{{unit2|}}}|<tr>
 
<td width="200px">template property unit 2</td>
 
<td width="200px">template property unit 2</td>
<td width="350px">{{{unit2}}}</td>
+
<td width="350px">[[Datatype:{{{unit2}}}|{{{unit2}}}]]</td>
 
</tr>}}
 
</tr>}}
 
{{#if:{{{ontologyProperty|}}}|<tr>
 
{{#if:{{{ontologyProperty|}}}|<tr>
 
<td> ontology property</td>
 
<td> ontology property</td>
<td>[[OntologyProperty:{{#replace:{{{ontologyProperty}}}|:|/}}]]</td>
+
<td>[[OntologyProperty:{{#replace:{{{ontologyProperty}}}|:|%2F}}|{{{ontologyProperty}}}]]</td>
 
</tr>}}
 
</tr>}}
</table>
+
</table></includeonly>
 +
<noinclude>'''<nowiki>{{CalculateMapping}}</nowiki>''' maps two template properties to one ontology property by calculating one value from both template property values using a given operation.
 +
 
 +
=== Usage ===
 +
 
 +
<pre>
 +
{{CalculateMapping
 +
| operation        =
 +
| templateProperty1 =
 +
| unit1            =
 +
| templateProperty2 =
 +
| unit2            =
 +
| ontologyProperty  =
 +
}}
 +
</pre>
 +
 
 +
=== Meanings ===
 +
 
 +
* '''operation''': mathematical operation. Currently supported operation: add.
 +
* '''templateProperty1'''
 +
* '''unit1'''
 +
* '''templateProperty2'''
 +
* '''unit2'''
 +
* '''ontologyProperty'''
 +
 
 +
=== Example ===
 +
 
 +
<pre>
 +
{{CalculateMapping
 +
| operation        =
 +
| templateProperty1 =
 +
| unit1            =
 +
| templateProperty2 =
 +
| unit2            =
 +
| ontologyProperty  =
 +
}}
 +
</pre>
 +
</noinclude>

Latest revision as of 17:36, 12 March 2010

{{CalculateMapping}} maps two template properties to one ontology property by calculating one value from both template property values using a given operation.

Usage

{{CalculateMapping
| operation         = 
| templateProperty1 = 
| unit1             = 
| templateProperty2 = 
| unit2             = 
| ontologyProperty  = 
}}

Meanings

  • operation: mathematical operation. Currently supported operation: add.
  • templateProperty1
  • unit1
  • templateProperty2
  • unit2
  • ontologyProperty

Example

{{CalculateMapping
| operation         = 
| templateProperty1 = 
| unit1             = 
| templateProperty2 = 
| unit2             = 
| ontologyProperty  = 
}}