mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
* Cherry-Picked NPE fix from master (#4569) * Fix notification bug #4547 (#4570) * Make Single Query for Nearby and WLM pins (#4573) * Merge nearby and monument queries * Bug Fix- query resource path change on shouldQueryForMonuments * Bug Fixes 1. Propagate exceptions for nearby API calls to caller 2. Fix too much work on main thread exception in NearbyParentFragment * Modify parameters for Nearby query * Bug fix- current location marker (#4580) * Move WLM template below geolocation template (#4582) * Modify string for WLM upload notice * Fix bug #4583 (#4591) * Fix bug #4585 by updating kotlin and acra version (#4592) * Fixes #4554 - only use WLM2021 template for countries that are included in it (#4574) * Fixes #4554 1. For WLM uploads reverse geo code and see if the country code is supported -only then is the WLM upload flow triggered, otherwise usual nearby uploads happen 2. Bug Fix - Current Location marker and area * Fixed compile error added after rebasing * Bug fix for country code in reverse geo code * Update WLM camaign dates [Do not merge now, merge only after alpha release] (#4584) * Updates dates for WML campaign * Bug fix- campaign dates * Fixed logic for WLM enablement - stick to the month of September * Add countries supported by WLM2021 template, except Italy * Versioning for v3.1.0 * Update changelog.md * Fix empty default lang bug (#4608) * Fix bug #4583 * Fix empty default lang bug * Fixes #4595 - Updated nearby query (#4622) * Fixes #4595 - Updated nearby query * Removed logic to replace local language in nearby query - that might acccidentally replace other strings * Fetch property location in usual nearby query * Remove duplicate line (#4626) * Change "learn more" link to new wiki * Add Sweden's P3426 to property filter * Fixes #4601 - 1. Handle possible exceptions in upload file from stash 2. Modify MWException, as error is nullable, update getTitle and getMessage to rever that (#4627) * Versioning for v3.1.1 * Update changelog.md * Updated DB version to rever integrity Co-authored-by: Madhur Gupta <30932899+madhurgupta10@users.noreply.github.com> Co-authored-by: Josephine Lim <josephinelim86@gmail.com>
56 lines
No EOL
2.5 KiB
SPARQL
56 lines
No EOL
2.5 KiB
SPARQL
SELECT
|
|
?item
|
|
(SAMPLE(?location) as ?location)
|
|
(SAMPLE(?label) AS ?label)
|
|
(SAMPLE(?description) AS ?description)
|
|
(SAMPLE(?class) AS ?class)
|
|
(SAMPLE(?classLabel) AS ?classLabel)
|
|
(SAMPLE(?pic) AS ?pic)
|
|
(SAMPLE(?destroyed) AS ?destroyed)
|
|
(SAMPLE(?endTime) AS ?endTime)
|
|
(SAMPLE(?wikipediaArticle) AS ?wikipediaArticle)
|
|
(SAMPLE(?commonsArticle) AS ?commonsArticle)
|
|
(SAMPLE(?commonsCategory) AS ?commonsCategory)
|
|
WHERE {
|
|
# Around given location
|
|
SERVICE wikibase:around {
|
|
?item wdt:P625 ?location.
|
|
bd:serviceParam wikibase:center "Point(${LONG} ${LAT})"^^geo:wktLiteral. # Longitude latitude
|
|
bd:serviceParam wikibase:radius "${RAD}". # Radius in kilometers.
|
|
}
|
|
|
|
OPTIONAL {
|
|
?item p:P31/ps:P31 ?class.
|
|
}
|
|
|
|
# Get picture
|
|
OPTIONAL {?item wdt:P18 ?pic}
|
|
|
|
# Get existence
|
|
OPTIONAL {?item wdt:P576 ?destroyed}
|
|
OPTIONAL {?item wdt:P582 ?endTime}
|
|
|
|
# Get Commons category
|
|
OPTIONAL {?item wdt:P373 ?commonsCategory}
|
|
|
|
# Get Wikipedia article
|
|
OPTIONAL {
|
|
?wikipediaArticle schema:about ?item.
|
|
?wikipediaArticle schema:isPartOf <https://${LANG}.wikipedia.org/>.
|
|
}
|
|
|
|
# Get Commons article
|
|
OPTIONAL {
|
|
?commonsArticle schema:about ?item.
|
|
?commonsArticle schema:isPartOf <https://commons.wikimedia.org/>.
|
|
}
|
|
|
|
# Labels and descriptions
|
|
SERVICE wikibase:label {
|
|
bd:serviceParam wikibase:language "${LANG},en,fr,de,es,ja,ru,it,zh,pt,ar,fa,pl,nl,id,uk,he,sv,cs,ko,vi,ca,no,fi,hu,tr,th,hi,bn,ceb,ro,sw,kk,da,eo,sr,lt,sk,bg,sl,eu,et,hr,ms,el,arz,ur,ta,te,nn,gl,az,af,bs,be,ml,ka,is,sq,uz,la,br,mk,lv,azb,mr,sh,tl,cy,ckb,ast,be-tarask,zh-yue,hy,pa,as,my,kn,ne,si,tt,ha,war,zh-min-nan,vo,min,lmo,ht,lb,gu,tg,sco,ku,new,bpy,nds,io,pms,su,oc,jv,nap,ba,scn,wa,bar,an,ksh,szl,fy,frr,als,ia,ga,yi,mg,gd,vec,ce,sa,mai,xmf,sd,wuu,mrj,mhr,km,roa-tara,am,roa-rup,map-bms,bh,mnw,shn,bcl,co,cv,dv,nds-nl,fo,hif,fur,gan,glk,hak,ilo,pam,csb,avk,lij,li,gv,mi,mt,nah,nrm,se,nov,qu,os,pi,pag,ps,pdc,rm,bat-smg,sc,to,tk,hsb,fiu-vro,vls,yo,diq,zh-classical,frp,lad,kw,mn,haw,ang,ln,ie,wo,tpi,ty,crh,nv,jbo,ay,pcd,zea,eml,ky,ig,or,cbk-zam,kg,arc,rmy,ab,gn,so,kab,ug,stq,udm,ext,mzn,pap,cu,sah,tet,sn,lo,pnb,iu,na,got,bo,dsb,chr,cdo,om,sm,ee,ti,av,bm,zu,pnt,cr,pih,ss,ve,bi,rw,ch,xh,kl,ik,bug,dz,ts,tn,kv,tum,xal,st,tw,bxr,ak,ny,fj,lbe,za,ks,ff,lg,sg,rn,chy,mwl,lez,bjn,gom,tyv,vep,nso,kbd,ltg,rue,pfl,gag,koi,krc,ace,olo,kaa,mdf,myv,srn,ady,jam,tcy,dty,atj,kbp,din,lfn,gor,inh,sat,hyw,nqo,ban,szy,awa,ary,lld,smn,skr,mad,dag,shi,nia,ki,gcr".
|
|
?item rdfs:label ?label.
|
|
?item schema:description ?description.
|
|
?class rdfs:label ?classLabel.
|
|
}
|
|
}
|
|
GROUP BY ?item |