org.geotools.styling
Class LineSymbolizerImpl

Object
  extended by LineSymbolizerImpl
All Implemented Interfaces:
Cloneable, LineSymbolizer, Symbolizer

public class LineSymbolizerImpl
extends Object
implements LineSymbolizer, Cloneable

Provides a representation of a LineSymbolizer in an SLD Document. A LineSymbolizer defines how a line geometry should be rendered.

Author:
James Macgill, Johann Sorel (Geomatys)
Module:
modules/library/main (gt-main.jar)

Constructor Summary
protected LineSymbolizerImpl()
          Creates a new instance of DefaultLineSymbolizer
protected LineSymbolizerImpl(Stroke stroke, Expression offset, Unit<Length> uom, String geom, String name, Description desc)
           
 
Method Summary
 void accept(StyleVisitor visitor)
           
 Object accept(StyleVisitor visitor, Object data)
          Accepts a StyleVisitor to perform some operation on this LineSymbolizer.
 Object clone()
          Creates a deep copy clone.
 boolean equals(Object oth)
          Compares this LineSymbolizerImpl with another for equality.
 Description getDescription()
           
 String getGeometryPropertyName()
          This property defines the geometry to be used for styling.
 String getName()
           
 Expression getPerpendicularOffset()
           
 StrokeImpl getStroke()
          Provides the graphical-symbolization parameter to use for the linear geometry.
 Unit<Length> getUnitOfMeasure()
           
 int hashCode()
          Generates a hashcode for the LineSymbolizerImpl.
 void setDescription(Description description)
           
 void setGeometryPropertyName(String name)
          Sets the GeometryPropertyName.
 void setName(String name)
           
 void setPerpendicularOffset(Expression offset)
           
 void setStroke(Stroke stroke)
          Sets the graphical-symbolization parameter to use for the linear geometry.
 void setUnitOfMeasure(Unit<Length> uom)
           
 String toString()
           
 
Methods inherited from class Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LineSymbolizerImpl

protected LineSymbolizerImpl()
Creates a new instance of DefaultLineSymbolizer


LineSymbolizerImpl

protected LineSymbolizerImpl(Stroke stroke,
                             Expression offset,
                             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)
Sets the GeometryPropertyName.

Parameters:
name - The name of the geometryProperty.
See Also:
#LineSymbolizerImpl.geometryPropertyName()

getUnitOfMeasure

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

setUnitOfMeasure

public void setUnitOfMeasure(Unit<Length> uom)

getPerpendicularOffset

public Expression getPerpendicularOffset()
Specified by:
getPerpendicularOffset in interface LineSymbolizer

setPerpendicularOffset

public void setPerpendicularOffset(Expression offset)

getStroke

public StrokeImpl getStroke()
Provides the graphical-symbolization parameter to use for the linear geometry.

Specified by:
getStroke in interface LineSymbolizer
Returns:
The Stroke style to use when rendering lines.

setStroke

public void setStroke(Stroke stroke)
Sets the graphical-symbolization parameter to use for the linear geometry.

Parameters:
stroke - The Stroke style to use when rendering lines.

accept

public Object accept(StyleVisitor visitor,
                     Object data)
Accepts a StyleVisitor to perform some operation on this LineSymbolizer.

Specified by:
accept in interface LineSymbolizer
Specified by:
accept in interface Symbolizer
Parameters:
visitor - The visitor 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 a hashcode for the LineSymbolizerImpl.

Overrides:
hashCode in class Object
Returns:
A hashcode.

equals

public boolean equals(Object oth)
Compares this LineSymbolizerImpl with another for equality.

Two LineSymbolizerImpls are equal if they have the same geometryPropertyName and the same stroke.

Overrides:
equals in class Object
Parameters:
oth - The other LineSymbolizerImpl
Returns:
True if this and oth are equal.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 1996-2009 Geotools. All Rights Reserved.