/** @see WFSServiceInfo#getVersion() */ public String getVersion() { return capabilities.getVersion(); } }
@Override public void setCapabilities(WFSGetCapabilities capabilities) { WFSCapabilitiesType caps = (WFSCapabilitiesType) capabilities.getParsedCapabilities(); this.capabilities = caps; String version = caps.getVersion(); try { this.serviceVersion = Versions.find(version); } catch (IllegalArgumentException e) { LOGGER.warning( "Capabilities document didn't advertise a supported version (" + version + "). Defaulting to " + this.serviceVersion); } typeInfos.clear(); FeatureTypeListType featureTypeList = this.capabilities.getFeatureTypeList(); if (featureTypeList == null || featureTypeList.getFeatureType().isEmpty()) { Loggers.MODULE.info( "WFS Server contains no FeatureTypes: " + getOperationURI(GET_CAPABILITIES, GET)); return; } @SuppressWarnings("unchecked") List<FeatureTypeType> featureTypes = featureTypeList.getFeatureType(); for (FeatureTypeType typeInfo : featureTypes) { FeatureTypeType transTypeInfo = translateTypeInfo(typeInfo); QName name = transTypeInfo.getName(); typeInfos.put(name, transTypeInfo); } }
/** @see WFSServiceInfo#getVersion() */ public String getVersion() { return capabilities.getVersion(); } }
@Override public void setCapabilities(WFSGetCapabilities capabilities) { WFSCapabilitiesType caps = (WFSCapabilitiesType) capabilities.getParsedCapabilities(); this.capabilities = caps; String version = caps.getVersion(); try { this.serviceVersion = Versions.find(version); } catch (IllegalArgumentException e) { LOGGER.warning( "Capabilities document didn't advertise a supported version (" + version + "). Defaulting to " + this.serviceVersion); } typeInfos.clear(); FeatureTypeListType featureTypeList = this.capabilities.getFeatureTypeList(); if (featureTypeList == null || featureTypeList.getFeatureType().isEmpty()) { Loggers.MODULE.info( "WFS Server contains no FeatureTypes: " + getOperationURI(GET_CAPABILITIES, GET)); return; } @SuppressWarnings("unchecked") List<FeatureTypeType> featureTypes = featureTypeList.getFeatureType(); for (FeatureTypeType typeInfo : featureTypes) { FeatureTypeType transTypeInfo = translateTypeInfo(typeInfo); QName name = transTypeInfo.getName(); typeInfos.put(name, transTypeInfo); } }