public abstract class DeviceWithCapabilities extends Device
Device.Type
Constructor and Description |
---|
DeviceWithCapabilities(String name,
Device.Type type)
Create with a given name.
|
Modifier and Type | Method and Description |
---|---|
void |
addCapability(Capability capability)
add a device capability
If the capability has already been added does nothing.
|
void |
addParameterObject(String property,
ParameterObjectValue value,
Capability capability)
Add a ParameterObjectValue for the device.
|
void |
addParameterValue(Parameter param,
Object value,
Capability capability)
Set a value for a parameter.
|
void |
addResourceCapability(ResourceCapability capability)
Add a resource capability to this device.
|
Set<Capability> |
getCapabilities()
get the capabilities this device has
|
Collection<String> |
getCapabilityParameterObjectProperties(Capability capability)
Get property names that connect the given capability to its ParameterObjectValues.
|
Set<ParameterObjectValue> |
getParameterObjectValue(Capability capability,
String property)
Get ParameterObjectValues related to a capability via the given property.
|
Collection<ParameterValue> |
getParameters()
Get parameters and their values for this device.
|
Set<ParameterValue> |
getParameterValuesForCapability(Capability capability)
Get parameter values related to given capability for this device.
|
Collection<ResourceCapability> |
getResourceCapabilities()
Get the resource capabilities of the device.
|
ResourceCapability |
getResourceCapability(Capability capability)
Get a ResourceCapability of this device for the given capability.
|
getBasicInformation, getBlueprint, getDescription, getDescriptionAsPlainText, getDevices, getName, getRdID, getRdURL, getType, setDescription, setRdID, setRdURL, toString
public DeviceWithCapabilities(String name, Device.Type type)
name
- name of the devicetype
- type of the devicepublic Set<Capability> getCapabilities()
getCapabilities
in class Device
public void addCapability(Capability capability)
addCapability
in class Device
capability
- capability to be addedpublic void addResourceCapability(ResourceCapability capability)
Device
Device.addCapability(Capability)
addResourceCapability
in class Device
capability
- the resource capabilitypublic Collection<ResourceCapability> getResourceCapabilities()
Device
getResourceCapabilities
in class Device
public ResourceCapability getResourceCapability(Capability capability)
Device
getResourceCapability
in class Device
capability
- a capabilitypublic void addParameterObject(String property, ParameterObjectValue value, Capability capability)
Device
addParameterObject
in class Device
property
- The property name that connects a device capability and the valuevalue
- The parameter object valuecapability
- capability the value is related topublic Collection<String> getCapabilityParameterObjectProperties(Capability capability)
Device
getCapabilityParameterObjectProperties
in class Device
capability
- a capabilitypublic Set<ParameterObjectValue> getParameterObjectValue(Capability capability, String property)
Device
getParameterObjectValue
in class Device
capability
- a capabilityproperty
- a property namepublic void addParameterValue(Parameter param, Object value, Capability capability)
Device
addParameterValue
in class Device
param
- the parameter whose value is setvalue
- the parameter valuecapability
- the capability to which this parameter value is related topublic Collection<ParameterValue> getParameters()
getParameters
in class Device
public Set<ParameterValue> getParameterValuesForCapability(Capability capability)
getParameterValuesForCapability
in class Device
capability
- Capability whose parameter values will be returned.Copyright © 2017 Tampere University of Technology (TUT) / Laboratory of Mechanical Engineering and Industrial Systems (MEI). All rights reserved.