Package io.github.webbasedwodt.adapter
Class WoTDTDManager
java.lang.Object
io.github.webbasedwodt.adapter.WoTDTDManager
- All Implemented Interfaces:
DTDManager
,DTDManagerReader
This class provide an implementation of the
DTDManager
using
a WoT Thing Description to implement the Digital Twin Description.-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAction
(it.wldt.core.state.DigitalTwinStateAction action) Add an action to the DTD.void
addProperty
(it.wldt.core.state.DigitalTwinStateProperty<?> property) Add a property to the DTD.void
addRelationship
(it.wldt.core.state.DigitalTwinStateRelationship<?> relationship) Add a relationship to the DTD.Get the current available actions.org.eclipse.ditto.wot.model.ThingDescription
getDTD()
Obtain the Digital Twin Description.boolean
removeAction
(it.wldt.core.state.DigitalTwinStateAction action) Remove an action from the DTD.boolean
removeProperty
(it.wldt.core.state.DigitalTwinStateProperty<?> property) Remove a property from the DTD.boolean
removeRelationship
(it.wldt.core.state.DigitalTwinStateRelationship<?> relationship) Remove a relationship from the DTD.
-
Method Details
-
addProperty
public void addProperty(it.wldt.core.state.DigitalTwinStateProperty<?> property) Description copied from interface:DTDManager
Add a property to the DTD.- Specified by:
addProperty
in interfaceDTDManager
- Parameters:
property
- the property to add
-
removeProperty
public boolean removeProperty(it.wldt.core.state.DigitalTwinStateProperty<?> property) Description copied from interface:DTDManager
Remove a property from the DTD.- Specified by:
removeProperty
in interfaceDTDManager
- Parameters:
property
- the property to remove- Returns:
- true is correctly removed, false if not present
-
addRelationship
public void addRelationship(it.wldt.core.state.DigitalTwinStateRelationship<?> relationship) Description copied from interface:DTDManager
Add a relationship to the DTD.- Specified by:
addRelationship
in interfaceDTDManager
- Parameters:
relationship
- the relationship to add
-
removeRelationship
public boolean removeRelationship(it.wldt.core.state.DigitalTwinStateRelationship<?> relationship) Description copied from interface:DTDManager
Remove a relationship from the DTD.- Specified by:
removeRelationship
in interfaceDTDManager
- Parameters:
relationship
- the relationship to remove- Returns:
- true is correctly removed, false if not present
-
addAction
public void addAction(it.wldt.core.state.DigitalTwinStateAction action) Description copied from interface:DTDManager
Add an action to the DTD.- Specified by:
addAction
in interfaceDTDManager
- Parameters:
action
- the action to add
-
removeAction
public boolean removeAction(it.wldt.core.state.DigitalTwinStateAction action) Description copied from interface:DTDManager
Remove an action from the DTD.- Specified by:
removeAction
in interfaceDTDManager
- Parameters:
action
- the action to remove- Returns:
- true is correctly removed, false if not present
-
getAvailableActionIds
Description copied from interface:DTDManagerReader
Get the current available actions.- Specified by:
getAvailableActionIds
in interfaceDTDManagerReader
- Returns:
- the available action ids.
-
getDTD
public org.eclipse.ditto.wot.model.ThingDescription getDTD()Description copied from interface:DTDManagerReader
Obtain the Digital Twin Description.- Specified by:
getDTD
in interfaceDTDManagerReader
- Returns:
- Digital Twin Description implemented with a Thing Description
-