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.
|
abstract Collection<ResourceCapability> |
getResourceCapabilities()
Get the resource capabilities of the device.
|
Device.Type |
getType()
Get the type of the device.
|
void |
setDescription(String description)
Set the device description.
|
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 Blueprint getBlueprint()
public ParameterObjectValue getBasicInformation()
public List<Device> getDevices()
public abstract Set<Capability> getCapabilities()
public abstract Collection<ResourceCapability> getResourceCapabilities()
public 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 © 2017 Tampere University of Technology (TUT) / Laboratory of Mechanical Engineering and Industrial Systems (MEI). All rights reserved.