public String getVersion() { WMSInfo serviceInfo = getServiceInfo(); List<Version> versions = serviceInfo.getVersions(); String version; if (versions.size() > 0) { version = versions.get(0).toString(); } else { // shouldn't a version be set? version = "1.1.1"; } return version; }
@Override protected WMSInfo initialize(WMSInfo service) { super.initialize(service); final Version version_1_1_1 = WMS.VERSION_1_1_1; final Version version_1_3_0 = WMS.VERSION_1_3_0; if (!service.getVersions().contains(version_1_1_1)) { service.getVersions().add(version_1_1_1); } if (!service.getVersions().contains(version_1_3_0)) { service.getVersions().add(version_1_3_0); } if (service.getSRS() == null) { ((WMSInfoImpl) service).setSRS(new ArrayList<String>()); } if (service.getGetFeatureInfoMimeTypes() == null) { ((WMSInfoImpl) service).setGetFeatureInfoMimeTypes(new HashSet<String>()); } if (service.getGetMapMimeTypes() == null) { ((WMSInfoImpl) service).setGetMapMimeTypes(new HashSet<String>()); } if (service.getInterpolation() == null) { service.setInterpolation(WMSInterpolation.Nearest); } return service; }
properties.put("accessConstraints", wmsInfo.getAccessConstraints()); properties.put("fees", wmsInfo.getFees()); properties.put("versions", wmsInfo.getVersions()); properties.put("keywords", wmsInfo.getKeywords()); properties.put("metadataLink", wmsInfo.getMetadataLink());