java.lang.Object
org.cybergarage.upnp.AllowedValueRange
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 Summary
Modifier and TypeFieldDescriptionprivate NodeThe underlying XML node containing the allowed value range data.static final StringXML element name for allowed value range in UPnP descriptions.private static final StringXML node name for maximum value.private static final StringXML node name for minimum value.private static final StringXML node name for step value.Constructor Summary
ConstructorsConstructorDescriptionCreates an empty AllowedValueRange with a new node structure.AllowedValueRange(Node node) Creates an AllowedValueRange from an XML node.Method Summary
Modifier and TypeMethodDescriptionGet the underlying XML node.Gets the maximum value for this allowed value range.Gets the minimum value for this allowed value range.getStep()Gets the step value for this allowed value range.static booleanisAllowedValueRangeNode(Node node) Checks if the given node is an allowedValueRange element.voidsetMaximum(String value) Sets the maximum value for this allowed value range.voidsetMinimum(String value) Sets the minimum value for this allowed value range.voidSets the step value for this allowed value range.
Field Details
ELEM_NAME
XML element name for allowed value range in UPnP descriptions.- See Also:
allowedValueRangeNode
The underlying XML node containing the allowed value range data.MINIMUM
MAXIMUM
STEP
Constructor Details
AllowedValueRange
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
isAllowedValueRangeNode
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
Sets the minimum value for this allowed value range.- Parameters:
value- the minimum value string to set
getMinimum
Gets the minimum value for this allowed value range.- Returns:
- the minimum value as a string
setMaximum
Sets the maximum value for this allowed value range.- Parameters:
value- the maximum value string to set
getMaximum
Gets the maximum value for this allowed value range.- Returns:
- the maximum value as a string
setStep
Sets the step value for this allowed value range.- Parameters:
value- the step value string to set
getStep
Gets the step value for this allowed value range.- Returns:
- the step value as a string