|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A rule is used to attach a condition to, and group, the individual symbolizers used for rendering. The Title and Abstract describe the rule and may be used to generate a legend, as may the LegendGraphic. The Filter, ElseFilter, MinScale and MaxScale elements allow the selection of features and rendering scales for a rule. The scale selection works as follows. When a map is to be rendered, the scale denominator is computed and all rules in all UserStyles that have a scale outside of the request range are dropped. (This also includes Rules that have an ElseFilter.) An ElseFilter is simply an ELSE condition to the conditions (Filters) of all other rules in the same UserStyle. The exact meaning of the ElseFilter is determined after Rules have been eliminated for not fitting the rendering scale. This definition of the behaviour of ElseFilters may seem a little strange, but it allows for scale-dependent and scale-independent ELSE conditions. For the Filter, only SqlExpression is available for specification, but this is a hack and should be replaced with Filter as defined in WFS. A missing Filter element means "always true". If a set of Rules has no ElseFilters, then some features may not be rendered (which is presumably the desired behavior). The Scales are actually scale denominators (as double floats), so "10e6" would be interpreted as 1:10M. A missing MinScale means there is no lower bound to the scale-denominator range (lim[x->0+](x)), and a missing MaxScale means there is no upper bound (infinity). 0.28mm
Method Summary | |
void |
accept(StyleVisitor visitor)
|
java.lang.String |
getAbstract()
Gets the abstract text for the rule. |
Filter |
getFilter()
|
Graphic[] |
getLegendGraphic()
A set of equivalent Graphics in different formats which can be used as a legend against features stylized by the symbolizers in this rule. |
double |
getMaxScaleDenominator()
The largest value for scale denominator at which symbolizers contained by this rule should be applied. |
double |
getMinScaleDenominator()
The smallest value for scale denominator at which symbolizers contained by this rule should be applied. |
java.lang.String |
getName()
Gets the name of the rule. |
Symbolizer[] |
getSymbolizers()
The symbolizers contain the actual styling information for different geometry types. |
java.lang.String |
getTitle()
Gets the title. |
boolean |
hasElseFilter()
|
void |
setAbstract(java.lang.String abstractStr)
Sets the abstract text for the rule. |
void |
setFilter(Filter filter)
|
void |
setIsElseFilter(boolean defaultb)
|
void |
setLegendGraphic(Graphic[] graphics)
A set of equivalent Graphics in different formats which can be used as a legend against features stylized by the symbolizers in this rule. |
void |
setMaxScaleDenominator(double scale)
The largest value for scale denominator at which symbolizers contained by this rule should be applied. |
void |
setMinScaleDenominator(double scale)
The smallest value for scale denominator at which symbolizers contained by this rule should be applied. |
void |
setName(java.lang.String name)
Sets the name of the rule. |
void |
setSymbolizers(Symbolizer[] symbolizers)
The symbolizers contain the actual styling information for different geometry types. |
void |
setTitle(java.lang.String title)
Sets the title. |
Method Detail |
public java.lang.String getName()
public void setName(java.lang.String name)
name
- The name of the rule. This provides a way to identify a
rule.public java.lang.String getTitle()
public void setTitle(java.lang.String title)
title
- The title of the rule. This is a brief, human readable,
description of the rule.public java.lang.String getAbstract()
public void setAbstract(java.lang.String abstractStr)
abstractStr
- The abstract text, a more detailed description of the
rule.public double getMinScaleDenominator()
public void setMinScaleDenominator(double scale)
scale
- The smallest (inclusive) denominator value that this rule will be
active for.public double getMaxScaleDenominator()
public void setMaxScaleDenominator(double scale)
scale
- The largest (exclusive) denominator value that this rule will be
active for.public Filter getFilter()
public void setFilter(Filter filter)
public boolean hasElseFilter()
public void setIsElseFilter(boolean defaultb)
public Graphic[] getLegendGraphic()
public void setLegendGraphic(Graphic[] graphics)
graphics
- An array of Graphic objects, any of which can be used as the
legend.public Symbolizer[] getSymbolizers()
public void setSymbolizers(Symbolizer[] symbolizers)
symbolizers
- An array of symbolizers to be applied, in sequence, to all of the
features addressed by the FeatureTypeStyler which contains this
rule.public void accept(StyleVisitor visitor)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |