org.geotools.styling
Class LineSymbolizerImpl

java.lang.Object
  extended byorg.geotools.event.AbstractGTComponent
      extended byorg.geotools.styling.LineSymbolizerImpl
All Implemented Interfaces:
java.lang.Cloneable, org.opengis.util.Cloneable, GTComponent, LineSymbolizer, Symbolizer

public class LineSymbolizerImpl
extends AbstractGTComponent
implements LineSymbolizer, org.opengis.util.Cloneable

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

Version:
$Id: LineSymbolizerImpl.java 17701 2006-01-23 00:00:51Z desruisseaux $
Author:
James Macgill

Field Summary
 
Fields inherited from class org.geotools.event.AbstractGTComponent
notification
 
Constructor Summary
protected LineSymbolizerImpl()
          Creates a new instance of DefaultLineSymbolizer
 
Method Summary
 void accept(StyleVisitor visitor)
          Accepts a StyleVisitor to perform some operation on this LineSymbolizer.
 java.lang.Object clone()
          Creates a deep copy clone.
 boolean equals(java.lang.Object oth)
          Compares this LineSymbolizerImpl with another for equality.
 java.lang.String getGeometryPropertyName()
          This property defines the geometry to be used for styling.
 Stroke getStroke()
          Provides the graphical-symbolization parameter to use for the linear geometry.
 int hashCode()
          Generates a hashcode for the LineSymbolizerImpl.
 void setGeometryPropertyName(java.lang.String name)
          Sets the GeometryPropertyName.
 void setStroke(Stroke stroke)
          Sets the graphical-symbolization parameter to use for the linear geometry.
 
Methods inherited from class org.geotools.event.AbstractGTComponent
changed, fireChanged, fireChildChanged, getNote, getParent, removed, setNote
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.geotools.event.GTComponent
changed, getNote, getParent, removed, setNote
 

Constructor Detail

LineSymbolizerImpl

protected LineSymbolizerImpl()
Creates a new instance of DefaultLineSymbolizer

Method Detail

getGeometryPropertyName

public java.lang.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 LineSymbolizer
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(java.lang.String name)
Sets the GeometryPropertyName.

Specified by:
setGeometryPropertyName in interface LineSymbolizer
Parameters:
name - The name of the geometryProperty.
See Also:
#LineSymbolizerImpl.geometryPropertyName()

getStroke

public Stroke 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.

Specified by:
setStroke in interface LineSymbolizer
Parameters:
stroke - The Stroke style to use when rendering lines.

accept

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

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

clone

public java.lang.Object clone()
Creates a deep copy clone.

Specified by:
clone in interface org.opengis.util.Cloneable
Overrides:
clone in class AbstractGTComponent
Returns:
The deep copy clone.
Throws:
java.lang.RuntimeException - DOCUMENT ME!

hashCode

public int hashCode()
Generates a hashcode for the LineSymbolizerImpl.

Returns:
A hashcode.

equals

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

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

Parameters:
oth - The other LineSymbolizerImpl
Returns:
True if this and oth are equal.


Copyright © GeoTools. All Rights Reserved.