Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.opengis.sld
Interface Rule

    @XmlElement(value="Rule")
    public interface Rule

A rule consists of two important parts: a filter and a list of symbols. When it is time to draw a given feature, the rendering engine examines each rule in the FeatureStyle, first checking its Filter (or ElseFilter). If the Filter passes, then every Symbol for that rule is applied to the given feature.

Since:
  GeoAPI 2.0
Version:
  Implementation specification 1.0

Method Summary
`InternationalString` | `getAbstract()` Returns a human readable, prose description of this rule.
`Filter` | `getFilter()` Returns the filter that will limit the features for which this `Rule` will fire.
`Graphic` | `getLegendGraphic()` 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.
`List<Symbol>` | `getSymbols()` This method returns a pointer to the "live" list of Symbol objects contained by this `Rule`.
`InternationalString` | `getTitle()` Returns the human readable title of this rule.
`boolean` | `isElseFilter()` Returns true if this `Rule` is to fire only if no other rules in the containing style have fired yet.
`void` | `setAbstract(InternationalString abs)` Sets the human readable, prose description of this rule.
`void` | `setElseFilter(boolean newValue)` Sets the flag that indicates whether this `Rule` is an "else filter".
`void` | `setFilter(Filter filter)` Sets the filter that will limit the features for which this `Rule` will fire.
`void` | `setLegendGraphic(Graphic g)` Sets the small Graphic that may be used by the rendering engine to draw a legend window.
`void` | `setMaxScaleDenominator(double d)` Sets the maximum value (exclusive) in the denominator of the current map scale at which this `Rule` will fire.
`void` | `setMinScaleDenominator(double d)` Sets the minimum value (inclusive) in the denominator of the current map scale at which this `Rule` will fire.
`void` | `setName(String name)` Sets the name for this rule.
`void` | `setTitle(InternationalString name)` Sets the human readable title of this rule.

Method Detail

### getName

    @XmlElement(value="Name")
    String getName()

  Returns a name for this rule. This can be any string that uniquely identifies this rule within a given canvas. It is not meant to be human-friendly. (The "title" property is meant to be human friendly.)

### setName

    @XmlElement(value="Name")
    void setName(String name)

  Sets the name for this rule. See `getName()` for details.

### getTitle

    @XmlElement(value="Title")
    InternationalString getTitle()

  Returns the human readable title of this rule. This can be any string, but should be fairly short as it is intended to be used in list boxes or drop down menus or other selection interfaces.

### setTitle

    @XmlElement(value="Title")
    void setTitle(InternationalString name)

  Sets the human readable title of this rule. See `getTitle()` for details.

### getAbstract

    @XmlElement(value="Abstract")
    InternationalString getAbstract()

  Returns a human readable, prose description of this rule. This can be any string and can consist of any amount of text.

### setAbstract

    @XmlElement(value="Abstract")
    void setAbstract(InternationalString abs)

  Sets the human readable, prose description of this rule. See `getAbstract()` for details.

### getLegendGraphic

    @XmlElement(value="LegendGraphic")
    Graphic getLegendGraphic()

  Returns a small Graphic that could be used by the rendering engine to draw a legend window.

  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.

### setLegendGraphic

    @XmlElement(value="LegendGraphic")
    void setLegendGraphic(Graphic g)

  Sets the small Graphic that may be used by the rendering engine to draw a legend window. See `getLegendGraphic()` for details.

### getFilter

    @XmlElement(value="Filter")
    Filter getFilter()

  Returns the filter that will limit the features for which this `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.

### setFilter

    @XmlElement(value="Filter")
    void setFilter(Filter filter)

  Sets the filter that will limit the features for which this `Rule` will fire. See `getFilter()` for details.

### isElseFilter

    @XmlElement(value="ElseFilter")
    boolean isElseFilter()

  Returns true if this `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 null.

### setElseFilter

    @XmlElement(value="ElseFilter")
    void setElseFilter(boolean newValue)

  Sets the flag that indicates whether this `Rule` is an "else filter". A value of true indicates that this rule is to fire only if no other rules in the containing style have fired. See `isElseFilter()` for details.

### getMinScaleDenominator

    @XmlElement(value="MinScaleDenominator")
    double getMinScaleDenominator()

  Returns the minimum value (inclusive) in the denominator of the current map scale at which this `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.

### setMinScaleDenominator

    @XmlElement(value="MinScaleDenominator")
    void setMinScaleDenominator(double d)

  Sets the minimum value (inclusive) in the denominator of the current map scale at which this `Rule` will fire. See `getMinScaleDenominator()` for details.

### getMaxScaleDenominator

    @XmlElement(value="MaxScaleDenominator")
    double getMaxScaleDenominator()

  Returns the maximum value (exclusive) in the denominator of the current map scale at which this `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.

### setMaxScaleDenominator

    @XmlElement(value="MaxScaleDenominator")
    void setMaxScaleDenominator(double d)

  Sets the maximum value (exclusive) in the denominator of the current map scale at which this `Rule` will fire. See `getMaxScaleDenominator()` for details.

### getSymbols

    List<Symbol> getSymbols()

  This method returns a pointer to the "live" list of Symbol objects contained by this `Rule`. This list can be modified by the caller, so there is no need for a `setSymbols` method.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1994-2008 Open Geospatial Consortium. All Rights Reserved.