Package org.geotools.styling
Class StyledLayerDescriptorImpl
- Object
-
- StyledLayerDescriptorImpl
-
- All Implemented Interfaces:
StyledLayerDescriptor
public class StyledLayerDescriptorImpl extends Object implements StyledLayerDescriptor
Holds styling information (from a StyleLayerDescriptor document).This class is based on version 1.0 of the SLD specification.
For many of us in geotools this is the reason we came along for the ride - a pretty picture. For documentation on the use of this class please consult the SLD 1.0 specification.
We may experiment with our own (or SLD 1.1) ideas but will mark such experiments for you. This is only an issue of you are considering writing out these objects for interoptability with other systems.
General strategy for supporting multiple SLD versions (and experiments):
- These classes will be BIGGER and more capabile then any one specification
- We can define (and support) explicit interfaces tracking each version (preferably GeoAPI would hold these)
- We can use Factories (aka SLD1Factory and SLD1_1Factory and SEFactory) to support the creation of conformant datastructures. Code (such as user interfaces) can be parameratized with these factories when they need to confirm to an exact version supported by an individual service. We hope that specifications are always adaptive, and will be forced to throw unsupported exceptions when functionality is removed from a specification.
-
-
Constructor Summary
Constructors Constructor Description StyledLayerDescriptorImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(StyleVisitor visitor)Used to navigate a Style/SLD.voidaddStyledLayer(StyledLayer layer)booleanequals(Object oth)StringgetAbstract()Getter for property abstractStr.StylegetDefaultStyle()Convenience method for grabbing the default style from the StyledLayerDescriptor.StringgetName()Getter for property name.StyledLayer[]getStyledLayers()StringgetTitle()Getter for property title.inthashCode()List<StyledLayer>layers()Direct access to layers list.voidsetAbstract(String abstractStr)Setter for property abstractStr.voidsetName(String name)Setter for property name.voidsetStyledLayers(StyledLayer[] layers)voidsetTitle(String title)Setter for property title.
-
-
-
Method Detail
-
getDefaultStyle
public Style getDefaultStyle()
Convenience method for grabbing the default style from the StyledLayerDescriptor.- Returns:
- first Style (in SLD-->UserLayers-->UserStyles) that claims to be the default
-
getStyledLayers
public StyledLayer[] getStyledLayers()
- Specified by:
getStyledLayersin interfaceStyledLayerDescriptor
-
setStyledLayers
public void setStyledLayers(StyledLayer[] layers)
- Specified by:
setStyledLayersin interfaceStyledLayerDescriptor
-
layers
public List<StyledLayer> layers()
Description copied from interface:StyledLayerDescriptorDirect access to layers list.- Specified by:
layersin interfaceStyledLayerDescriptor- Returns:
- Direct access to layers list.
-
addStyledLayer
public void addStyledLayer(StyledLayer layer)
- Specified by:
addStyledLayerin interfaceStyledLayerDescriptor
-
getName
public String getName()
Getter for property name.- Specified by:
getNamein interfaceStyledLayerDescriptor- Returns:
- Value of property name.
-
setName
public void setName(String name)
Setter for property name.- Specified by:
setNamein interfaceStyledLayerDescriptor- Parameters:
name- New value of property name.
-
getTitle
public String getTitle()
Getter for property title.- Specified by:
getTitlein interfaceStyledLayerDescriptor- Returns:
- Value of property title.
-
setTitle
public void setTitle(String title)
Setter for property title.- Specified by:
setTitlein interfaceStyledLayerDescriptor- Parameters:
title- New value of property title.
-
getAbstract
public String getAbstract()
Getter for property abstractStr.- Specified by:
getAbstractin interfaceStyledLayerDescriptor- Returns:
- Value of property abstractStr.
-
setAbstract
public void setAbstract(String abstractStr)
Setter for property abstractStr.- Specified by:
setAbstractin interfaceStyledLayerDescriptor- Parameters:
abstractStr- New value of property abstractStr.
-
accept
public void accept(StyleVisitor visitor)
Description copied from interface:StyledLayerDescriptorUsed to navigate a Style/SLD.- Specified by:
acceptin interfaceStyledLayerDescriptor
-
-