org.geotools.styling
Class AbstractSymbolizer

Object
  extended by AbstractSymbolizer
All Implemented Interfaces:
Symbolizer
Direct Known Subclasses:
LineSymbolizerImpl, PointSymbolizerImpl, PolygonSymbolizerImpl, RasterSymbolizerImpl, TextSymbolizerImpl, VendorSymbolizerImpl

public abstract class AbstractSymbolizer
extends Object
implements Symbolizer


Field Summary
protected  Description description
           
protected  Expression geometry
           
protected  String name
           
protected  Map<String,String> options
           
protected  Unit<Length> unitOfMeasure
           
 
Constructor Summary
protected AbstractSymbolizer()
           
  AbstractSymbolizer(String name, Description description, Expression geometry, Unit<Length> unitOfMeasure)
           
  AbstractSymbolizer(String name, Description description, String geometryPropertyName, Unit<Length> unitOfMeasure)
           
 
Method Summary
 boolean equals(Object obj)
           
 Description getDescription()
          Returns the description of this symbolizer.
 Expression getGeometry()
          This defines the geometry to be used for styling.
 String getGeometryPropertyName()
          A shortcut to get the geometry property name in the case the geometry expression is a PropertyName.
 String getName()
          Returns a name for this symbolizer.
 Map<String,String> getOptions()
          Map of vendor options for the symbolizer.
 Unit<Length> getUnitOfMeasure()
          Returns a measure unit.
 int hashCode()
           
 boolean hasOption(String key)
          Determines if a vendor option with the specific key has been set on this symbolizer.
 void setDescription(Description description)
          Tile and Abstract of Symbolzer.
 void setGeometry(Expression geometry)
          Sets the expression used for styling.
 void setGeometryPropertyName(String geometryPropertyName)
          A shortcut to define the geometry expression as a PropertyName Typically, features only have one geometry so, in general, the need to select one is not required.
 void setName(String name)
          Name of symbolizer; not always human readable.
 void setUnitOfMeasure(Unit<Length> uom)
          Defines a measure unit for the symbolizer.
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface Symbolizer
accept
 
Methods inherited from interface Symbolizer
accept
 

Field Detail

name

protected String name

description

protected Description description

geometry

protected Expression geometry

unitOfMeasure

protected Unit<Length> unitOfMeasure

options

protected Map<String,String> options
Constructor Detail

AbstractSymbolizer

protected AbstractSymbolizer()

AbstractSymbolizer

public AbstractSymbolizer(String name,
                          Description description,
                          Expression geometry,
                          Unit<Length> unitOfMeasure)

AbstractSymbolizer

public AbstractSymbolizer(String name,
                          Description description,
                          String geometryPropertyName,
                          Unit<Length> unitOfMeasure)
Method Detail

getDescription

public Description getDescription()
Description copied from interface: Symbolizer
Returns the description of this symbolizer.

Specified by:
getDescription in interface Symbolizer
Returns:
Description with usual informations used for user interfaces.

setDescription

public void setDescription(Description description)
Description copied from interface: Symbolizer
Tile and Abstract of Symbolzer.


getName

public String getName()
Description copied from interface: Symbolizer
Returns a name for this symbolizer. This can be any string that uniquely identifies this style within a given canvas. It is not meant to be human-friendly. (The "title" property is meant to be human friendly.)

Specified by:
getName in interface Symbolizer
Returns:
a name for this style.

setName

public void setName(String name)
Description copied from interface: Symbolizer
Name of symbolizer; not always human readable.

Please consider getDescription().getTitle() as an alternative if presenting this symbolizer in a user interface.


setUnitOfMeasure

public void setUnitOfMeasure(Unit<Length> uom)
Description copied from interface: Symbolizer
Defines a measure unit for the symbolizer. This parameter is inherited from GML. Renderers shall use the unit to correctly render symbols. Recommended uom definitions are :

Parameters:
uom - can be null, which indicates usage of the pixel unit.

getUnitOfMeasure

public Unit<Length> getUnitOfMeasure()
Description copied from interface: Symbolizer
Returns a measure unit. This parameter is inherited from GML. Renderers shall use the unit to correctly render symbols. Recommended uom definitions are :

Specified by:
getUnitOfMeasure in interface Symbolizer
Returns:
can be null. If the unit is null than we shall use a the pixel unit

getGeometry

public Expression getGeometry()
Description copied from interface: Symbolizer
This defines the geometry to be used for styling.
The property is optional and if it is absent (null) then the "default" geometry property of the feature should be used.
Typically, features only have one geometry so, in general, the need to select one is not required.
The expression can also build a new geometry out of existing attributes or transform an existing geometry. For geometry transformations that do change the geometry locations or that make up geometries out of non geometric attributes it is advised that the Expression implements the SpatialTransformationFunction interface


setGeometry

public void setGeometry(Expression geometry)
Description copied from interface: Symbolizer
Sets the expression used for styling. See Symbolizer.getGeometry() for further details.


getGeometryPropertyName

public String getGeometryPropertyName()
Description copied from interface: Symbolizer
A shortcut to get the geometry property name in the case the geometry expression is a PropertyName. In case the geometry expression is null, and in the case the geometry expression is not a PropertyName, this method will return null.

Specified by:
getGeometryPropertyName in interface Symbolizer
Returns:
Geometry attribute name, or null to indicate default geometry

setGeometryPropertyName

public void setGeometryPropertyName(String geometryPropertyName)
Description copied from interface: Symbolizer
A shortcut to define the geometry expression as a PropertyName Typically, features only have one geometry so, in general, the need to select one is not required. Note: this moves a little away from the SLD spec which provides an XPath reference to a Geometry object, but does follow it in spirit.


hasOption

public boolean hasOption(String key)
Description copied from interface: Symbolizer
Determines if a vendor option with the specific key has been set on this symbolizer.


getOptions

public Map<String,String> getOptions()
Description copied from interface: Symbolizer
Map of vendor options for the symbolizer.

Client code looking for the existence of a single option should use Symbolizer.hasOption(String)


hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 1996-2014 Geotools. All Rights Reserved.