Index: /trunk/resources/data/maps.xsd
===================================================================
--- /trunk/resources/data/maps.xsd (revision 16126)
+++ /trunk/resources/data/maps.xsd (revision 16127)
@@ -665,4 +665,6 @@
+
+
Index: /trunk/scripts/SyncEditorLayerIndex.java
===================================================================
--- /trunk/scripts/SyncEditorLayerIndex.java (revision 16126)
+++ /trunk/scripts/SyncEditorLayerIndex.java (revision 16127)
@@ -442,4 +442,6 @@
if (isNotBlank(t = getPermissionReferenceUrl(e)))
stream.write(" "+cdata(t)+"\n");
+ if (isNotBlank(t = getPrivacyPolicyUrl(e)))
+ stream.write(" "+cdata(t)+"\n");
if ((getValidGeoreference(e)))
stream.write(" true\n");
@@ -757,4 +759,5 @@
compareDescriptions(e, j);
+ comparePrivacyPolicyUrls(e, j);
comparePermissionReferenceUrls(e, j);
compareAttributionUrls(e, j);
@@ -777,4 +780,18 @@
} else if (!optionNoEli) {
myprintln("+ Missing ELI description ('"+jt+"'): "+getDescription(j));
+ }
+ }
+ }
+
+ void comparePrivacyPolicyUrls(JsonObject e, ImageryInfo j) {
+ String et = getPrivacyPolicyUrl(e);
+ String jt = getPrivacyPolicyUrl(j);
+ if (!Objects.equals(et, jt)) {
+ if (isBlank(jt)) {
+ myprintln("- Missing JOSM privacy policy URL ("+et+"): "+getDescription(j));
+ } else if (isNotBlank(et)) {
+ myprintln("+ Privacy policy URL differs ('"+et+"' != '"+jt+"'): "+getDescription(j));
+ } else if (!optionNoEli) {
+ myprintln("+ Missing ELI privacy policy URL ('"+jt+"'): "+getDescription(j));
}
}
@@ -1449,4 +1466,9 @@
}
+ static String getPrivacyPolicyUrl(Object e) {
+ if (e instanceof ImageryInfo) return ((ImageryInfo) e).getPrivacyPolicyURL();
+ return ((Map) e).get("properties").getString("privacy_policy_url", null);
+ }
+
static Map> getNoTileHeader(Object e) {
if (e instanceof ImageryInfo) return ((ImageryInfo) e).getNoTileHeaders();
Index: /trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java (revision 16126)
+++ /trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java (revision 16127)
@@ -260,4 +260,6 @@
/** Text of a text attribution displayed when using the imagery */
private String attributionText;
+ /** Link to the privacy policy of the operator */
+ private String privacyPolicyURL;
/** Link to a reference stating the permission for OSM usage */
private String permissionReferenceURL;
@@ -828,4 +830,14 @@
}
+ /**
+ * Return the privacy policy URL.
+ * @return The url
+ * @see #setPrivacyPolicyURL
+ * @since 16127
+ */
+ public String getPrivacyPolicyURL() {
+ return privacyPolicyURL;
+ }
+
@Override
public Image getAttributionImage() {
@@ -905,4 +917,14 @@
public void setPermissionReferenceURL(String url) {
permissionReferenceURL = url;
+ }
+
+ /**
+ * Sets the privacy policy URL.
+ * @param url The url.
+ * @see #getPrivacyPolicyURL()
+ * @since 16127
+ */
+ public void setPrivacyPolicyURL(String url) {
+ privacyPolicyURL = url;
}
Index: /trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java (revision 16126)
+++ /trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java (revision 16127)
@@ -220,4 +220,5 @@
"terms-of-use-text",
"terms-of-use-url",
+ "privacy-policy-url",
"permission-ref",
"country-code",
@@ -485,4 +486,7 @@
entry.setTermsOfUseText(accumulator.toString());
break;
+ case "privacy-policy-url":
+ entry.setPrivacyPolicyURL(accumulator.toString());
+ break;
case "permission-ref":
entry.setPermissionReferenceURL(accumulator.toString());