Class ParameterObject


  • public class ParameterObject
    extends CapabilityParameter
    Represents complex parameters capabilities can have such as itemsize which consist of multiple parameters
    Author:
    hylli
    • Constructor Detail

      • ParameterObject

        public ParameterObject​(String name)
        Construct a ParameterObject with the given name.
        Parameters:
        name - the name of the ParameterObject
    • Method Detail

      • addParameterAssociation

        public void addParameterAssociation​(ParameterAssociation<Parameter> paramAssoc)
        Add a parameter association that connects a simple capability parameter to this parameter object.
        Parameters:
        paramAssoc - the parameter association
      • getParameterAssociation

        public ParameterAssociation<Parameter> getParameterAssociation​(Parameter param)
        Get a parameter association for the given parameter.
        Parameters:
        param - a parameter
        Returns:
        a parameter association for the parameter. null if there is no association
      • getParameterAssociations

        public Collection<ParameterAssociation<Parameter>> getParameterAssociations()
        Get all parameter associations of this parameter object.
        Returns:
        all parameter associations
      • getChildren

        public Set<ParameterObject> getChildren()
        Get the child parameter objects. If a capability has a parameter object with children as its parameter those children are alternatives for that parameter. For example workspace can be a cartesian workspace or an articulated workspace.
        Returns:
        the children
      • getValueAlternatives

        public Set<ParameterObjectValue> getValueAlternatives()
        Get the value alternatives. Some parameter objects have a predefined set of alternative values. If this is empty the parameter object can have any value.
        Returns:
        the alternatives
      • getValueAlternative

        public ParameterObjectValue getValueAlternative​(String uri)
        Get a value alternative that corresponds to the given uri from the ontology i.e. uri of some MaterialType instance e.g. wood.
        Parameters:
        uri - Uri of corresponding ontology instance.
        Returns:
        ParameterObjectValue based on the ontology instance whose uri was given.
      • addValueAlternative

        public void addValueAlternative​(ParameterObjectValue alternative)
        Add an alternative value for this parameter object
        Parameters:
        alternative - the alternative
      • addChild

        public void addChild​(ParameterObject child)
        Add a child parameter object. See getChildren for an explanation about parameter object children.
        Parameters:
        child - child parameter object