|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deegree_impl.graphics.sld.Rule_Impl
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
----------------------------------------------------------------------
Field Summary | |
private java.lang.String |
abstract_
|
private boolean |
elseFilter
|
private Filter |
filter
|
private LegendGraphic |
legendGraphic
|
private double |
maxScaleDenominator
|
private double |
minScaleDenominator
|
private java.lang.String |
name
|
private java.util.ArrayList |
symbolizers
|
private java.lang.String |
title
|
Constructor Summary | |
(package private) |
Rule_Impl()
default constructor |
(package private) |
Rule_Impl(Symbolizer[] symbolizers,
java.lang.String name,
java.lang.String title,
java.lang.String abstract_,
LegendGraphic legendGraphic,
Filter filter,
boolean elseFilter,
double minScaleDenominator,
double maxScaleDenominator)
constructor initializing the class with the |
Method Summary | |
void |
addSymbolizer(Symbolizer symbolizer)
adds a |
java.lang.String |
exportAsXML()
exports the content of the Rule as XML formated String |
java.lang.String |
getAbstract()
returns the human readable abstract of the rule |
Filter |
getFilter()
The Filter element has a relatively straightforward meaning. |
LegendGraphic |
getLegendGraphic()
The LegendGraphic element gives an optional explicit Graphic symbol to be displayed in a legend for this rule. |
double |
getMaxScaleDenominator()
The MinScaleDenominator and MaxScaleDenominator elements of a Rule define the range of map-rendering scales for which the rule should be applied. |
double |
getMinScaleDenominator()
The MinScaleDenominator and MaxScaleDenominator elements of a Rule define the range of map-rendering scales for which the rule should be applied. |
java.lang.String |
getName()
returns the name of the rule. this for machine interpreting. |
Symbolizer[] |
getSymbolizers()
Embedded inside of Rules, which group conditions for styling features, are Symbolizers. |
java.lang.String |
getTitle()
returns the human readable title of the rule |
boolean |
hasElseFilter()
The ElseFilter allows rules to be specified that are activated for features are not selected by any other rule in a feature-type style. |
void |
removeSymbolizer(Symbolizer symbolizer)
Removes a |
void |
setAbstract(java.lang.String abstract_)
sets the human readable abstract of the rule |
void |
setElseFilter(boolean elseFilter)
sets the |
void |
setFilter(Filter filter)
sets the |
void |
setLegendGraphic(LegendGraphic legendGraphic)
sets the LegendGraphic element |
void |
setMaxScaleDenominator(double maxScaleDenominator)
sets the |
void |
setMinScaleDenominator(double minScaleDenominator)
sets the |
void |
setName(java.lang.String name)
sets the name of the rule. this for machine interpreting. |
void |
setSymbolizers(Symbolizer[] symbolizers)
sets the |
void |
setTitle(java.lang.String title)
sets the human readable title of the rule |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.util.ArrayList symbolizers
private Filter filter
private LegendGraphic legendGraphic
private java.lang.String abstract_
private java.lang.String name
private java.lang.String title
private boolean elseFilter
private double maxScaleDenominator
private double minScaleDenominator
Constructor Detail |
Rule_Impl()
Rule_Impl(Symbolizer[] symbolizers, java.lang.String name, java.lang.String title, java.lang.String abstract_, LegendGraphic legendGraphic, Filter filter, boolean elseFilter, double minScaleDenominator, double maxScaleDenominator)
Method Detail |
public java.lang.String getName()
getName
in interface Rule
public void setName(java.lang.String name)
setName
in interface Rule
name
- the name of the rulepublic java.lang.String getTitle()
getTitle
in interface Rule
public void setTitle(java.lang.String title)
setTitle
in interface Rule
title
- the title of the rulepublic java.lang.String getAbstract()
getAbstract
in interface Rule
public void setAbstract(java.lang.String abstract_)
setAbstract
in interface Rule
abstract_
- the abstract of the rulepublic LegendGraphic getLegendGraphic()
getLegendGraphic
in interface Rule
public void setLegendGraphic(LegendGraphic legendGraphic)
setLegendGraphic
in interface Rule
legendGraphic
- the legendGraphic of the rulepublic Filter getFilter()
getFilter
in interface Rule
public void setFilter(Filter filter)
setFilter
in interface Rule
filter
- the filter elementpublic boolean hasElseFilter()
hasElseFilter
in interface Rule
public void setElseFilter(boolean elseFilter)
setElseFilter
in interface Rule
elseFilter
- an elseFilterpublic double getMinScaleDenominator()
getMinScaleDenominator
in interface Rule
public void setMinScaleDenominator(double minScaleDenominator)
setMinScaleDenominator
in interface Rule
minScaleDenominator
- the MinScaleDenominator for the rulepublic double getMaxScaleDenominator()
getMaxScaleDenominator
in interface Rule
public void setMaxScaleDenominator(double maxScaleDenominator)
setMaxScaleDenominator
in interface Rule
maxScaleDenominator
- the MaxScaleDenominator for the rulepublic Symbolizer[] getSymbolizers()
getSymbolizers
in interface Rule
public void setSymbolizers(Symbolizer[] symbolizers)
setSymbolizers
in interface Rule
symbolizers
- symbolizers for the rulepublic void addSymbolizer(Symbolizer symbolizer)
addSymbolizer
in interface Rule
symbolizer
- symbolizer to addpublic void removeSymbolizer(Symbolizer symbolizer)
removeSymbolizer
in interface Rule
symbolizer
- symbolizer to removepublic java.lang.String exportAsXML()
exportAsXML
in interface Marshallable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |