Changeset 16127 in josm for trunk/scripts
- Timestamp:
- 2020-03-15T00:03:59+01:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/scripts/SyncEditorLayerIndex.java
r16098 r16127 442 442 if (isNotBlank(t = getPermissionReferenceUrl(e))) 443 443 stream.write(" <permission-ref>"+cdata(t)+"</permission-ref>\n"); 444 if (isNotBlank(t = getPrivacyPolicyUrl(e))) 445 stream.write(" <privacy-policy-url>"+cdata(t)+"</privacy-policy-url>\n"); 444 446 if ((getValidGeoreference(e))) 445 447 stream.write(" <valid-georeference>true</valid-georeference>\n"); … … 757 759 758 760 compareDescriptions(e, j); 761 comparePrivacyPolicyUrls(e, j); 759 762 comparePermissionReferenceUrls(e, j); 760 763 compareAttributionUrls(e, j); … … 777 780 } else if (!optionNoEli) { 778 781 myprintln("+ Missing ELI description ('"+jt+"'): "+getDescription(j)); 782 } 783 } 784 } 785 786 void comparePrivacyPolicyUrls(JsonObject e, ImageryInfo j) { 787 String et = getPrivacyPolicyUrl(e); 788 String jt = getPrivacyPolicyUrl(j); 789 if (!Objects.equals(et, jt)) { 790 if (isBlank(jt)) { 791 myprintln("- Missing JOSM privacy policy URL ("+et+"): "+getDescription(j)); 792 } else if (isNotBlank(et)) { 793 myprintln("+ Privacy policy URL differs ('"+et+"' != '"+jt+"'): "+getDescription(j)); 794 } else if (!optionNoEli) { 795 myprintln("+ Missing ELI privacy policy URL ('"+jt+"'): "+getDescription(j)); 779 796 } 780 797 } … … 1449 1466 } 1450 1467 1468 static String getPrivacyPolicyUrl(Object e) { 1469 if (e instanceof ImageryInfo) return ((ImageryInfo) e).getPrivacyPolicyURL(); 1470 return ((Map<String, JsonObject>) e).get("properties").getString("privacy_policy_url", null); 1471 } 1472 1451 1473 static Map<String, Set<String>> getNoTileHeader(Object e) { 1452 1474 if (e instanceof ImageryInfo) return ((ImageryInfo) e).getNoTileHeaders();
Note:
See TracChangeset
for help on using the changeset viewer.