diff --git a/app/src/main/resources/queries/query_for_item.rq b/app/src/main/resources/queries/query_for_item.rq index 960b7e984..31e9087e0 100644 --- a/app/src/main/resources/queries/query_for_item.rq +++ b/app/src/main/resources/queries/query_for_item.rq @@ -1,6 +1,7 @@ SELECT ?item (SAMPLE(?label) AS ?label) + (SAMPLE(?class) AS ?class) (SAMPLE(?description) AS ?description) (SAMPLE(?classLabel) AS ?classLabel) (SAMPLE(?pic) AS ?pic) @@ -34,6 +35,9 @@ WHERE { BIND(COALESCE(?classLabelPreferredLanguage, ?classLabelAnyLanguage, "?") as ?classLabel) } + OPTIONAL { + ?item p:P31/ps:P31 ?class. + } # Get picture OPTIONAL {?item wdt:P18 ?pic} diff --git a/app/src/main/resources/queries/rectangle_query_for_nearby.rq b/app/src/main/resources/queries/rectangle_query_for_nearby.rq index 1bf183e31..336b22db7 100644 --- a/app/src/main/resources/queries/rectangle_query_for_nearby.rq +++ b/app/src/main/resources/queries/rectangle_query_for_nearby.rq @@ -1,9 +1,6 @@ SELECT ?item (SAMPLE(?location) as ?location) - (SAMPLE(?class) AS ?class) - (SAMPLE(?destroyed) AS ?destroyed) - (SAMPLE(?endTime) AS ?endTime) WHERE { # Around given location SERVICE wikibase:box { @@ -12,13 +9,5 @@ WHERE { bd:serviceParam wikibase:cornerEast "Point(${LONG_EAST} ${LAT_EAST})"^^geo:wktLiteral. } - OPTIONAL { - ?item p:P31/ps:P31 ?class. - } - - # Get existence - OPTIONAL {?item wdt:P576 ?destroyed} - OPTIONAL {?item wdt:P582 ?endTime} - } GROUP BY ?item \ No newline at end of file diff --git a/app/src/main/resources/queries/rectangle_query_for_nearby_monuments.rq b/app/src/main/resources/queries/rectangle_query_for_nearby_monuments.rq index 0206ee04a..a3dfee57d 100644 --- a/app/src/main/resources/queries/rectangle_query_for_nearby_monuments.rq +++ b/app/src/main/resources/queries/rectangle_query_for_nearby_monuments.rq @@ -1,9 +1,6 @@ SELECT ?item (SAMPLE(?location) as ?location) - (SAMPLE(?class) AS ?class) - (SAMPLE(?destroyed) AS ?destroyed) - (SAMPLE(?endTime) AS ?endTime) (SAMPLE(?monument) AS ?monument) WHERE { # Around given location @@ -13,14 +10,6 @@ WHERE { bd:serviceParam wikibase:cornerEast "Point(${LONG_EAST} ${LAT_EAST})"^^geo:wktLiteral. } - OPTIONAL { - ?item p:P31/ps:P31 ?class. - } - - # Get existence - OPTIONAL {?item wdt:P576 ?destroyed} - OPTIONAL {?item wdt:P582 ?endTime} - # Wiki Loves Monuments OPTIONAL {?item p:P1435 ?monument} OPTIONAL {?item p:P2186 ?monument}