Ignore:
Timestamp:
2020-11-21T14:33:36+01:00 (3 years ago)
Author:
stoecker
Message:

special handling for recent ELI WMS_URL switches

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/scripts/SyncEditorLayerIndex.java

    r17301 r17328  
    539539    }
    540540
     541    // catch reordered arguments and switches to WMS version 1.3.0
     542    String unifyWMS(String url) {
     543        String x[] = url.replaceAll("(?i)VERSION=[0-9.]+", "VERSION=x").replaceAll("(?i)SRS=", "CRS=").split("\\?");
     544        String a[] = x[1].split("&");
     545        Arrays.sort(a);
     546        url = x[0]+"?"+String.join("&",a);
     547        return url;
     548    }
     549
    541550    void checkInOneButNotTheOther() {
    542551        List<String> le = new LinkedList<>(eliUrls.keySet());
     
    570579
    571580                        if (ide.equals(idj) && Objects.equals(getType(j), getType(e))) {
    572                             myprintln("* URL for id "+idj+" differs ("+urle+"): "+getDescription(j));
     581                            if(getType(j).equals("wms") && unifyWMS(urle).equals(unifyWMS(urlj))) {
     582                              myprintln("# WMS-URL for id "+idj+" modified: "+getDescription(j));
     583                            } else {
     584                              myprintln("* URL for id "+idj+" differs ("+urle+"): "+getDescription(j));
     585                            }
    573586                            le.remove(urle);
    574587                            lj.remove(urlj);
Note: See TracChangeset for help on using the changeset viewer.