Template:PropertyMapping: Difference between revisions

From Mediawiki1
Jump to navigationJump to search
No edit summary
No edit summary
Line 20: Line 20:
{{#if:{{{unit|}}}|<tr>
{{#if:{{{unit|}}}|<tr>
<td>unit</td><td>[[Datatype:{{{unit}}}|{{{unit}}}]]</td>
<td>unit</td><td>[[Datatype:{{{unit}}}|{{{unit}}}]]</td>
</tr>}}
{{#if:{{{factor|}}}|<tr>
<td>factor</td><td>{{{factor}}}</td>
</tr>}}
{{#if:{{{language|}}}|<tr>
<td>language</td><td>{{{language}}}</td>
</tr>}}
</tr>}}
{{#if:{{{factor|}}}|<tr>
{{#if:{{{factor|}}}|<tr>
Line 39: Line 45:
| unit =
| unit =
| factor =
| factor =
| language =
| comment =
| comment =
}}
}}
Line 50: Line 57:
* '''unit''': If a template property containing a numerical value and a unit is mapped, the unit has to be defined (Please use only values from [http://mappings.dbpedia.org/index.php/DBpedia_Datatypes DBpedia unit and dimensions]). If a template property has no default unit defined, e.g. its values can contain different units of the same dimension, the dimension has to be defined for usability as well as validation reasons. Possible dimensions are Length or Mass.
* '''unit''': If a template property containing a numerical value and a unit is mapped, the unit has to be defined (Please use only values from [http://mappings.dbpedia.org/index.php/DBpedia_Datatypes DBpedia unit and dimensions]). If a template property has no default unit defined, e.g. its values can contain different units of the same dimension, the dimension has to be defined for usability as well as validation reasons. Possible dimensions are Length or Mass.
* '''factor''': Multiplication factor that is applied for numeric data.
* '''factor''': Multiplication factor that is applied for numeric data.
* '''language''': if the datatype is of rdf:langString we can define the language of the language tag using the 2 letter language code (e.g. language = de)
* '''comment''': Comment about this mapping. Not used during extraction, only on the wiki. Please use English.
* '''comment''': Comment about this mapping. Not used during extraction, only on the wiki. Please use English.


Line 80: Line 88:
| ontologyProperty = firstSpouse
| ontologyProperty = firstSpouse
| select = first
| select = first
}}
</pre>
The property mapping for the french title:
<pre>
{{PropertyMapping
| templateProperty = french_title
| ontologyProperty = title
| language = fr
}}
}}
</pre>
</pre>
</noinclude>
</noinclude>

Revision as of 07:04, 19 June 2014

{{PropertyMapping}} maps template properties to ontology properties.

Usage

{{PropertyMapping 
| templateProperty =
| ontologyProperty =
| select =
| unit =
| factor =
| language =
| comment =
}}

Meanings

  • templateProperty: A template property to ontology property mapping should list one template property which is to be mapped.
  • ontologyProperty: A template property to ontology property mapping should list one ontology property.
  • select: A selector used to map only one value from the list defined by the template property. Currently only 'first' and 'last' are admitted.
  • unit: If a template property containing a numerical value and a unit is mapped, the unit has to be defined (Please use only values from DBpedia unit and dimensions). If a template property has no default unit defined, e.g. its values can contain different units of the same dimension, the dimension has to be defined for usability as well as validation reasons. Possible dimensions are Length or Mass.
  • factor: Multiplication factor that is applied for numeric data.
  • language: if the datatype is of rdf:langString we can define the language of the language tag using the 2 letter language code (e.g. language = de)
  • comment: Comment about this mapping. Not used during extraction, only on the wiki. Please use English.

Example

The property mapping from the template property birth_date to the ontology property birthDate:

{{PropertyMapping 
| templateProperty = birth_date 
| ontologyProperty = birthDate 
}}

The property mapping for the number of visitors which is specified in millions:

{{PropertyMapping 
| templateProperty = visitors_mio
| ontologyProperty = visitors
| factor = 1000000
}}

The property mapping for the first value of the spouses template property:

{{PropertyMapping 
| templateProperty = spouses
| ontologyProperty = firstSpouse
| select = first
}}

The property mapping for the french title:

{{PropertyMapping 
| templateProperty = french_title
| ontologyProperty = title
| language = fr
}}