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 TypeMethodDescriptionvoidAdd an action to the DTD.voidAdd an event to the DTD.voidaddProperty(String rawPropertyName) Add a property to the DTD.voidaddRelationship(String rawRelationshipName) Add a relationship to the DTD.org.eclipse.ditto.wot.model.ThingDescriptiongetDTD()Obtain the Digital Twin Description.booleanremoveAction(String rawActionName) Remove an action from the DTD.booleanremoveEvent(String rawEventName) Remove an event from the DTD.booleanremoveProperty(String rawPropertyName) Remove a property from the DTD.booleanremoveRelationship(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:DTDManagerAdd a property to the DTD.- Specified by:
addPropertyin interfaceDTDManager- Parameters:
rawPropertyName- the raw name of the property to add
-
removeProperty
Description copied from interface:DTDManagerRemove a property from the DTD.- Specified by:
removePropertyin 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:DTDManagerAdd a relationship to the DTD.- Specified by:
addRelationshipin interfaceDTDManager- Parameters:
rawRelationshipName- the raw name of the relationship to add
-
removeRelationship
Description copied from interface:DTDManagerRemove a relationship from the DTD.- Specified by:
removeRelationshipin 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:DTDManagerAdd an action to the DTD.- Specified by:
addActionin interfaceDTDManager- Parameters:
rawActionName- the raw name of the action to add
-
removeAction
Description copied from interface:DTDManagerRemove an action from the DTD.- Specified by:
removeActionin 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:DTDManagerAdd an event to the DTD.- Specified by:
addEventin interfaceDTDManager- Parameters:
rawEventName- the raw name of the event to add
-
removeEvent
Description copied from interface:DTDManagerRemove an event from the DTD.- Specified by:
removeEventin 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:DTDManagerReaderObtain the Digital Twin Description.- Specified by:
getDTDin interfaceDTDManagerReader- Returns:
- Digital Twin Description implemented with a Thing Description
-