Template:TemplateMapping: Difference between revisions
AnjaJentzsch (talk | contribs) No edit summary |
AnjaJentzsch (talk | contribs) No edit summary |
||
Line 9: | Line 9: | ||
<tr> | <tr> | ||
<td>corresponding class</td> | <td>corresponding class</td> | ||
<td>[[OntologyClass:{{{correspondingClass}}}]]</td> | <td>[[OntologyClass:{{{correspondingClass}}}|{{{correspondingClass}}}]]</td> | ||
</tr> | </tr> | ||
}} | }} | ||
Line 15: | Line 15: | ||
<tr> | <tr> | ||
<td>corresponding property</td> | <td>corresponding property</td> | ||
<td>[[ | <td>[[OntologyProperty:{{{correspondingProperty}}}|{{{correspondingProperty}}}]]</td> | ||
</tr> | </tr> | ||
}} | }} |
Revision as of 11:22, 18 March 2010
{{TemplateMapping}} maps templates to ontology classes.
Usage
{{TemplateMapping | mapToClass = | correspondingClass = | correspondingProperty = | mappings = }}
Meanings
- mapToClass: Templates are mapped to ontology classes. The template parameter mapToClass allows one DBpedia ontology class as a value.
- correspondingClass, correspondingProperty: In the case that different templates are used on the same page (for instance Automobile and Automobile Generation), the instance resulting from the second grade template (Automobile Generation) can be connected to the instance of the first grade template (Automobile) using a corresponding property. Thus, if an instance of type correspondingClass is found on the same page, it will be connected to the instances of the mapped template by correspondingProperty.
- mappings: Mappings map template properties to ontology properties, they have to be defined by using PropertyMapping or IntermediateNodeMapping. Custom, user-defined, mappings like the GeocoordinatesMapping can also be defined.
Example
The template Infobox Automobile shall be mapped to the ontology class Automobile.
The mapping for the template Infobox Automobile to the ontology class Automobile can be defined as follows:
{{TemplateMapping | mapToClass = Automobile }}
Mapping multiple templates from one wiki page
If a Wikipedia page contains multiple infobox templates, all relevant templates should be processed.
E.g. the templates Infobox Automobile and Infobox Automobile engine often occur on the same wiki page.
{{ Infobox Automobile | name = Volkswagen Golf ... }} {{ Infobox Automobile engine | name = Volkswagen air cooled engine ... }}
The first template infobox on a page defines the type of this page, while further infobox templates will be extracted as instances of the corresponding types and own URIs. The template Infobox Automobile shall be mapped to the ontology class Automobile, while the template Infobox Automobile engine shall be mapped to the ontology class AutomobileEngine. The correspondence of the infobox template instances can be preserved by defining a correspondingClass and correspondingProperty on the Automobile instance pointing to the AutomobileEngine instance.
The mapping for the template Infobox Automobile to the ontology class Automobile can be defined as follows:
{{TemplateMapping | mapToClass = Automobile }}
The mapping for the template Infobox Automobile engine to the ontology class AutomobileEngine can be defined as follows:
{{TemplateMapping | mapToClass = AutomobileEngine | correspondingClass = Automobile | correspondingProperty = Automobile/engine }}