org.geotools.styling
Class StyleImpl

java.lang.Object
  extended by org.geotools.styling.StyleImpl
All Implemented Interfaces:
java.lang.Cloneable, org.opengis.style.Style
Direct Known Subclasses:
BasicLineStyle, BasicPolygonStyle, NamedStyleImpl

public class StyleImpl
extends java.lang.Object
implements Style, org.opengis.util.Cloneable

Implementation of style.

Version:
$Id: StyleImpl.java 33833 2009-09-04 12:26:28Z jive $
Author:
James Macgill, CCG

Constructor Summary
protected StyleImpl()
          Creates a new instance of StyleImpl
 
Method Summary
 void accept(StyleVisitor visitor)
          Used to navigate Style information during portrayal.
 java.lang.Object accept(org.opengis.style.StyleVisitor visitor, java.lang.Object extraData)
           
 void addFeatureTypeStyle(FeatureTypeStyle type)
           
 java.lang.Object clone()
          Clones the Style.
 boolean equals(java.lang.Object oth)
          Compares this Style with another.
 java.util.List<FeatureTypeStyle> featureTypeStyles()
          FeatureTypeStyles rendered in order of appearance in this list.
 java.lang.String getAbstract()
          Deprecated. 
 Symbolizer getDefaultSpecification()
          This functionality is from an ISO specificaiton; and conflicts with the idea of an else rule presented by SLD.
 DescriptionImpl getDescription()
          Description for this style.
 FeatureTypeStyle[] getFeatureTypeStyles()
          Array of FeatureTypeStyles in portrayal order.
 java.lang.String getName()
           
 java.lang.String getTitle()
          Deprecated. 
 int hashCode()
          Overrides hashcode.
 boolean isDefault()
           
 void setAbstract(java.lang.String abstractStr)
          Deprecated. 
 void setDefault(boolean isDefault)
          Indicates that this is the default style.
 void setDefaultSpecification(Symbolizer defaultSymbolizer)
           
 void setDescription(org.opengis.style.Description description)
           
 void setFeatureTypeStyles(FeatureTypeStyle[] styles)
           
 void setName(java.lang.String name)
           
 void setTitle(java.lang.String title)
          Deprecated. 
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StyleImpl

protected StyleImpl()
Creates a new instance of StyleImpl

Method Detail

getDescription

public DescriptionImpl getDescription()
Description copied from interface: Style
Description for this style.

Specified by:
getDescription in interface org.opengis.style.Style
Returns:
Human readable description for use in user interfaces

getAbstract

@Deprecated
public java.lang.String getAbstract()
Deprecated. 

Description copied from interface: Style
Description of this style


getFeatureTypeStyles

public FeatureTypeStyle[] getFeatureTypeStyles()
Description copied from interface: Style
Array of FeatureTypeStyles in portrayal order.

FeatureTypeStyle entries are rendered in order of appearance in this list.

Note: We are using a Array here to continue with Java 1.4 deployment.


featureTypeStyles

public java.util.List<FeatureTypeStyle> featureTypeStyles()
Description copied from interface: Style
FeatureTypeStyles rendered in order of appearance in this list.

Specified by:
featureTypeStyles in interface org.opengis.style.Style

getDefaultSpecification

public Symbolizer getDefaultSpecification()
Description copied from interface: Style
This functionality is from an ISO specificaiton; and conflicts with the idea of an else rule presented by SLD.

Implementations may choose to look up the first symbolizer of an elseFilter or allow this to be provided?

Specified by:
getDefaultSpecification in interface org.opengis.style.Style
Returns:
Symbolizer to use if no rules work out.

setDefaultSpecification

public void setDefaultSpecification(Symbolizer defaultSymbolizer)
Parameters:
defaultSymbolizer - To be used if a feature is not rendered by any of the rules

setFeatureTypeStyles

public void setFeatureTypeStyles(FeatureTypeStyle[] styles)

addFeatureTypeStyle

public void addFeatureTypeStyle(FeatureTypeStyle type)

getName

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

getTitle

@Deprecated
public java.lang.String getTitle()
Deprecated. 

Description copied from interface: Style
Style Title (human readable name for user interfaces)


isDefault

public boolean isDefault()
Specified by:
isDefault in interface org.opengis.style.Style

setAbstract

@Deprecated
public void setAbstract(java.lang.String abstractStr)
Deprecated. 


setDefault

public void setDefault(boolean isDefault)
Description copied from interface: Style
Indicates that this is the default style.

Assume this is kept for GeoServer enabling a WMS to track which style is considered the default. May consider providing a clientProperties mechanism similar to Swing JComponent allowing applications to mark up the Style content for custom uses.


setName

public void setName(java.lang.String name)

setTitle

@Deprecated
public void setTitle(java.lang.String title)
Deprecated. 


accept

public void accept(StyleVisitor visitor)
Description copied from interface: Style
Used to navigate Style information during portrayal.


clone

public java.lang.Object clone()
Clones the Style. Creates deep copy clone of the style.

Overrides:
clone in class java.lang.Object
Returns:
the Clone of the style.
Throws:
java.lang.RuntimeException - DOCUMENT ME!
See Also:
org.geotools.styling.Style#clone()

hashCode

public int hashCode()
Overrides hashcode.

Overrides:
hashCode in class java.lang.Object
Returns:
The hash code.

equals

public boolean equals(java.lang.Object oth)
Compares this Style with another.

Two StyleImpl are equal if they have the same properties and the same list of FeatureTypeStyles.

Overrides:
equals in class java.lang.Object
Parameters:
oth - The object to compare with this for equality.
Returns:
True if this and oth are equal.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

accept

public java.lang.Object accept(org.opengis.style.StyleVisitor visitor,
                               java.lang.Object extraData)
Specified by:
accept in interface org.opengis.style.Style

setDescription

public void setDescription(org.opengis.style.Description description)


Copyright © 1996-2010 Geotools. All Rights Reserved.