Class GeoServiceHelper
java.lang.Object
org.tailormap.api.persistence.helper.GeoServiceHelper
-
Constructor Summary
ConstructorsConstructorDescriptionGeoServiceHelper
(TailormapConfig tailormapConfig, FeatureSourceRepository featureSourceRepository) -
Method Summary
Modifier and TypeMethodDescriptionvoid
findAndSaveRelatedWFS
(GeoService geoService) findRelatedWFS
(GeoService geoService) static URI
getLayerLegendUrlFromStyles
(GeoService service, GeoServiceLayer serviceLayer) Try to extract the legend url from the styles of the layer.static String
getWmsRequest
(String uri) static String
getWmsRequest
(URI uri) Extracts the value of the WMS "REQUEST" parameter (case-insensitive) from the given URI.static Service.ServerTypeEnum
void
loadServiceCapabilities
(GeoService geoService)
-
Constructor Details
-
GeoServiceHelper
@Autowired public GeoServiceHelper(TailormapConfig tailormapConfig, FeatureSourceRepository featureSourceRepository)
-
-
Method Details
-
guessServerTypeFromUrl
-
getWmsRequest
-
getWmsRequest
Extracts the value of the WMS "REQUEST" parameter (case-insensitive) from the given URI.- Parameters:
uri
- the URI to extract the request parameter from- Returns:
- the value of the request parameter, or null if not found
-
loadServiceCapabilities
- Throws:
Exception
-
findRelatedWFS
-
findAndSaveRelatedWFS
-
getLayerLegendUrlFromStyles
Try to extract the legend url from the styles of the layer. This works by getting all styles for the layer and then removing any styles attached to other (parent) layers from the list of all styles. What remains is/are the legend url(s) for the layer. NOTE: when a layer has more than one -not an inherited style- style the first style is used.- Parameters:
service
- the service that has the layerserviceLayer
- the layer to get the legend url for- Returns:
- a URI to the legend image or null if not found
-