Class WoTDTDManager

java.lang.Object
io.github.webbasedwodt.adapter.WoTDTDManager
All Implemented Interfaces:
DTDManager, DTDManagerReader

public final class WoTDTDManager extends Object implements DTDManager
This class provide an implementation of the DTDManager using a WoT Thing Description to implement the Digital Twin Description.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    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
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 interface DTDManager
      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 interface DTDManager
      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 interface DTDManager
      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 interface DTDManager
      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 interface DTDManager
      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 interface DTDManager
      Parameters:
      action - the action to remove
      Returns:
      true is correctly removed, false if not present
    • getAvailableActionIds

      public Set<String> getAvailableActionIds()
      Description copied from interface: DTDManagerReader
      Get the current available actions.
      Specified by:
      getAvailableActionIds in interface DTDManagerReader
      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 interface DTDManagerReader
      Returns:
      Digital Twin Description implemented with a Thing Description