WikidataScheme – support creation of new Wikidata data objects (items, „Q“) and completion of existing entries.
For certain objects in the (real) world some input which is always or quite often needed shall be presented for easy access. That covers properties, some typical items for this context and qualifiers. Those things should remind to provide all minimal information and are to be displayed in a comprehensible manner.
Presentation is not bound to any human language in particular. The specification is heading for global usage and shall exploit multilingual labels and descriptions already available at Wikidata, completed by extendible multilingual text elements.
The recommended structure of the new data object should be available to gadgets which can exploit the pointers to create an individual form for this object type. That form can be filled first until all constraints are met, then published at once. Currently by universal method a lot of particular fields are to be generated first, then items get selected from a global variety and finally published one by one.
A global community may agree on some mandatory properties and typical items to be offered for certain thematic objects in this field. That suggestion is published independent of human language.
All functions described above can be used by other modules:
locallucky,WikidataScheme=pcall(require,"Module:WikidataScheme")iftype(WikidataScheme)=="table"thenWikidataScheme=WikidataScheme.WikidataScheme()else-- In the event of errors, WikidataScheme is an error message.return"<span class=\"error\">"..WikidataScheme.."</span>"end
Subsequently there are available:
WikidataScheme.fetch( about )
Analyse a specification
about
Specification; either:
string, with JSON code
string, with name of a mw.loadData page
table
returns: Either string, with error message, or table, with validated specification
WikidataScheme.flat( about, adjust, frame )
Generate and format JSON code
about
Specification; either:
string, with JSON code
string, with name of a mw.loadData page
table
adjust
optional boolean
true – symbolic entity names will be resolved
false(default) – symbolic entity names will be kept
frame
optional
frame object, if available
returns: A string, with error message, or JSON code
WikidataScheme.form( about, frame )
Create HTML table
about
Specification; either:
string, with JSON code
string, with name of a mw.loadData page
table
frame
optional
frame object, if available
returns: HTML code as string
WikidataScheme.failsafe( atleast )
Versioning interface
atleast optional nil or minimum version or wikidata or ~ for synchronisation
returns: Version ID as string or false
Usage
Global coordination on creation and completion of Wikidata items.
Pages offering WikidataScheme tables or JSON code.