Fix p18 issue For an item with P18 item, do not add another one (#3527)

* Add p18value variable to contrib

* set place.pic to candidate contribution

* Add p18 value to contrib

* Passes p18 value to wikidata upload service

* Checks if pic parameter of the wikidata item is empty or not. If not, it does not overrides the existing image, it is just a regular commons upload.

* Make public var private

* Make current tests pass

* Add test case for p18 value is not empty

* Fix wrong log message

* Add nonnul annotation and fix method javadoc
This commit is contained in:
neslihanturan 2020-03-17 12:35:21 +02:00 committed by GitHub
parent bdb61dfda6
commit e5d5a7af92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 40 additions and 10 deletions

View file

@ -68,6 +68,7 @@ public class Contribution extends Media {
public String decimalCoords;
public boolean isMultiple;
public String wikiDataEntityId;
private String p18Value;
public Uri contentProviderUri;
public String dateCreatedSource;
@ -271,6 +272,19 @@ public class Contribution extends Media {
this.wikiDataEntityId = wikiDataEntityId;
}
public String getP18Value() {
return p18Value;
}
/**
* When the corresponding image property of wiki entity is known as in case of nearby uploads,
* it can be set using the setter method
* @param p18Value p18 value, image property of the wikidata item
*/
public void setP18Value(String p18Value) {
this.p18Value = p18Value;
}
public void setContentProviderUri(Uri contentProviderUri) {
this.contentProviderUri = contentProviderUri;
}