mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Convert Caption to kotlin
This commit is contained in:
parent
66395b9871
commit
afd12549ce
2 changed files with 19 additions and 43 deletions
|
|
@ -1,43 +0,0 @@
|
||||||
package fr.free.nrw.commons.media;
|
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Model class for parsing Captions when fetching captions using filename in MediaClient
|
|
||||||
*/
|
|
||||||
public class Caption {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* users language in which caption is written
|
|
||||||
*/
|
|
||||||
@SerializedName("language")
|
|
||||||
private String language;
|
|
||||||
@SerializedName("value")
|
|
||||||
private String value;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* No args constructor for use in serialization
|
|
||||||
*/
|
|
||||||
public Caption() {
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param value
|
|
||||||
* @param language
|
|
||||||
*/
|
|
||||||
public Caption(String language, String value) {
|
|
||||||
super();
|
|
||||||
this.language = language;
|
|
||||||
this.value = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
@SerializedName("language")
|
|
||||||
public String getLanguage() {
|
|
||||||
return language;
|
|
||||||
}
|
|
||||||
|
|
||||||
@SerializedName("value")
|
|
||||||
public String getValue() {
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
19
app/src/main/java/fr/free/nrw/commons/media/Caption.kt
Normal file
19
app/src/main/java/fr/free/nrw/commons/media/Caption.kt
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
package fr.free.nrw.commons.media
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model class for parsing Captions when fetching captions using filename in MediaClient
|
||||||
|
*/
|
||||||
|
class Caption() {
|
||||||
|
@SerializedName("language")
|
||||||
|
var language: String? = null
|
||||||
|
|
||||||
|
@SerializedName("value")
|
||||||
|
var value: String? = null
|
||||||
|
|
||||||
|
constructor(language: String?, value: String?) : this() {
|
||||||
|
this.language = language
|
||||||
|
this.value = value
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue