@XmlElement(value="Rule") @UML(identifier="PF_PortrayalRule", specification=ISO_19117) public interface Rule
Modifier and Type | Method and Description |
---|---|
Object |
accept(StyleVisitor visitor,
Object extraData)
calls the visit method of a StyleVisitor
|
Description |
getDescription()
Returns the description of this rule.
|
Filter |
getFilter()
Returns the filter that will limit the features for which this
Rule will fire. |
GraphicLegend |
getLegend()
Returns a small Graphic that could be used by the rendering engine to draw a legend window.
|
double |
getMaxScaleDenominator()
Returns the maximum value (exclusive) in the denominator of the current map scale at which
this
Rule will fire. |
double |
getMinScaleDenominator()
Returns the minimum value (inclusive) in the denominator of the current map scale at which
this
Rule will fire. |
String |
getName()
Returns a name for this rule.
|
OnLineResource |
getOnlineResource()
It is common to have a style coming from a external xml file, this method provide a way to
get the original source if there is one.
|
boolean |
isElseFilter()
Returns true if this
Rule is to fire only if no other rules in the containing style
have fired yet. |
List<? extends Symbolizer> |
symbolizers()
This method returns the list of Symbolizer objects contained by this
Rule . |
@XmlElement(value="Name") @UML(identifier="ruleName", obligation=MANDATORY, specification=ISO_19117) String getName()
@XmlElement(value="Description") @UML(identifier="description", obligation=OPTIONAL, specification=ISO_19117) Description getDescription()
@XmlElement(value="LegendGraphic") GraphicLegend getLegend()
A nice user interface may want to present the user with a legend that indicates how
features of a given type are being portrayed. Through its LegendGraphic
property, a
Rule
may provide a custom picture to be used in such a legend window.
@XmlElement(value="Filter") @UML(identifier="queryStatement", obligation=MANDATORY, specification=ISO_19117) Filter getFilter()
Rule
will fire. This
can only be non-null if isElseFilter()
returns false. If this value is null and isElseFilter
is false, this means that this Rule
should fire for all features.@XmlElement(value="ElseFilter") boolean isElseFilter()
Rule
is to fire only if no other rules in the containing style
have fired yet. If this is true, then the filter must be
Filter.EXCLUDES.@XmlElement(value="MinScaleDenominator") double getMinScaleDenominator()
Rule
will fire. If, for example, the MinScaleDenominator
were 10000,
then this rule would only fire at scales of 1:X where X is greater than 10000. A value of
zero indicates that there is no minimum.@XmlElement(value="MaxScaleDenominator") double getMaxScaleDenominator()
Rule
will fire. If, for example, the MaxScaleDenominator
were 98765,
then this rule would only fire at scales of 1:X where X is less than 98765. A value of Double.POSITIVE_INFINITY
indicates that there is no maximum.@XmlElement(value="Symbolizer") @UML(identifier="portrayAction", obligation=MANDATORY, specification=ISO_19117) List<? extends Symbolizer> symbolizers()
Rule
.
We use a list of extends Symbolizer> to enable the possibility for an implementation to
return a special type of Symbolizer. This doesnt mean a Rule must return a list of
PointSymbolizer or TextSymbolizer only, no. The purpose of this if to offer the solution to
return different implementations like MutableSymbolizer or RichSymbolizer and then avoid
redundant cast in the code. If you dont intend to use a special interface you can override
this method by : List
OnLineResource getOnlineResource()
@Extension Object accept(StyleVisitor visitor, Object extraData)
visitor
- the style visitorCopyright © 1996–2019 Geotools. All rights reserved.