Class ParameterObject
- java.lang.Object
-
- fi.tut.mei.capabilityQueryLib.model.CapabilityParameter
-
- fi.tut.mei.capabilityQueryLib.model.ParameterObject
-
public class ParameterObject extends CapabilityParameter
Represents complex parameters capabilities can have such as itemsize which consist of multiple parameters- Author:
- hylli
-
-
Constructor Summary
Constructors Constructor Description ParameterObject(String name)
Construct a ParameterObject with the given name.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addChild(ParameterObject child)
Add a child parameter object.void
addParameterAssociation(ParameterAssociation<Parameter> paramAssoc)
Add a parameter association that connects a simple capability parameter to this parameter object.void
addValueAlternative(ParameterObjectValue alternative)
Add an alternative value for this parameter objectSet<ParameterObject>
getChildren()
Get the child parameter objects.ParameterAssociation<Parameter>
getParameterAssociation(Parameter param)
Get a parameter association for the given parameter.Collection<ParameterAssociation<Parameter>>
getParameterAssociations()
Get all parameter associations of this parameter object.Collection<Parameter>
getParameters()
Deprecated.Consider usinggetParameterAssociations()
insteadParameterObjectValue
getValueAlternative(String uri)
Get a value alternative that corresponds to the given uri from the ontology i.e.Set<ParameterObjectValue>
getValueAlternatives()
Get the value alternatives.-
Methods inherited from class fi.tut.mei.capabilityQueryLib.model.CapabilityParameter
getDescription, getName, setDescription, setName
-
-
-
-
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
-
getParameters
@Deprecated public Collection<Parameter> getParameters()
Deprecated.Consider usinggetParameterAssociations()
insteadGet all of the parameters the ParameterObject consists of- Returns:
- the parameters
-
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
-
-