Difference between revisions of "Template:ConditionalMapping"

From DBpedia Mappings
Jump to: navigation, search
(Meanings)
Line 19: Line 19:
 
=== Meanings ===
 
=== Meanings ===
  
* '''cases''':  
+
* '''cases''': Cases define conditions on template properties and their values and can change the default mapping, like the ontology class the template is mapped to and the ontology properties the template properties are mapped to. The cases template property should contain a list of [[Template:Condition|Condition]] templates.
* '''defaultMappings''':  
+
* '''defaultMappings''': The default mapping defines the default template property mappings using PropertyMapping etc.. The default ontology class the template is mapped to has to be defined by an ''otherwise'' condition.
  
 
=== Example ===
 
=== Example ===

Revision as of 13:25, 8 March 2010

{{ConditionalMapping}} maps templates to ontology classes. In comparison to a TemplateMapping the mapping can be defined depending on template properties and their values.

Usage

{{ConditionalMapping
| cases           =
| defaultMappings =
}}

Meanings

  • cases: Cases define conditions on template properties and their values and can change the default mapping, like the ontology class the template is mapped to and the ontology properties the template properties are mapped to. The cases template property should contain a list of Condition templates.
  • defaultMappings: The default mapping defines the default template property mappings using PropertyMapping etc.. The default ontology class the template is mapped to has to be defined by an otherwise condition.

Example

{{ConditionalMapping
| cases =
  {{Condition 
  ... 
  }}

  ...

  {{Condition
  | otherwise
  ...
  }}

| defaultMappings =
  {{PropertyMapping
  ... 
  }}
  ...
}}