Thanks for your explanation. As for the property type (“datatype”) / value type (“type”),
I will make the assumption that one property type will corresponds to one value type,
while one value type can be applied to different property types. Hope I didn’t make any
[mailto:firstname.lastname@example.org] On Behalf Of Jeroen De Dauw
Sent: Thursday, October 12, 2017 12:10 PM
To: Wikidata technical discussion <wikidata-tech(a)lists.wikimedia.org>
Subject: Re: [Wikidata-tech] Some questions on Wikibase API
Is "altitude" attribute in
"globe-coordinate" property type still in use?
It is not in use and never really was. (Code indicating it is not in use:
I'm not entirely sure why it is still in the API output and what the plans with it
are, but my guess is that it is still there for compatibility reasons and that there is no
intention of using this key in the future. If I where creating an API client I'd just
ignore this key.
Currently the “type” (in “datavalue” node) and
“datatype” attributes seems somewhat duplicate, are you planning to make it possible for
one “datatype” to support some other “type”s, to some extent similar to polymorphism?
The "type" key is part of the "datavalue" map, and indicates the type
of the DataValue. The DataValues are what is used to represent all values. The
"datatype" key is the type of the property. This latter type always has
corresponding DataValue, but many property types can have the same DataValue. The property
type can add restrictions on what the value can be. So you can have a "number
DataValue" used by both a "number property type" and a "percentage
property type", where the percentage one limits the allowed values to [0, 100].
Hopefully there is some user-facing documentation on this somewhere.
Jeroen De Dauw | https://entropywins.wtf
Software craftsmanship advocate | Developer at Wikimedia Germany
On 12 October 2017 at 04:08, CXY <forest93(a)163.com <mailto:email@example.com> >
I'm currently working on a .NET implementation of Wikibase API client, and have some
(perhaps somewhat trivial) questions
Take the API response for wbgetentities on Q513
for example. In the response, we have a claim
1. Is "altitude" attribute in "globe-coordinate" property type
still in use? I saw this attribute in the API responses, but as far as I can observe, they
are always null. Is this attribute either reserved for future use or obsoleted? (I’ve
opened T177269 <https://phabricator.wikimedia.org/T177269> but later thought that
maybe mail list is more appropriate for this.)
2. Currently the “type” (in “datavalue” node) and “datatype” attributes seems somewhat
duplicate, are you planning to make it possible for one “datatype” to support some other
“type”s, to some extent similar to polymorphism?
Wikidata-tech mailing list