Class Blueprint
- java.lang.Object
-
- fi.tut.mei.capabilityQueryLib.model.Device
-
- fi.tut.mei.capabilityQueryLib.model.DeviceWithCapabilities
-
- fi.tut.mei.capabilityQueryLib.model.Blueprint
-
public class Blueprint extends DeviceWithCapabilities
Class that represents a device blueprint.- Author:
- hylli
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class fi.tut.mei.capabilityQueryLib.model.Device
Device.Type
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ParameterObjectValue
getBasicInformation()
Get basic information about this device.String
getBlueprintType()
static Set<String>
getBlueprintTypes()
Get all possible types a blueprint can have.static boolean
hasBlueprintType(String type)
Can a blueprint have the given type.void
setBasicInformation(ParameterObjectValue info)
Set basic resource information for this blueprint.void
setBlueprintType(String type)
Set a type for the blueprint.static void
setBlueprintTypes(Set<String> types)
Define the types a blueprint can have.-
Methods inherited from class fi.tut.mei.capabilityQueryLib.model.DeviceWithCapabilities
addCapability, addParameterObject, addParameterValue, addResourceCapability, getCapabilities, getCapabilityParameterObjectProperties, getParameterObjectValue, getParameters, getParameterValuesForCapability, getResourceCapabilities, getResourceCapability
-
Methods inherited from class fi.tut.mei.capabilityQueryLib.model.Device
getBlueprint, getDescription, getDescriptionAsPlainText, getDevices, getName, getRdID, getRdURL, getType, setDescription, setRdID, setRdURL, toString
-
-
-
-
Constructor Detail
-
Blueprint
public Blueprint(String name)
Create a blueprint with the given name.- Parameters:
name
- name of the blueprint
-
-
Method Detail
-
getBlueprintTypes
public static Set<String> getBlueprintTypes()
Get all possible types a blueprint can have. This works only after a Client is created. The contents come from the most recently created Client.- Returns:
- blueprint types
-
setBlueprintTypes
public static void setBlueprintTypes(Set<String> types)
Define the types a blueprint can have.- Parameters:
types
-
-
hasBlueprintType
public static boolean hasBlueprintType(String type)
Can a blueprint have the given type. This works only after a Client is created. The contents come from the most recently created Client.- Parameters:
type
- type name- Returns:
- true if blueprint can have the type false otherwise
-
getBasicInformation
public ParameterObjectValue getBasicInformation()
Description copied from class:Device
Get basic information about this device. This information consists of parameters that are not associated with any capability such as mass.- Overrides:
getBasicInformation
in classDevice
- Returns:
- a ParameterObjectValue representing the basic information. Null if information not available.
-
setBasicInformation
public void setBasicInformation(ParameterObjectValue info)
Set basic resource information for this blueprint.- Parameters:
info
- the basic resource information
-
getBlueprintType
public String getBlueprintType()
-
setBlueprintType
public void setBlueprintType(String type) throws IllegalArgumentException
Set a type for the blueprint.- Parameters:
type
- type for the blueprint- Throws:
IllegalArgumentException
- blueprint cannot have the given type. see getBlueprintTypes for possible types.
-
-