mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-29 05:43:55 +01:00
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:
parent
bdb61dfda6
commit
e5d5a7af92
5 changed files with 40 additions and 10 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue