org.geotools.styling
Class RuleImpl

Object
  extended by RuleImpl
All Implemented Interfaces:
Cloneable, Rule

public class RuleImpl
extends Object
implements Rule, Cloneable

Provides the default implementation of Rule.

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

Constructor Summary
protected RuleImpl()
          Creates a new instance of DefaultRule
  RuleImpl(Rule rule)
          Copy constructor
protected RuleImpl(Symbolizer[] symbolizers)
          Creates a new instance of DefaultRule
protected RuleImpl(Symbolizer[] symbolizers, Description desc, Graphic[] legends, String name, Filter filter, boolean isElseFilter, double maxScale, double minScale)
           
 
Method Summary
 void accept(StyleVisitor visitor)
           
 Object accept(StyleVisitor visitor, Object data)
           
 void addLegendGraphic(Graphic graphic)
          Deprecated. 
 void addSymbolizer(Symbolizer symb)
          Deprecated. 
 Object clone()
          Creates a deep copy clone of the rule.
 boolean equals(Object oth)
          Compares this Rule with another for equality.
 String getAbstract()
          Getter for property abstractStr.
 DescriptionImpl getDescription()
           
 Filter getFilter()
           
 GraphicLegend getLegend()
           
 Graphic[] getLegendGraphic()
           
 double getMaxScaleDenominator()
          Getter for property maxScaleDenominator.
 double getMinScaleDenominator()
          Getter for property minScaleDenominator.
 String getName()
           
 OnLineResource getOnlineResource()
           
 Symbolizer[] getSymbolizers()
          Deprecated. 
 String getTitle()
          Getter for property title.
 boolean hasElseFilter()
          Deprecated. use isElseFilter instead.
 int hashCode()
          Generates a hashcode for the Rule.
 boolean isElseFilter()
           
 void setAbstract(String abstractStr)
          Setter for property abstractStr.
 void setDescription(Description description)
           
 void setElseFilter(boolean defaultb)
           
 void setFilter(Filter filter)
           
 void setHasElseFilter()
          Deprecated. use setIsElseFilter(true)
 void setIsElseFilter(boolean flag)
           
 void setLegend(GraphicLegend legend)
           
 void setLegendGraphic(Graphic[] graphics)
          Deprecated. 
 void setMaxScaleDenominator(double maxScaleDenominator)
          Setter for property maxScaleDenominator.
 void setMinScaleDenominator(double minScaleDenominator)
          Setter for property minScaleDenominator.
 void setName(String name)
           
 void setOnlineResource(OnLineResource online)
           
 void setSymbolizers(Symbolizer[] syms)
          Deprecated. 
 void setTitle(String title)
          Setter for property title.
 List<Symbolizer> symbolizers()
           
 String toString()
           
 
Methods inherited from class Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RuleImpl

protected RuleImpl()
Creates a new instance of DefaultRule


RuleImpl

protected RuleImpl(Symbolizer[] symbolizers)
Creates a new instance of DefaultRule

Parameters:
symbolizers - DOCUMENT ME!

RuleImpl

protected RuleImpl(Symbolizer[] symbolizers,
                   Description desc,
                   Graphic[] legends,
                   String name,
                   Filter filter,
                   boolean isElseFilter,
                   double maxScale,
                   double minScale)

RuleImpl

public RuleImpl(Rule rule)
Copy constructor

Method Detail

getLegendGraphic

public Graphic[] getLegendGraphic()

addLegendGraphic

@Deprecated
public void addLegendGraphic(Graphic graphic)
Deprecated. 


setLegendGraphic

@Deprecated
public void setLegendGraphic(Graphic[] graphics)
Deprecated. 

A set of equivalent Graphics in different formats which can be used as a legend against features stylized by the symbolizers in this rule.

Parameters:
graphics - An array of Graphic objects, any of which can be used as the legend.

getLegend

public GraphicLegend getLegend()
Specified by:
getLegend in interface Rule

setLegend

public void setLegend(GraphicLegend legend)

symbolizers

public List<Symbolizer> symbolizers()
Specified by:
symbolizers in interface Rule

addSymbolizer

@Deprecated
public void addSymbolizer(Symbolizer symb)
Deprecated. 


setSymbolizers

@Deprecated
public void setSymbolizers(Symbolizer[] syms)
Deprecated. 


getSymbolizers

@Deprecated
public Symbolizer[] getSymbolizers()
Deprecated. 


getDescription

public DescriptionImpl getDescription()
Specified by:
getDescription in interface Rule

setDescription

public void setDescription(Description description)

getName

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

getAbstract

public String getAbstract()
Getter for property abstractStr.

Returns:
Value of property abstractStr.

setName

public void setName(String name)

setAbstract

public void setAbstract(String abstractStr)
Setter for property abstractStr.

Parameters:
abstractStr - New value of property abstractStr.

getTitle

public String getTitle()
Getter for property title.

Returns:
Value of property title.

setTitle

public void setTitle(String title)
Setter for property title.

Parameters:
title - New value of property title.

getFilter

public Filter getFilter()
Specified by:
getFilter in interface Rule

setFilter

public void setFilter(Filter filter)

isElseFilter

public boolean isElseFilter()
Specified by:
isElseFilter in interface Rule

hasElseFilter

@Deprecated
public boolean hasElseFilter()
Deprecated. use isElseFilter instead.


setIsElseFilter

public void setIsElseFilter(boolean flag)

setElseFilter

public void setElseFilter(boolean defaultb)

setHasElseFilter

@Deprecated
public void setHasElseFilter()
Deprecated. use setIsElseFilter(true)


getMaxScaleDenominator

public double getMaxScaleDenominator()
Getter for property maxScaleDenominator.

Specified by:
getMaxScaleDenominator in interface Rule
Returns:
Value of property maxScaleDenominator.

setMaxScaleDenominator

public void setMaxScaleDenominator(double maxScaleDenominator)
Setter for property maxScaleDenominator.

Parameters:
maxScaleDenominator - New value of property maxScaleDenominator.

getMinScaleDenominator

public double getMinScaleDenominator()
Getter for property minScaleDenominator.

Specified by:
getMinScaleDenominator in interface Rule
Returns:
Value of property minScaleDenominator.

setMinScaleDenominator

public void setMinScaleDenominator(double minScaleDenominator)
Setter for property minScaleDenominator.

Parameters:
minScaleDenominator - New value of property minScaleDenominator.

accept

public Object accept(StyleVisitor visitor,
                     Object data)
Specified by:
accept in interface Rule

accept

public void accept(StyleVisitor visitor)

clone

public Object clone()
Creates a deep copy clone of the rule.

Overrides:
clone in class Object
See Also:
org.geotools.styling.Rule#clone()

hashCode

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

For complex styles this can be an expensive operation since the hash code is computed using all the hashcodes of the object within the style.

Overrides:
hashCode in class Object
Returns:
The hashcode.

equals

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

Two RuleImpls are equal if all their properties are equal.

For complex styles this can be an expensive operation since it checks all objects for equality.

Overrides:
equals in class Object
Parameters:
oth - The other rule to compare with.
Returns:
True if this and oth are equal.

toString

public String toString()
Overrides:
toString in class Object

getOnlineResource

public OnLineResource getOnlineResource()
Specified by:
getOnlineResource in interface Rule

setOnlineResource

public void setOnlineResource(OnLineResource online)


Copyright © 1996-2009 Geotools. All Rights Reserved.