public abstract class Device extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Device.Type
Represents different device types: individual device, blueprint or device combination
|
Constructor and Description |
---|
Device(String name,
Device.Type type)
Create a device with the given name and type information
|
Modifier and Type | Method and Description |
---|---|
abstract void |
addCapability(Capability capability)
add a device capability
|
abstract void |
addParameterObject(String property,
ParameterObjectValue value,
Capability capability)
Add a ParameterObjectValue for the device.
|
abstract void |
addParameterValue(Parameter param,
Object value,
Capability capability)
Set a value for a parameter.
|
abstract void |
addResourceCapability(ResourceCapability capability)
Add a resource capability to this device.
|
ParameterObjectValue |
getBasicInformation()
Get basic information about this device.
|
Blueprint |
getBlueprint()
get the blueprint the device is based on
|
abstract Set<Capability> |
getCapabilities()
Get the capabilities this device has
|
abstract Collection<String> |
getCapabilityParameterObjectProperties(Capability capability)
Get property names that connect the given capability to its ParameterObjectValues.
|
String |
getDescription()
Get a description of the device.
|
String |
getDescriptionAsPlainText()
Get description text with possible HTML tags removed.
|
List<Device> |
getDevices()
Get the devices this device consists of
|
String |
getName()
get device name
|
abstract Set<ParameterObjectValue> |
getParameterObjectValue(Capability capability,
String property)
Get ParameterObjectValues related to a capability via the given property.
|
abstract Collection<ParameterValue> |
getParameters()
Get parameters and their values for this device.
|
abstract Set<ParameterValue> |
getParameterValuesForCapability(Capability capability)
Get parameter values related to given capability for this device.
|
String |
getRdID()
Get the resource description id of this device.
|
String |
getRdURL()
Get the resource description URL of this device.
|
abstract Collection<ResourceCapability> |
getResourceCapabilities()
Get the resource capabilities of the device.
|
abstract ResourceCapability |
getResourceCapability(Capability capability)
Get a ResourceCapability of this device for the given capability.
|
Device.Type |
getType()
Get the type of the device.
|
void |
setDescription(String description)
Set the device description.
|
void |
setRdID(String rdID)
Set the resource description id of this device.
|
void |
setRdURL(String rdURL)
Set the resource description URL of this device.
|
String |
toString() |
public Device(String name, Device.Type type)
name
- name of the devicetype
- the type of the device.public String getName()
public Device.Type getType()
public String getDescription()
public void setDescription(String description)
description
- the description to setpublic String getDescriptionAsPlainText()
public String getRdID()
public void setRdID(String rdID)
rdID
- the resource description id to setpublic String getRdURL()
public void setRdURL(String rdURL)
rdURL
- resource description URL to setpublic Blueprint getBlueprint()
public ParameterObjectValue getBasicInformation()
public List<Device> getDevices()
public abstract Set<Capability> getCapabilities()
public abstract Collection<ResourceCapability> getResourceCapabilities()
public abstract ResourceCapability getResourceCapability(Capability capability)
capability
- a capabilitypublic abstract void addCapability(Capability capability)
capability
- The capability to be added.public abstract void addResourceCapability(ResourceCapability capability)
addCapability(Capability)
capability
- the resource capabilitypublic abstract void addParameterValue(Parameter param, Object value, Capability capability)
param
- the parameter whose value is setvalue
- the parameter valuecapability
- the capability to which this parameter value is related topublic abstract Collection<ParameterValue> getParameters()
public abstract Set<ParameterValue> getParameterValuesForCapability(Capability capability)
capability
- Capability whose parameter values will be returned.public abstract void addParameterObject(String property, ParameterObjectValue value, Capability capability)
property
- The property name that connects a device capability and the valuevalue
- The parameter object valuecapability
- capability the value is related topublic abstract Collection<String> getCapabilityParameterObjectProperties(Capability capability)
capability
- a capabilitypublic abstract Set<ParameterObjectValue> getParameterObjectValue(Capability capability, String property)
capability
- a capabilityproperty
- a property nameCopyright © 2021 Tampere University (TAU) / Faculty of Engineering and Natural Sciences (ENS) / Automation Technology and Mechanical Engineering (ATME) / Manufacturing and Production Automation. All rights reserved.