java.lang.Object
org.cybergarage.upnp.AllowedValueRange

public class AllowedValueRangeextends Object
Represents an allowed value range constraint for UPnP state variables.

This class encapsulates allowed value range definitions from UPnP service descriptions. It provides XML node management for state variables that have numeric ranges defined as allowed value constraints.

Key features:

  • XML node wrapping for value ranges
  • Element name constant for XML parsing
  • Service description integration
  • State variable constraint management
  • UPnP specification compliance

This class is used by UPnP services to manage allowed value range constraints for state variables, enabling proper validation and description generation for numeric variables with restricted ranges.

  • Field Details

    • ELEM_NAME

      public static final String ELEM_NAME
      XML element name for allowed value range in UPnP descriptions.
      See Also:
    • allowedValueRangeNode

      private Node allowedValueRangeNode
      The underlying XML node containing the allowed value range data.
    • MINIMUM

      private static final String MINIMUM
      XML node name for minimum value.
      See Also:
    • MAXIMUM

      private static final String MAXIMUM
      XML node name for maximum value.
      See Also:
    • STEP

      private static final String STEP
      XML node name for step value.
      See Also:
  • Constructor Details

    • AllowedValueRange

      public AllowedValueRange(Node node)
      Creates an AllowedValueRange from an XML node.
      Parameters:
      node - the XML node containing the allowed value range data
    • AllowedValueRange

      public AllowedValueRange()
      Creates an empty AllowedValueRange with a new node structure.
  • Method Details

    • getAllowedValueRangeNode

      public Node getAllowedValueRangeNode()
      Get the underlying XML node.
      Returns:
      the underlying XML node
    • isAllowedValueRangeNode

      public static boolean isAllowedValueRangeNode(Node node)
      Checks if the given node is an allowedValueRange element.
      Parameters:
      node - the XML node to check
      Returns:
      true if the node is an allowedValueRange element
    • setMinimum

      public void setMinimum(String value)
      Sets the minimum value for this allowed value range.
      Parameters:
      value - the minimum value string to set
    • getMinimum

      public String getMinimum()
      Gets the minimum value for this allowed value range.
      Returns:
      the minimum value as a string
    • setMaximum

      public void setMaximum(String value)
      Sets the maximum value for this allowed value range.
      Parameters:
      value - the maximum value string to set
    • getMaximum

      public String getMaximum()
      Gets the maximum value for this allowed value range.
      Returns:
      the maximum value as a string
    • setStep

      public void setStep(String value)
      Sets the step value for this allowed value range.
      Parameters:
      value - the step value string to set
    • getStep

      public String getStep()
      Gets the step value for this allowed value range.
      Returns:
      the step value as a string