Mapping en:Infobox MLB player: Difference between revisions

From Mediawiki1
Jump to navigationJump to search
No edit summary
(Undo revision 12544 by Aloifolia (Talk))
Line 1: Line 1:
{{ TemplateMapping
{{TemplateMapping
  | mapToClass = BaseballPlayer
| mapToClass = BaseballPlayer
  | mappings =
| mappings =
      {{ PropertyMapping | templateProperty = name | ontologyProperty = foaf:name }}
{{PropertyMapping | templateProperty = bats | ontologyProperty = bats }}
      {{ PropertyMapping | templateProperty = team | ontologyProperty = club }}
{{PropertyMapping | templateProperty = throws | ontologyProperty = throws }}
      <!-- If 'altleague' is not used the property 'league' should have a constant value like 'MLB'.. -->
{{PropertyMapping | templateProperty = statyear | ontologyProperty = statisticYear }}
      <!-- {{ PropertyMapping | templateProperty = altleague | ontologyProperty = league }} -->
{{PropertyMapping | templateProperty = stat1label | ontologyProperty = statisticLabel }}
      {{ PropertyMapping | value = Major League Baseball | ontologyProperty = league }}
{{PropertyMapping | templateProperty = stat1value | ontologyProperty = statisticValue }}
      {{ PropertyMapping | templateProperty = position | ontologyProperty = position }}
{{PropertyMapping | templateProperty = name | ontologyProperty = foaf:name }}
      {{ PropertyMapping | templateProperty = birthdate | ontologyProperty = birthDate }}
{{PropertyMapping | templateProperty = team | ontologyProperty = team }}
      {{ PropertyMapping | templateProperty = birthplace | ontologyProperty = birthPlace }}
{{PropertyMapping | templateProperty = number | ontologyProperty = number }}
      {{ PropertyMapping | templateProperty = deathdate | ontologyProperty = deathDate }}
{{PropertyMapping | templateProperty = position | ontologyProperty = position }}
      {{ PropertyMapping | templateProperty = deathplace | ontologyProperty = deathPlace }}
{{PropertyMapping | templateProperty = positionplain | ontologyProperty = position }}
      {{ PropertyMapping | templateProperty = bats | ontologyProperty = bats }}
{{PropertyMapping | templateProperty = birthdate | ontologyProperty = birthDate }}
      {{ PropertyMapping | templateProperty = throws | ontologyProperty = throws }}
{{PropertyMapping | templateProperty = debutteam | ontologyProperty = formerTeam }}
      {{ PropertyMapping | templateProperty = debutteam | ontologyProperty = debutTeam }}
{{PropertyMapping | templateProperty = awards | ontologyProperty = award }}
      {{ PropertyMapping | templateProperty = finalteam | ontologyProperty = formerTeam }}
{{PropertyMapping | templateProperty = teams | ontologyProperty = team }}
      {{ CombineDateMapping  
{{PropertyMapping | templateProperty = deathdate | ontologyProperty = deathDate }}
          | templateProperty1 = debutdate   
{{PropertyMapping | templateProperty = finalteam | ontologyProperty = formerTeam }}
          | unit1 = xsd:gMonthDay  
{{CombineDateMapping | templateProperty1 = debutdate  | unit1 = xsd:gMonthDay | templateProperty2 = debutyear | unit2 = xsd:gYear | ontologyProperty = activeYearsStartDate }}
          | templateProperty2 = debutyear  
{{CombineDateMapping | templateProperty1 = finaldate | unit1 = xsd:gMonthDay | templateProperty2 = finalyear | unit2 = xsd:gYear | ontologyProperty = activeYearsEndDate }}
          | unit2 = xsd:gYear  
          | ontologyProperty = activeYearsStartDate }}
      {{ CombineDateMapping  
          | templateProperty1 = finaldate  
          | unit1 = xsd:gMonthDay  
          | templateProperty2 = finalyear  
          | unit2 = xsd:gYear  
          | ontologyProperty = activeYearsEndDate }}
      <!--
      Statistics do not make sense because they the seperate properties rip the cohesion apart:
      {{ PropertyMapping | templateProperty = statyear | ontologyProperty = statisticYear }}
      {{ PropertyMapping | templateProperty = stat1/2/3/4/5/6label | ontologyProperty = statisticLabel }}
      {{ PropertyMapping | templateProperty = stat1/2/3/4/5/6value | ontologyProperty = statisticValue }}
      -->
      {{ PropertyMapping | templateProperty = awards | ontologyProperty = award }}
      {{ PropertyMapping | templateProperty = teams | ontologyProperty = formerTeam }}
}}
}}
<!--
    Properties which are not mapped (yet)
      Useless properties:
      {{ PropertyMapping | templateProperty = image | ontologyProperty = }}
      {{ PropertyMapping | templateProperty = width | ontologyProperty = }}
      {{ PropertyMapping | templateProperty = caption | ontologyProperty = }}
      {{ PropertyMapping | templateProperty = update | ontologyProperty = }}
      Maybe useful properties but without a counterpart so far:
      {{ PropertyMapping | templateProperty = altleagueshort | ontologyProperty = }}
      {{ PropertyMapping | templateProperty = positionplain | ontologyProperty = }}
      {{ PropertyMapping | templateProperty = positionplain | ontologyProperty = }}
      {{ PropertyMapping | templateProperty = hofdate | ontologyProperty = }}
      {{ PropertyMapping | templateProperty = hofvote | ontologyProperty = }}
      {{ PropertyMapping | templateProperty = hofmethod | ontologyProperty = }}
      {{ PropertyMapping | templateProperty = hoftype | ontologyProperty = }}
      {{ PropertyMapping | templateProperty = hoflink | ontologyProperty = }}
-->

Revision as of 13:17, 2 May 2011

This is the mapping for the Wikipedia template Infobox MLB player. Find usages of this Wikipedia template here.

Test this mapping (or in namespace File or Creator) with some example Wikipedia pages. Check which properties are not mapped yet.

Read more about mapping Wikipedia templates.

Template Mapping (help)
map to class BaseballPlayer

Mappings




Property Mapping (help)
template property bats
ontology property bats




Property Mapping (help)
template property throws
ontology property throws




Property Mapping (help)
template property statyear
ontology property statisticYear




Property Mapping (help)
template property stat1label
ontology property statisticLabel




Property Mapping (help)
template property stat1value
ontology property statisticValue




Property Mapping (help)
template property name
ontology property foaf:name




Property Mapping (help)
template property team
ontology property team




Property Mapping (help)
template property number
ontology property number




Property Mapping (help)
template property position
ontology property position




Property Mapping (help)
template property positionplain
ontology property position




Property Mapping (help)
template property birthdate
ontology property birthDate




Property Mapping (help)
template property debutteam
ontology property formerTeam




Property Mapping (help)
template property awards
ontology property award




Property Mapping (help)
template property teams
ontology property team




Property Mapping (help)
template property deathdate
ontology property deathDate




Property Mapping (help)
template property finalteam
ontology property formerTeam
Combine Date Mapping (help)
template property 1 debutdate
template property unit 1 xsd:gMonthDay
template property 2 debutyear
template property unit 2 xsd:gYear
ontology property activeYearsStartDate
Combine Date Mapping (help)
template property 1 finaldate
template property unit 1 xsd:gMonthDay
template property 2 finalyear
template property unit 2 xsd:gYear
ontology property activeYearsEndDate