Class ParameterObjectValue


  • public class ParameterObjectValue
    extends Object
    This class represents values for ParameterObjects that devices can have for their capabilities.
    Author:
    hylli
    • Constructor Detail

      • ParameterObjectValue

        public ParameterObjectValue​(ParameterObject paramObj)
        Construct a ParameterObjectValue for a given ParameterObject.
        Parameters:
        paramObj - parameter object for which this will have values
    • Method Detail

      • getName

        public String getName()
        The name of this parameter object value.
        Returns:
        the name if this value has been defined in the model for example it is an alternative value for MaterialType. Null if this value is from the instance data where it doesn't have a meaningful name.
      • setName

        public void setName​(String name)
        Name for the parameter object value
        Parameters:
        name - the name to set
      • getUri

        public String getUri()
        The uri of this parameter object value i.e. corresponding individual from ontology.
        Returns:
        the uri if this value has been defined in the model for example it is an alternative value for MaterialType. Null if this value is from the instance data where uri is not needed
      • setUri

        public void setUri​(String uri)
        Parameters:
        uri - the uri to set
      • getParameterObject

        public ParameterObject getParameterObject()
        Get the parameter object this has values for.
        Returns:
        the parameterObject
      • addValue

        public void addValue​(ParameterValue value)
        Add a parameter value that has a value for one of the ParameterObject's members
        Parameters:
        value - The value to be added.
      • addValue

        public void addValue​(Parameter param,
                             Object value)
        Add a value for one of the parameter object's members.
        Parameters:
        param - the member this is a value for
        value - the value
      • setValue

        public void setValue​(Parameter param,
                             Object value)
        Set the value of the given parameter. If there are existing values for this parameter they are first removed.
        Parameters:
        param - parameter whose value is set
        value - the new value for the parameter
      • getValue

        public ParameterValue getValue​(String name)
        Get the value for a parameter object's member by name
        Parameters:
        name - parameter name
        Returns:
        value for the parameter
      • removeParameter

        public boolean removeParameter​(String name)
        Remove the value for the parameter with the given name.
        Parameters:
        name - name of a parameter
        Returns:
        true if there was a value for the parameter false otherwise
      • getValues

        public Collection<ParameterValue> getValues()
        Get all parameter values for the parameter object's members.
        Returns:
        the parameter values