Fixes 4539 : When Wikidata has no description showing instance_of's label as a description (#4799)

* Showing instance_of's name as a description

* Indentation fixed

* DepictsClient Test added
This commit is contained in:
Ayan Sarkar 2022-02-16 10:49:27 +05:30 committed by GitHub
parent c2bc5b4f23
commit 27e3f20ba2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 101 additions and 8 deletions

View file

@ -78,6 +78,11 @@ public class Entities extends MwResponse implements PostProcessingTypeAdapter.Po
@Nullable private String language;
@Nullable private String value;
public Label(@Nullable final String language, @Nullable final String value) {
this.language = language;
this.value = value;
}
@NonNull public String language() {
return StringUtils.defaultString(language);
}