org.geotools.styling
Class AbstractSymbolizer

java.lang.Object
  extended by org.geotools.styling.AbstractSymbolizer
All Implemented Interfaces:
org.opengis.style.Symbolizer
Direct Known Subclasses:
LineSymbolizerImpl, PointSymbolizerImpl, PolygonSymbolizerImpl, RasterSymbolizerImpl, TextSymbolizerImpl, VendorSymbolizerImpl

public abstract class AbstractSymbolizer
extends java.lang.Object
implements Symbolizer


Field Summary
protected  Description description
           
protected  org.opengis.filter.expression.Expression geometry
           
protected  java.lang.String name
           
protected  javax.measure.unit.Unit<javax.measure.quantity.Length> unitOfMeasure
           
 
Constructor Summary
protected AbstractSymbolizer()
           
  AbstractSymbolizer(java.lang.String name, Description description, org.opengis.filter.expression.Expression geometry, javax.measure.unit.Unit<javax.measure.quantity.Length> unitOfMeasure)
           
  AbstractSymbolizer(java.lang.String name, Description description, java.lang.String geometryPropertyName, javax.measure.unit.Unit<javax.measure.quantity.Length> unitOfMeasure)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 Description getDescription()
           
 org.opengis.filter.expression.Expression getGeometry()
          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.
 java.lang.String getGeometryPropertyName()
          A shortcut to get the geometry property name in the case the geometry expression is a PropertyName.
 java.lang.String getName()
           
 javax.measure.unit.Unit<javax.measure.quantity.Length> getUnitOfMeasure()
           
 int hashCode()
           
 void setDescription(org.opengis.style.Description description)
          Tile and Abstract of Symbolzer.
 void setGeometry(org.opengis.filter.expression.Expression geometry)
          Sets the expression used for styling.
 void setGeometryPropertyName(java.lang.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(java.lang.String name)
          Name of symbolizer; not always human readable.
 void setUnitOfMeasure(javax.measure.unit.Unit<javax.measure.quantity.Length> uom)
          Defines a measure unit for the symbolizer.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.geotools.styling.Symbolizer
accept
 
Methods inherited from interface org.opengis.style.Symbolizer
accept
 

Field Detail

name

protected java.lang.String name

description

protected Description description

geometry

protected org.opengis.filter.expression.Expression geometry

unitOfMeasure

protected javax.measure.unit.Unit<javax.measure.quantity.Length> unitOfMeasure
Constructor Detail

AbstractSymbolizer

protected AbstractSymbolizer()

AbstractSymbolizer

public AbstractSymbolizer(java.lang.String name,
                          Description description,
                          org.opengis.filter.expression.Expression geometry,
                          javax.measure.unit.Unit<javax.measure.quantity.Length> unitOfMeasure)

AbstractSymbolizer

public AbstractSymbolizer(java.lang.String name,
                          Description description,
                          java.lang.String geometryPropertyName,
                          javax.measure.unit.Unit<javax.measure.quantity.Length> unitOfMeasure)
Method Detail

getDescription

public Description getDescription()
Specified by:
getDescription in interface org.opengis.style.Symbolizer

setDescription

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


getName

public java.lang.String getName()
Specified by:
getName in interface org.opengis.style.Symbolizer

setName

public void setName(java.lang.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(javax.measure.unit.Unit<javax.measure.quantity.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 javax.measure.unit.Unit<javax.measure.quantity.Length> getUnitOfMeasure()
Specified by:
getUnitOfMeasure in interface org.opengis.style.Symbolizer

getGeometry

public org.opengis.filter.expression.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(org.opengis.filter.expression.Expression geometry)
Description copied from interface: Symbolizer
Sets the expression used for styling. See Symbolizer.getGeometry() for further details.


getGeometryPropertyName

public java.lang.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 org.opengis.style.Symbolizer

setGeometryPropertyName

public void setGeometryPropertyName(java.lang.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.


hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright © 1996-2010 Geotools. All Rights Reserved.