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 TypeMethodDescriptionvoidaddAction(it.wldt.core.state.DigitalTwinStateAction action) Add an action to the DTD.voidaddProperty(it.wldt.core.state.DigitalTwinStateProperty<?> property) Add a property to the DTD.voidaddRelationship(it.wldt.core.state.DigitalTwinStateRelationship<?> relationship) Add a relationship to the DTD.Get the current available actions.org.eclipse.ditto.wot.model.ThingDescriptiongetDTD()Obtain the Digital Twin Description.booleanremoveAction(it.wldt.core.state.DigitalTwinStateAction action) Remove an action from the DTD.booleanremoveProperty(it.wldt.core.state.DigitalTwinStateProperty<?> property) Remove a property from the DTD.booleanremoveRelationship(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:DTDManagerAdd a property to the DTD.- Specified by:
addPropertyin interfaceDTDManager- Parameters:
property- the property to add
-
removeProperty
public boolean removeProperty(it.wldt.core.state.DigitalTwinStateProperty<?> property) Description copied from interface:DTDManagerRemove a property from the DTD.- Specified by:
removePropertyin 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:DTDManagerAdd a relationship to the DTD.- Specified by:
addRelationshipin interfaceDTDManager- Parameters:
relationship- the relationship to add
-
removeRelationship
public boolean removeRelationship(it.wldt.core.state.DigitalTwinStateRelationship<?> relationship) Description copied from interface:DTDManagerRemove a relationship from the DTD.- Specified by:
removeRelationshipin 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:DTDManagerAdd an action to the DTD.- Specified by:
addActionin interfaceDTDManager- Parameters:
action- the action to add
-
removeAction
public boolean removeAction(it.wldt.core.state.DigitalTwinStateAction action) Description copied from interface:DTDManagerRemove an action from the DTD.- Specified by:
removeActionin interfaceDTDManager- Parameters:
action- the action to remove- Returns:
- true is correctly removed, false if not present
-
getAvailableActionIds
Description copied from interface:DTDManagerReaderGet the current available actions.- Specified by:
getAvailableActionIdsin interfaceDTDManagerReader- Returns:
- the available action ids.
-
getDTD
public org.eclipse.ditto.wot.model.ThingDescription getDTD()Description copied from interface:DTDManagerReaderObtain the Digital Twin Description.- Specified by:
getDTDin interfaceDTDManagerReader- Returns:
- Digital Twin Description implemented with a Thing Description
-