diff --git a/app/src/main/java/fr/free/nrw/commons/nearby/Place.java b/app/src/main/java/fr/free/nrw/commons/nearby/Place.java index 402399a24..cff2ed4de 100644 --- a/app/src/main/java/fr/free/nrw/commons/nearby/Place.java +++ b/app/src/main/java/fr/free/nrw/commons/nearby/Place.java @@ -154,7 +154,8 @@ public class Place implements Parcelable { item.getPic().getValue(), // Checking if the place exists or not (item.getDestroyed().getValue() == "") && (item.getEndTime().getValue() == "") - && (item.getDateOfOfficialClosure().getValue() == ""), + && (item.getDateOfOfficialClosure().getValue() == "") + && (item.getPointInTime().getValue()==""), entityId); } diff --git a/app/src/main/java/fr/free/nrw/commons/nearby/model/NearbyResultItem.kt b/app/src/main/java/fr/free/nrw/commons/nearby/model/NearbyResultItem.kt index a6227a145..c39d8901d 100644 --- a/app/src/main/java/fr/free/nrw/commons/nearby/model/NearbyResultItem.kt +++ b/app/src/main/java/fr/free/nrw/commons/nearby/model/NearbyResultItem.kt @@ -19,6 +19,7 @@ class NearbyResultItem( @field:SerializedName("endTime") private val endTime: ResultTuple?, @field:SerializedName("monument") private val monument: ResultTuple?, @field:SerializedName("dateOfOfficialClosure") private val dateOfOfficialClosure: ResultTuple?, + @field:SerializedName("pointInTime") private val pointInTime: ResultTuple?, ) { fun getItem(): ResultTuple = item ?: ResultTuple() @@ -52,4 +53,6 @@ class NearbyResultItem( fun getMonument(): ResultTuple? = monument + fun getPointInTime(): ResultTuple = pointInTime ?: ResultTuple() + } diff --git a/app/src/main/resources/queries/query_for_item.rq b/app/src/main/resources/queries/query_for_item.rq index edcb29ddf..2957b9b5b 100644 --- a/app/src/main/resources/queries/query_for_item.rq +++ b/app/src/main/resources/queries/query_for_item.rq @@ -11,6 +11,7 @@ SELECT (SAMPLE(?commonsArticle) AS ?commonsArticle) (SAMPLE(?commonsCategory) AS ?commonsCategory) (SAMPLE(?dateOfOfficialClosure) AS ?dateOfOfficialClosure) + (SAMPLE(?pointInTime) AS ?pointInTime) WHERE { SERVICE { values ?item { @@ -47,6 +48,7 @@ WHERE { OPTIONAL {?item wdt:P576 ?destroyed} OPTIONAL {?item wdt:P582 ?endTime} OPTIONAL {?item wdt:P3999 ?dateOfOfficialClosure} + OPTIONAL {?item wdt:P585 ?pointInTime} # Get Commons category OPTIONAL {?item wdt:P373 ?commonsCategory}