@Entity public class WMSService extends GeoService implements Updatable
This requires an option to update the metadata should the service change, so this class implements Updatable.
| Modifier and Type | Field and Description |
|---|---|
static String |
DETAIL_SUPPORT_SLD |
static String |
DETAIL_USER_STYLE |
static String |
PARAM_OVERRIDE_URL
Parameter to specify the value for #getOverrideUrl().
|
static String |
PROTOCOL
JPA DiscriminatorValue for this class.
|
DETAIL_ORIGINAL_NAME, DETAIL_OVERRIDDEN_URL, DETAIL_USE_INTERSECT, DETAIL_USE_PROXY, PARAM_MUST_LOGIN, PARAM_ONLINE_CHECK_ONLY, PARAM_PASSWORD, PARAM_USERNAME| Constructor and Description |
|---|
WMSService() |
| Modifier and Type | Method and Description |
|---|---|
WMSExceptionType |
getException_type() |
Boolean |
getOverrideUrl()
Whether to use the original URL the Capabilities was loaded with or the
URL the WMS reports it is at in the Capabilities.
|
protected org.geotools.data.wms.WebMapServer |
getWebMapServer()
Construct the GeoTools WebMapServer metadata object.
|
protected void |
load(org.geotools.data.wms.WebMapServer wms,
Map params,
WaitPageStatus status,
javax.persistence.EntityManager em)
Does the actual loading work.
|
WMSService |
loadFromUrl(String url,
Map params,
WaitPageStatus status,
javax.persistence.EntityManager em)
Load WMS metadata from URL or only check if the service is online when
PARAM_ONLINE_CHECK_ONLY is true.
|
void |
loadLayerFeatureTypes(String wfsUrl,
List<org.geotools.data.ows.LayerDescription> layerDescriptions,
javax.persistence.EntityManager em)
Set feature types for layers in the WMSService from the given WFS according
to the DescribeLayer response.
|
void |
setException_type(WMSExceptionType exception_type) |
void |
setOverrideUrl(Boolean overrideUrl) |
String |
toString() |
UpdateResult |
update(javax.persistence.EntityManager em)
Reload the WMS capabilities metadata and update this entity if it is
changed.
|
authorizationsModified, checkOnline, getAuthorizationsModified, getCategory, getDetails, getId, getKeywords, getLayer, getLayerChildrenCache, getName, getPassword, getProtocol, getReaders, getSingleLayer, getStyleLibraries, getTopLayer, getUrl, getUsername, initLayerCollectionsForUpdate, isMonitoringEnabled, isMonitoringStatusOK, loadFromUrl, loadLayerTree, removeAllLayers, setAllChildrenDetail, setAuthorizationsModified, setCategory, setDetails, setId, setKeywords, setMonitoringEnabled, setMonitoringStatusOK, setName, setPassword, setReaders, setStyleLibraries, setTopLayer, setUrl, setUsername, toJSONObject, toJSONObject, toJSONObjectpublic static final String PROTOCOL
public static final String PARAM_OVERRIDE_URL
public static final String DETAIL_SUPPORT_SLD
public static final String DETAIL_USER_STYLE
public Boolean getOverrideUrl()
public void setOverrideUrl(Boolean overrideUrl)
public WMSExceptionType getException_type()
public void setException_type(WMSExceptionType exception_type)
public WMSService loadFromUrl(String url, Map params, WaitPageStatus status, javax.persistence.EntityManager em) throws Exception
loadFromUrl in class GeoServiceurl - The location of the WMS.params - Map containing parameters, keys are finals in this class.status - For reporting progress.em - the entity manager to useException - if anyprotected void load(org.geotools.data.wms.WebMapServer wms,
Map params,
WaitPageStatus status,
javax.persistence.EntityManager em)
throws IOException,
MalformedURLException,
org.geotools.ows.ServiceException
wms - WMS serviceparams - unused?status - progress pageem - the entity manager to useIOException - when retrieving the capabilitiesMalformedURLException - if wms capabilities has improper urlsorg.geotools.ows.ServiceException - if any occurs parsng the capabilities etc.protected org.geotools.data.wms.WebMapServer getWebMapServer()
throws IOException,
MalformedURLException,
org.geotools.ows.ServiceException
IOException - when the http connection failsMalformedURLException - when the url is invalidorg.geotools.ows.ServiceException - when the service is invalidpublic UpdateResult update(javax.persistence.EntityManager em)
getOverrideUrl() is false, will pickup URL changes
from the service.public void loadLayerFeatureTypes(String wfsUrl, List<org.geotools.data.ows.LayerDescription> layerDescriptions, javax.persistence.EntityManager em)
wfsUrl - the WFS URLlayerDescriptions - description of which feature types of the WFS are
used in layers of this service according to DescribeLayerem - the entity manager to useCopyright © 2018. All rights reserved.