org.geotools.styling
Class PointSymbolizerImpl

Object
  extended by PointSymbolizerImpl
All Implemented Interfaces:
Cloneable, PointSymbolizer, Symbolizer

public class PointSymbolizerImpl
extends Object
implements PointSymbolizer, Cloneable

Provides a Java representation of the PointSymbolizer. This defines how points are to be rendered.

Author:
Ian Turton, CCG, Johann Sorel (Geomatys)
Module:
modules/library/main (gt-main.jar)

Constructor Summary
protected PointSymbolizerImpl()
          Creates a new instance of DefaultPointSymbolizer
protected PointSymbolizerImpl(Graphic graphic, Unit<Length> uom, String geom, String name, Description desc)
           
 
Method Summary
 void accept(StyleVisitor visitor)
           
 Object accept(StyleVisitor visitor, Object data)
          Accept a StyleVisitor to perform an operation on this symbolizer.
 Object clone()
          Creates a deep copy clone.
 boolean equals(Object oth)
          Checks this PointSymbolizerImpl with another for equality.
 Description getDescription()
           
 String getGeometryPropertyName()
          This property defines the geometry to be used for styling.
 GraphicImpl getGraphic()
          Provides the graphical-symbolization parameter to use for the point geometry.
 String getName()
           
 Unit<Length> getUnitOfMeasure()
           
 int hashCode()
          Generates the hashcode for the PointSymbolizer
 void setDescription(Description description)
           
 void setGeometryPropertyName(String name)
           
 void setGraphic(Graphic graphic)
          Setter for property graphic.
 void setName(String name)
           
 void setUnitOfMeasure(Unit<Length> uom)
           
 
Methods inherited from class Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PointSymbolizerImpl

protected PointSymbolizerImpl()
Creates a new instance of DefaultPointSymbolizer


PointSymbolizerImpl

protected PointSymbolizerImpl(Graphic graphic,
                              Unit<Length> uom,
                              String geom,
                              String name,
                              Description desc)
Method Detail

getName

public String getName()
Specified by:
getName in interface Symbolizer

setName

public void setName(String name)

getDescription

public Description getDescription()
Specified by:
getDescription in interface Symbolizer

setDescription

public void setDescription(Description description)

getGeometryPropertyName

public String getGeometryPropertyName()
This property 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. Geometry types other than inherently linear types can be used. If a point geometry is used, it should be interpreted as a line of zero length and two end caps. If a polygon is used (or other "area" type) then its closed outline should be used as the line string (with no end caps). The geometryPropertyName is the name of a geometry property in the Feature being styled. 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.

Specified by:
getGeometryPropertyName in interface Symbolizer
Returns:
The name of the attribute in the feature being styled that should be used. If null then the default geometry should be used.

setGeometryPropertyName

public void setGeometryPropertyName(String name)

getUnitOfMeasure

public Unit<Length> getUnitOfMeasure()
Specified by:
getUnitOfMeasure in interface Symbolizer

setUnitOfMeasure

public void setUnitOfMeasure(Unit<Length> uom)

getGraphic

public GraphicImpl getGraphic()
Provides the graphical-symbolization parameter to use for the point geometry.

Specified by:
getGraphic in interface PointSymbolizer
Returns:
The Graphic to be used when drawing a point

setGraphic

public void setGraphic(Graphic graphic)
Setter for property graphic.

Parameters:
graphic - New value of property graphic.

accept

public Object accept(StyleVisitor visitor,
                     Object data)
Accept a StyleVisitor to perform an operation on this symbolizer.

Specified by:
accept in interface PointSymbolizer
Specified by:
accept in interface Symbolizer
Parameters:
visitor - The StyleVisitor to accept.

accept

public void accept(StyleVisitor visitor)

clone

public Object clone()
Creates a deep copy clone.

Overrides:
clone in class Object
Returns:
The deep copy clone.
Throws:
RuntimeException - DOCUMENT ME!

hashCode

public int hashCode()
Generates the hashcode for the PointSymbolizer

Overrides:
hashCode in class Object
Returns:
the hashcode

equals

public boolean equals(Object oth)
Checks this PointSymbolizerImpl with another for equality.

Two PointSymbolizers are equal if the have the same geometry property name and their graphic object is equal.

Note: this method only works for other instances of PointSymbolizerImpl, not other implementors of PointSymbolizer

Overrides:
equals in class Object
Parameters:
oth - The object to compare with this PointSymbolizerImpl for equality.
Returns:
True of oth is a PointSymbolizerImpl that is equal.


Copyright © 1996-2009 Geotools. All Rights Reserved.