public class GSLayerEncoder extends PropertyXMLEncoder
<layer>
<name>{LAYERNAME}</name>
<type>RASTER</type>
<defaultStyle>
<name>{STYLE_NAME}</name>
<atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://{GSURL}/rest/styles/{STYLE}xml" type="application/xml"/>
</defaultStyle>
<resource class="coverage">
<name>{RESOURCE_NAME}</name>
<atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate"
href="http://{GSURL}/rest/workspaces/{WS}/coveragestores/{STORE}/coverages/{LAYER}.xml" type="application/xml"/>
</resource>
<attribution>
<title>test</title>
<href>http://www.fao.org/fileadmin/templates/faoweb/images/FAO-logo.png</href>
<logoURL>http://www.fao.org/fileadmin/templates/faoweb/images/FAO-logo.png</logoURL>
<logoWidth>412</logoWidth>
<logoHeight>77</logoHeight>
<logoType>image/png</logoType>
</attribution>
...
</layer>
| Modifier and Type | Field and Description |
|---|---|
static String |
AUTHORITY_URLS |
static String |
DEFAULT_STYLE |
static String |
IDENTIFIERS |
static String |
STYLES |
| Constructor and Description |
|---|
GSLayerEncoder() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAuthorityURL(GSAuthorityURLInfoEncoder authorityURLInfo)
Add an authorityURLInfo to the GeoServer layer
|
protected void |
addDefaultStyle(String defaultStyle) |
protected void |
addDefaultStyle(String workspace,
String defaultStyle) |
protected void |
addEnabled()
enabled the layer
|
void |
addIdentifier(GSIdentifierInfoEncoder identifierInfo)
Add an identifierInfo to the GeoServer layer
|
protected void |
addQueryable(String queryable)
Add the 'queryable' node with a text value from 'queryable' (true as default)
|
void |
addStyle(String style)
Add a style
|
void |
addStyle(String styleName,
String workspaceName) |
protected void |
addWmsPath(String path) |
boolean |
delAuthorityURL(String authorityURL)
Deletes a AuthorityURLInfo from the list using the authorityURL
(AuthorityURLInfo href)
|
boolean |
delIdentifier(String authority)
Deletes a IdentifierInfo from the list using the authority name
(IdentifierInfo authority)
|
boolean |
delStyle(String style)
delete a style from the list of available styles
|
void |
setAdvertised(boolean advertised) |
void |
setDefaultStyle(String defaultStyle) |
void |
setDefaultStyle(String workspace,
String defaultStyle) |
void |
setEnabled(boolean enable) |
void |
setQueryable(Boolean queryable)
Set or modify the 'queryable' node with a text value from 'queryable' (true as default)
|
void |
setWmsPath(String path)
Default WMS Path The GeoServer WMS path is, by default, /geoserver/wms.
|
add, createElementWithAttribute, get, get, setadd, addContent, getRoot, isEmpty, remove, set, setRoot, setRoot, toStringpublic static final String STYLES
public static final String AUTHORITY_URLS
public static final String IDENTIFIERS
public static final String DEFAULT_STYLE
protected void addEnabled()
public void setEnabled(boolean enable)
enable - true if layer should be set to enabledprotected void addQueryable(String queryable)
public void setQueryable(Boolean queryable)
protected void addWmsPath(String path)
path - the wms path to setGSLayerEncoder#setWmsPath(String)}public void setWmsPath(String path) throws IllegalArgumentException
path - the wms path to setIllegalArgumentException - if path is null or emptyprotected void addDefaultStyle(String defaultStyle)
defaultStyle - GSLayerEncoder#setDefaultStyle(String)}protected void addDefaultStyle(String workspace, String defaultStyle)
defaultStyle - GSLayerEncoder#setDefaultStyle(String)}public void setDefaultStyle(String defaultStyle) throws IllegalArgumentException
defaultStyle - The style that will be applied if no style is specified.IllegalArgumentException - if defaultStyle is null or emptypublic void setDefaultStyle(String workspace, String defaultStyle)
defaultStyle - GSLayerEncoder#setDefaultStyle(String)}public void addStyle(String style)
style - public void addStyle(String styleName, String workspaceName)
styleName - workspaceName - public boolean delStyle(String style)
style - public void setAdvertised(boolean advertised)
advertised - true if the layer should be advertisedpublic void addAuthorityURL(GSAuthorityURLInfoEncoder authorityURLInfo)
authorityURLInfo - public boolean delAuthorityURL(String authorityURL)
authorityURL - public void addIdentifier(GSIdentifierInfoEncoder identifierInfo)
identifierInfo - public boolean delIdentifier(String authority)
authority - Copyright © 2007–2016 PDOK. All rights reserved.