Modul:Wikidata utilities: Unterschied zwischen den Versionen
keine Bearbeitungszusammenfassung
(+ function fw.getValuesWithQualifiers( entity, p, qualifiers, count )) |
Keine Bearbeitungszusammenfassung |
||
Zeile 179: | Zeile 179: | ||
elseif t == 'globecoordinate' then v = v.latitude .. ',' .. v.longitude | elseif t == 'globecoordinate' then v = v.latitude .. ',' .. v.longitude | ||
elseif t == 'quantity' then v = v.amount .. ',' .. v.unit | elseif t == 'quantity' then v = v.amount .. ',' .. v.unit | ||
elseif t == 'monolingualtext' then v = v.text .. ',' .. v.language | |||
end | end | ||
end | end | ||
Zeile 195: | Zeile 196: | ||
local array, key, value, i, j | local array, key, value, i, j | ||
for i = 1, #statements, 1 do | for i = 1, #statements, 1 do | ||
array = { | array = { value = statements[i].mainsnak.datavalue.value, | ||
['value-type'] = statements[i].mainsnak.datavalue.type } | |||
if statements[i].qualifiers then | if statements[i].qualifiers then | ||
if not qualifiers then -- all qualifier properties | if not qualifiers then -- all qualifier properties |