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.
- Naturally, there is the special page d:Special:NewItem available at Wikidata.
- Anyway, it is cumbersome to create and fill the fields:
- Which statements are to be made? Which sequence is common?
- What is the exact name of the properties, which P-numbers are assigned?
- Often there are items to choose, what has been the Q-number? How is it called exactly, do not mix with similar ones?
- Which qualifiers are to append?
- Every statement, every value does need a single publishing action.
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.
- As initial stage that is just listed by P- and Q-numbers.
- Later a gadget might be developed, which could be started in context of any Wiki and should create an individual form, which should support interactive work effectively and permits storing by one single action.
The methods may be used to complete existing items as well, when certain properties and values shall be added.
Example: opera singer
[Quelltext bearbeiten]Items for some kind of musicians shall be generated manually.
- Some users like objects for opera singers.
- Others need members of rock bands etc.
- Moreover some composers within a certain era shall be established.
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.
- Depending on type of music special information is needed: voice type of an opera singer, instrument and band membership for rock & pop, era and genre for classical composer.
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
[Quelltext bearbeiten]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
[Quelltext bearbeiten]That has been spezified by the following JSON code:
{ "@generated": "2024-11-26T02:01:55+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
[Quelltext bearbeiten]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.
- This example is extending structure by qualifiers.
- Multilingual text elements are used.
- JSON code can be found here.