Class WoTDTDManager
java.lang.Object
io.github.webbasedwodt.DTDManager.impl.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.-
Constructor Summary
ConstructorsConstructorDescriptionWoTDTDManager
(WoDTDigitalAdapterConfiguration configuration, PlatformManagementInterfaceReader platformManagementInterfaceReader) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add an action to the DTD.void
Add an event to the DTD.void
addProperty
(String rawPropertyName) Add a property to the DTD.void
addRelationship
(String rawRelationshipName) Add a relationship to the DTD.org.eclipse.ditto.wot.model.ThingDescription
getDTD()
Obtain the Digital Twin Description.boolean
removeAction
(String rawActionName) Remove an action from the DTD.boolean
removeEvent
(String rawEventName) Remove an event from the DTD.boolean
removeProperty
(String rawPropertyName) Remove a property from the DTD.boolean
removeRelationship
(String rawRelationshipName) Remove a relationship from the DTD.
-
Constructor Details
-
WoTDTDManager
public WoTDTDManager(WoDTDigitalAdapterConfiguration configuration, PlatformManagementInterfaceReader platformManagementInterfaceReader) Default constructor.- Parameters:
configuration
- the adapter configurationplatformManagementInterfaceReader
- the platform management interface reader instance
-
-
Method Details
-
addProperty
Description copied from interface:DTDManager
Add a property to the DTD.- Specified by:
addProperty
in interfaceDTDManager
- Parameters:
rawPropertyName
- the raw name of the property to add
-
removeProperty
Description copied from interface:DTDManager
Remove a property from the DTD.- Specified by:
removeProperty
in interfaceDTDManager
- Parameters:
rawPropertyName
- the raw name of the property to remove- Returns:
- true is correctly removed, false if not present
-
addRelationship
Description copied from interface:DTDManager
Add a relationship to the DTD.- Specified by:
addRelationship
in interfaceDTDManager
- Parameters:
rawRelationshipName
- the raw name of the relationship to add
-
removeRelationship
Description copied from interface:DTDManager
Remove a relationship from the DTD.- Specified by:
removeRelationship
in interfaceDTDManager
- Parameters:
rawRelationshipName
- the raw name of the relationship to remove- Returns:
- true is correctly removed, false if not present
-
addAction
Description copied from interface:DTDManager
Add an action to the DTD.- Specified by:
addAction
in interfaceDTDManager
- Parameters:
rawActionName
- the raw name of the action to add
-
removeAction
Description copied from interface:DTDManager
Remove an action from the DTD.- Specified by:
removeAction
in interfaceDTDManager
- Parameters:
rawActionName
- the raw name of the action to remove- Returns:
- true is correctly removed, false if not present
-
addEvent
Description copied from interface:DTDManager
Add an event to the DTD.- Specified by:
addEvent
in interfaceDTDManager
- Parameters:
rawEventName
- the raw name of the event to add
-
removeEvent
Description copied from interface:DTDManager
Remove an event from the DTD.- Specified by:
removeEvent
in interfaceDTDManager
- Parameters:
rawEventName
- the raw name of the event to remove- Returns:
- true is correctly removed, false if not present
-
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
-