java.lang.Object
org.cybergarage.upnp.AllowedValue
Represents an allowed value constraint for UPnP state variables.
This class encapsulates allowed value definitions from UPnP service descriptions. It provides XML node management for state variables that have enumerated or restricted value sets defined in their service descriptions.
Key features:
- XML node wrapping for allowed values
- 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 constraints for state variables, enabling proper validation and description generation for variables with restricted value sets.
Field Summary
Constructor Summary
ConstructorsConstructorDescriptionAllowedValue(String value) Create an AllowedValue by the value String, and will create the Node structure by itselfAllowedValue(Node node) Create an AllowedValue wrapping the given XML node.Method Summary
Modifier and TypeMethodDescriptionGet the underlying XML node.getValue()Get the value string.static booleanisAllowedValueNode(Node node) Checks if the given node is an allowedValue element.voidSets the value for this allowed value element.
Field Details
ELEM_NAME
XML element name for allowed value in UPnP descriptions.- See Also:
allowedValueNode
The underlying XML node containing the allowed value data.
Constructor Details
AllowedValue
Create an AllowedValue wrapping the given XML node.- Parameters:
node- the XML node containing the allowed value
AllowedValue
Create an AllowedValue by the value String, and will create the Node structure by itself- Parameters:
value- The value that will be associate to this object
Method Details
getAllowedValueNode
isAllowedValueNode
Checks if the given node is an allowedValue element.- Parameters:
node- the XML node to check- Returns:
- true if the node is an allowedValue element
setValue
Sets the value for this allowed value element.- Parameters:
value- the value string to set
getValue