Wikipedia:Lua/Modul/WikidataScheme/Scenario/en

Vorlagenprogrammierung Diskussionen Lua Unterseiten
Modul Deutsch English Modul: Dokumentation

This page is describing use case examples for WikidataScheme.

Imagine, a new data object shall be created from the scratch.

With WikidataScheme for certain typical objects always or often needed properties and their values shall be offered in a compehensive manner, as well as qualifiers and additional guidance.

The methods may be used to complete existing items as well, when certain properties and values shall be added.

Example: opera singer

Items for some kind of musicians shall be generated manually.

For all of them it is common to be generated as human being, with gender, time and place of birth, time and place of death, questions of nation etc.

For an opera singer a WikidataScheme with a minimum set could look as follows in user language (consider French or Hebrew).

Opernsänger – Ein neues Datenobjekt erstellen

Opernsänger
Typ Beschreibung Status
P31 ist ein(e) Q5 Mensch erforderlich
P21 Geschlecht erforderlich
P734 Familienname erforderlich
P735 Vorname vorgeschlagen
P1787 Künstlername optional
P1477 Geburtsname optional
P569 Geburtsdatum vorgeschlagen
P19 Geburtsort vorgeschlagen
P570 Sterbedatum vorgeschlagen
P20 Sterbeort vorgeschlagen
P106 Tätigkeit erforderlich
P412 Stimmlage erforderlich
P136 Genre vorgeschlagen
P1303 Instrument erforderlich

Opernsänger – JSON

That has been spezified by the following JSON code:

{ "@generated": "2026-10-26T00:44:30+01:00",
  "@format": "WikidataScheme 2019-12-16",
  "caption": "Q2865819",
  "claims": [
    { "subject": "instance",
      "state":   "required",
      "values":  [
                   {
        "q": "human"
                   }
                 ]
    },
    { "subject": "gender",
      "state":   "required",
      "values":  [
                   {
        "qlist": [ "female",
                   "male",
                   true ]
                   }
                 ]
    },
    { "subject": "nameFamily",
      "state":   "required"
    },
    { "subject": "nameGiven",
      "state":   "suggested"
    },
    { "subject": "nameArtist",
      "state":   "optional"
    },
    { "subject": "nameBirth",
      "state":   "optional"
    },
    { "subject": "birthDate",
      "state":   "suggested"
    },
    { "subject": "birthPlace",
      "state":   "suggested"
    },
    { "subject": "deathDate",
      "state":   "suggested"
    },
    { "subject": "deathPlace",
      "state":   "suggested"
    },
    { "subject": "occupation",
      "state":   "required",
      "values":  [
                   {
        "qlist": [ "singerOpera",
                   "actorStage",
                   "actorMovie",
                   "singer",
                   true ]
                   }
                 ]
    },
    { "subject": "voicetype",
      "state":   "required",
      "values":  [
                   {
        "qlist": [ "soprano",
                   "mezzosoprano",
                   "contralto",
                   "countertenor",
                   "tenor",
                   "baritone",
                   "bass",
                   "falsetto",
                   true ]
                   }
                 ]
    },
    { "subject": "genre",
      "state":   "suggested",
      "values":  [
                   {
        "qlist": [ "opera",
                   "operetta",
                   "musical",
                   true ]
                   }
                 ]
    },
    { "subject": "instrument",
      "state":   "required",
      "values":  [
                   {
        "qlist": [ "instrumentVoice",
                   "instrumentPiano",
                   true ]
                   }
                 ]
    }
            ],
  "resolve": { "actorMovie":       { "Q": 10800557 },
               "actorStage":       { "Q": 2259451 },
               "baritone":         { "Q": 31687 },
               "bass":             { "Q": 27911 },
               "birthDate":        { "P": 569 },
               "birthPlace":       { "P": 19 },
               "contralto":        { "Q": 37137 },
               "countertenor":     { "Q": 223166 },
               "deathDate":        { "P": 570 },
               "deathPlace":       { "P": 20 },
               "falsetto":         { "Q": 193935 },
               "female":           { "Q": 6581072 },
               "gender":           { "P": 21 },
               "genre":            { "P": 136 },
               "human":            { "Q": 5 },
               "instance":         { "P": 31 },
               "instrument":       { "P": 1303 },
               "instrumentPiano":  { "Q": 5994 },
               "instrumentVoice":  { "Q": 17172850 },
               "male":             { "Q": 6581097 },
               "mezzosoprano":     { "Q": 186506 },
               "musical":          { "Q": 2743 },
               "nameArtist":       { "P": 1787 },
               "nameBirth":        { "P": 1477 },
               "nameFamily":       { "P": 734 },
               "nameGiven":        { "P": 735 },
               "occupation":       { "P": 106 },
               "opera":            { "Q": 1344 },
               "operetta":         { "Q": 170384 },
               "singer":           { "Q": 177220 },
               "singerOpera":      { "Q": 2865819 },
               "soprano":          { "Q": 30903 },
               "tenor":            { "Q": 27914 },
               "voicetype":        { "P": 412 }
           }
}

Example: GlobalSharing/Registration

A “something”, especially a software unit or a project page, may be advertised to all projects by GlobalSharing. An item is needed that describes software etc. by some key information. Then all registered objects may be evaluated and searched for certain properties.