/** * Creates a new WebMapServer from a WMSCapablitiles document. * * <p>The implementation assumes that the server is located at: * capabilities.getRequest().getGetCapabilities().getGet() * * @param capabilities * @throws IOException * @throws ServiceException */ public WebMapServer(WMSCapabilities capabilities) throws IOException, ServiceException { super(capabilities, capabilities.getRequest().getGetCapabilities().getGet()); }
/** * The source of this WMS is the capabilities document. * * <p>We make an effort here to look in the capabilities document provided for the * unambiguous capabilities URI. This covers the case where the capabilities document has * been cached on disk and we are restoring a WebMapServer instance. */ public URI getSource() { try { URL source = getCapabilities().getRequest().getGetCapabilities().getGet(); return source.toURI(); } catch (NullPointerException huh) { } catch (URISyntaxException e) { } try { return serverURL.toURI(); } catch (URISyntaxException e) { return null; } }
/** * @param capabilities * @throws IOException * @throws ServiceException */ public WebMapTileServer(WMTSCapabilities capabilities) throws ServiceException, IOException { super(capabilities, capabilities.getRequest().getGetCapabilities().getGet()); setType(capabilities.getType()); }
public GetStylesRequest createGetStylesRequest() throws UnsupportedOperationException { if (getCapabilities().getRequest().getGetStyles() == null) { throw new UnsupportedOperationException( "Server does not specify a GetStyles operation. Cannot be performed"); } URL onlineResource = getCapabilities().getRequest().getGetStyles().getGet(); if (onlineResource == null) { onlineResource = serverURL; } GetStylesRequest request = getSpecification().createGetStylesRequest(onlineResource); return request; }
public PutStylesRequest createPutStylesRequest() throws UnsupportedOperationException { if (getCapabilities().getRequest().getPutStyles() == null) { throw new UnsupportedOperationException( "Server does not specify a PutStyles operation. Cannot be performed"); } URL onlineResource = getCapabilities().getRequest().getPutStyles().getGet(); if (onlineResource == null) { onlineResource = serverURL; } PutStylesRequest request = getSpecification().createPutStylesRequest(onlineResource); return request; }
public DescribeLayerRequest createDescribeLayerRequest() throws UnsupportedOperationException { if (getCapabilities().getRequest().getDescribeLayer() == null) { throw new UnsupportedOperationException( "Server does not specify a DescribeLayer operation. Cannot be performed"); } URL onlineResource = getCapabilities().getRequest().getDescribeLayer().getGet(); if (onlineResource == null) { onlineResource = serverURL; } DescribeLayerRequest request = getSpecification().createDescribeLayerRequest(onlineResource); return request; }
public GetLegendGraphicRequest createGetLegendGraphicRequest() throws UnsupportedOperationException { if (getCapabilities().getRequest().getGetLegendGraphic() == null) { throw new UnsupportedOperationException( "Server does not specify a GetLegendGraphic operation. Cannot be performed"); } URL onlineResource = getCapabilities().getRequest().getGetLegendGraphic().getGet(); if (onlineResource == null) { onlineResource = serverURL; } GetLegendGraphicRequest request = getSpecification().createGetLegendGraphicRequest(onlineResource); return request; }
public URI getSource() { try { return capabilities.getGetCapabilities().getGet().toURI(); } catch (URISyntaxException e) { return null; } }
/** * @param capabilities * @throws IOException * @throws ServiceException */ public WebMapTileServer(WMTSCapabilities capabilities) throws ServiceException, IOException { super(capabilities, capabilities.getRequest().getGetCapabilities().getGet()); setType(capabilities.getType()); }
public GetStylesRequest createGetStylesRequest() throws UnsupportedOperationException { if (getCapabilities().getRequest().getGetStyles() == null) { throw new UnsupportedOperationException( "Server does not specify a GetStyles operation. Cannot be performed"); } URL onlineResource = getCapabilities().getRequest().getGetStyles().getGet(); if (onlineResource == null) { onlineResource = serverURL; } GetStylesRequest request = getSpecification().createGetStylesRequest(onlineResource); return request; }
public PutStylesRequest createPutStylesRequest() throws UnsupportedOperationException { if (getCapabilities().getRequest().getPutStyles() == null) { throw new UnsupportedOperationException( "Server does not specify a PutStyles operation. Cannot be performed"); } URL onlineResource = getCapabilities().getRequest().getPutStyles().getGet(); if (onlineResource == null) { onlineResource = serverURL; } PutStylesRequest request = getSpecification().createPutStylesRequest(onlineResource); return request; }
public DescribeLayerRequest createDescribeLayerRequest() throws UnsupportedOperationException { if (getCapabilities().getRequest().getDescribeLayer() == null ) { throw new UnsupportedOperationException("Server does not specify a DescribeLayer operation. Cannot be performed"); } URL onlineResource = getCapabilities().getRequest().getDescribeLayer().getGet(); if (onlineResource == null) { onlineResource = serverURL; } DescribeLayerRequest request = getSpecification().createDescribeLayerRequest(onlineResource); return request; }
public DescribeLayerRequest createDescribeLayerRequest() throws UnsupportedOperationException { if (getCapabilities().getRequest().getDescribeLayer() == null) { throw new UnsupportedOperationException( "Server does not specify a DescribeLayer operation. Cannot be performed"); } URL onlineResource = getCapabilities().getRequest().getDescribeLayer().getGet(); if (onlineResource == null) { onlineResource = serverURL; } DescribeLayerRequest request = getSpecification().createDescribeLayerRequest(onlineResource); return request; }
public GetLegendGraphicRequest createGetLegendGraphicRequest() throws UnsupportedOperationException { if (getCapabilities().getRequest().getGetLegendGraphic() == null) { throw new UnsupportedOperationException("Server does not specify a GetLegendGraphic operation. Cannot be performed"); } URL onlineResource = getCapabilities().getRequest().getGetLegendGraphic().getGet(); if (onlineResource == null) { onlineResource = serverURL; } GetLegendGraphicRequest request = getSpecification().createGetLegendGraphicRequest(onlineResource); return request; }
public GetStylesRequest createGetStylesRequest() throws UnsupportedOperationException{ if (getCapabilities().getRequest().getGetStyles() == null) { throw new UnsupportedOperationException("Server does not specify a GetStyles operation. Cannot be performed"); } URL onlineResource = getCapabilities().getRequest().getGetStyles().getGet(); if (onlineResource == null) { onlineResource = serverURL; } GetStylesRequest request = getSpecification().createGetStylesRequest(onlineResource); return request; }