Hi! I see that when I use the Java API to add a Statement with a Property pointing to an Item, but the Item has been merged:
org.wikidata.wdtk.wikibaseapi.apierrors.MediaWikiApiErrorException: [modification-failed] [[Item:Q1040|Q1040]] not found at org.wikidata.wdtk.wikibaseapi.apierrors.MediaWikiApiErrorHandler.throwMediaWikiApiErrorException(MediaWikiAp iErrorHandler.java:62)
Is there a way to put in Items such that Wikibase would point them to the merge target? Or, do I need to use the API to find out the merge target so I could use that instead?
Thanks! Cheers Miguel
On Sat, May 6, 2017 at 6:57 AM, Miguel Paraz mparaz@gmail.com wrote:
Hi! I see that when I use the Java API to add a Statement with a Property pointing to an Item, but the Item has been merged:
org.wikidata.wdtk.wikibaseapi.apierrors.MediaWikiApiErrorException: [modification-failed] [[Item:Q1040|Q1040]] not found at org.wikidata.wdtk.wikibaseapi.apierrors.MediaWikiApiErrorHandler.throwMediaWikiApiErrorException(MediaWikiAp iErrorHandler.java:62)
Is there a way to put in Items such that Wikibase would point them to the merge target? Or, do I need to use the API to find out the merge target so I could use that instead?
Thanks! Cheers Miguel
Hi Miguel,
You are using the Wikidata Toolkit? I am CC'ing Markus to see if he can answer your question.
Cheers Lydia
Hi Lydia! Thanks! Yes this is the Wikipedia Toolkit, though I think this is a problem on the server side and not in the Toolkit.
Cheers Miguel
On Wed, 10 May 2017 at 20:36 Lydia Pintscher lydia.pintscher@wikimedia.de wrote:
On Sat, May 6, 2017 at 6:57 AM, Miguel Paraz mparaz@gmail.com wrote:
Hi! I see that when I use the Java API to add a Statement with a Property pointing to an Item, but the Item has been merged:
org.wikidata.wdtk.wikibaseapi.apierrors.MediaWikiApiErrorException: [modification-failed] [[Item:Q1040|Q1040]] not found at
org.wikidata.wdtk.wikibaseapi.apierrors.MediaWikiApiErrorHandler.throwMediaWikiApiErrorException(MediaWikiAp
iErrorHandler.java:62)
Is there a way to put in Items such that Wikibase would point them to the merge target? Or, do I need to use the API to find out the merge target so I could use that instead?
Thanks! Cheers Miguel
Hi Miguel,
You are using the Wikidata Toolkit? I am CC'ing Markus to see if he can answer your question.
Cheers Lydia
-- Lydia Pintscher - http://about.me/lydia.pintscher Product Manager for Wikidata
Wikimedia Deutschland e.V. Tempelhofer Ufer 23-24 10963 Berlin www.wikimedia.de
Wikimedia Deutschland - Gesellschaft zur Förderung Freien Wissens e. V.
Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg unter der Nummer 23855 Nz. Als gemeinnützig anerkannt durch das Finanzamt für Körperschaften I Berlin, Steuernummer 27/029/42207.
Wikidata-tech mailing list Wikidata-tech@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-tech
Am 10.05.2017 um 12:57 schrieb Miguel Paraz:
Hi Lydia! Thanks! Yes this is the Wikipedia Toolkit, though I think this is a problem on the server side and not in the Toolkit.
What server side? As far as I know, WDT doesn't use the Wikidata server, just the dumps. Or can it access the API directly, now? I have not looked at it in a while.
The problem may be that WDToolkit does not consider redirects, because they are not in the Wikidata JSON dump. We have been considering providing them in a separate dump, but this has not happened yet, see https://phabricator.wikimedia.org/T98320.
In our own RDF mapping (which is similar to, but different from, the WDT mapping), redirects are represented by owl:sameAs. Sadly, this does not mean that the query service (or rather, BlazeGraph) resolves them transparently.
Le 10 mai 2017 à 18:28, Daniel Kinzler daniel.kinzler@wikimedia.de a écrit :
Am 10.05.2017 um 12:57 schrieb Miguel Paraz:
Hi Lydia! Thanks! Yes this is the Wikipedia Toolkit, though I think this is a problem on the server side and not in the Toolkit.
What server side? As far as I know, WDT doesn't use the Wikidata server, just the dumps. Or can it access the API directly, now? I have not looked at it in a while.
WDT provides a small API client: https://github.com/Wikidata/Wikidata-Toolkit/tree/master/wdtk-wikibaseapi/sr...
The problem may be that WDToolkit does not consider redirects, because they are not in the Wikidata JSON dump. We have been considering providing them in a separate dump, but this has not happened yet, see https://phabricator.wikimedia.org/T98320.
Yes, it's probably that. There is a workaround for reading daily MediaWiki dumps but it has not been implemented in the API client.
In our own RDF mapping (which is similar to, but different from, the WDT mapping), redirects are represented by owl:sameAs. Sadly, this does not mean that the query service (or rather, BlazeGraph) resolves them transparently.
-- Daniel Kinzler Principal Platform Engineer
Wikimedia Deutschland Gesellschaft zur Förderung Freien Wissens e.V.
Wikidata-tech mailing list Wikidata-tech@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-tech
What server side? As far as I know, WDT doesn't use the Wikidata server, just the dumps. Or can it access the API directly, now? I have not looked at it in a while.
WDT provides a small API client: https://github.com/Wikidata/Wikidata-Toolkit/tree/master/wdtk-wikibaseapi/sr...
The problem may be that WDToolkit does not consider redirects, because they are not in the Wikidata JSON dump. We have been considering providing them in a separate dump, but this has not happened yet, see https://phabricator.wikimedia.org/T98320.
Yes, it's probably that. There is a workaround for reading daily MediaWiki dumps but it has not been implemented in the API client.
Thomas
Le 10 mai 2017 à 18:28, Daniel Kinzler daniel.kinzler@wikimedia.de a écrit :
Am 10.05.2017 um 12:57 schrieb Miguel Paraz:
Hi Lydia! Thanks! Yes this is the Wikipedia Toolkit, though I think this is a problem on the server side and not in the Toolkit.
What server side? As far as I know, WDT doesn't use the Wikidata server, just the dumps. Or can it access the API directly, now? I have not looked at it in a while.
The problem may be that WDToolkit does not consider redirects, because they are not in the Wikidata JSON dump. We have been considering providing them in a separate dump, but this has not happened yet, see https://phabricator.wikimedia.org/T98320.
In our own RDF mapping (which is similar to, but different from, the WDT mapping), redirects are represented by owl:sameAs. Sadly, this does not mean that the query service (or rather, BlazeGraph) resolves them transparently.
-- Daniel Kinzler Principal Platform Engineer
Wikimedia Deutschland Gesellschaft zur Förderung Freien Wissens e.V.
Wikidata-tech mailing list Wikidata-tech@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-tech
Hi,
On Thu, 11 May 2017 at 04:54 Thomas PT thomaspt@hotmail.fr wrote:
What server side? As far as I know, WDT doesn't use the Wikidata server,
just
the dumps. Or can it access the API directly, now? I have not looked at
it in a
while.
WDT provides a small API client: https://github.com/Wikidata/Wikidata-Toolkit/tree/master/wdtk-wikibaseapi/sr...
Yes, I'm using this API client for my project. I based my code on the Wikidata-Toolkit-Examples: EditOnlineDataExample and FetchOnlineDataExample.
Are pull requests on GitHub being considered? I needed to use wbsearchentities so I manually merged in: https://github.com/Wikidata/Wikidata-Toolkit/pull/229
Cheers Miguel
wikidata-tech@lists.wikimedia.org