Changeset 13824 in josm for trunk/src/org/openstreetmap/josm/io
- Timestamp:
- 2018-05-23T21:03:31+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java
r13760 r13824 43 43 */ 44 44 public class WMSImagery { 45 46 45 47 46 private static final String CAPABILITIES_QUERY_STRING = "SERVICE=WMS&REQUEST=GetCapabilities"; … … 120 119 } 121 120 122 private Map<String, String> headers = new ConcurrentHashMap<>();121 private final Map<String, String> headers = new ConcurrentHashMap<>(); 123 122 private String version = "1.1.1"; // default version 124 123 private String getMapUrl; 125 124 private URL capabilitiesUrl; 126 private List<String> formats = new ArrayList<>();125 private final List<String> formats = new ArrayList<>(); 127 126 private List<LayerDetails> layers = new ArrayList<>(); 128 127 … … 283 282 return buildGetMapUrl( 284 283 getLayers(selectedLayers), 285 selectedLayers.stream().map( x -> x.getStyle()).collect(Collectors.toList()),284 selectedLayers.stream().map(DefaultLayer::getStyle).collect(Collectors.toList()), 286 285 transparent); 287 286 } … … 296 295 public String buildGetMapUrl(List<LayerDetails> selectedLayers, List<String> selectedStyles, boolean transparent) { 297 296 return buildGetMapUrl( 298 selectedLayers.stream().map( x -> x.getName()).collect(Collectors.toList()),297 selectedLayers.stream().map(LayerDetails::getName).collect(Collectors.toList()), 299 298 selectedStyles, 300 299 getPreferredFormat(), … … 504 503 */ 505 504 public boolean belowWMS130() { 506 return this.version.equals("1.1.1") || this.version.equals("1.1") || this.version.equals("1.0");505 return "1.1.1".equals(version) || "1.1".equals(version) || "1.0".equals(version); 507 506 } 508 507 … … 569 568 } 570 569 571 private Bounds parseBBox(Projection conv, String miny, String minx, String maxy, String maxx) {570 private static Bounds parseBBox(Projection conv, String miny, String minx, String maxy, String maxx) { 572 571 if (miny == null || minx == null || maxy == null || maxx == null) { 573 572 return null; … … 592 591 } 593 592 594 private String normalizeUrl(String serviceUrlStr) throws MalformedURLException {593 private static String normalizeUrl(String serviceUrlStr) throws MalformedURLException { 595 594 URL getCapabilitiesUrl = null; 596 595 String ret = null; … … 683 682 } 684 683 685 686 684 /** 687 685 * @param defaultLayers default layers that should select layer object … … 689 687 */ 690 688 public List<LayerDetails> getLayers(List<DefaultLayer> defaultLayers) { 691 Collection<String> layerNames = defaultLayers.stream().map( x -> x.getLayerName()).collect(Collectors.toList());689 Collection<String> layerNames = defaultLayers.stream().map(DefaultLayer::getLayerName).collect(Collectors.toList()); 692 690 return layers.stream() 693 691 .flatMap(LayerDetails::flattened)
Note:
See TracChangeset
for help on using the changeset viewer.