Class MapRuleHandle


  • public class MapRuleHandle
    extends StyleRuleHandle
    Represents the handle of map rule. The Map rule represents a style mapping rule: a translation of a database value into a set of display values. A map might translate DB status codes (O, S, P) into user-visible strings (Open, Shipped, Paid). The mapping is driven of of a mapping test expression defined on the style.
    • Constructor Detail

      • MapRuleHandle

        public MapRuleHandle​(SimpleValueHandle valueHandle,
                             int index)
        Constructs the handle of map rule.
        Parameters:
        valueHandle - the value handle for map rule list of one property
        index - the position of this map rule in the list
    • Method Detail

      • getDisplay

        public java.lang.String getDisplay()
        Returns the display value when this rule applies.
        Returns:
        the display value when this rule applies
      • setDisplay

        public void setDisplay​(java.lang.String display)
        Sets the display value when this rule applies.
        Parameters:
        display - the display value to set
      • getDisplayKey

        public java.lang.String getDisplayKey()
        Returns the resource key of display value.
        Returns:
        the resource key of display value.
      • setDisplayKey

        public void setDisplayKey​(java.lang.String displayID)
        Sets the resource key of display value.
        Parameters:
        displayID - the resource key to set
      • setTestExpression

        public void setTestExpression​(java.lang.String expression)
        sets the expression for this map rule.
        Parameters:
        expression - the expression
      • getTestExpression

        public java.lang.String getTestExpression()
        sets the test expression for this map rule.
        Returns:
        the expression