]> git.basschouten.com Git - openhab-addons.git/commitdiff
[denonmarantz] Add null annotations (#16757)
authorJacob Laursen <jacob-github@vindvejr.dk>
Mon, 13 May 2024 20:51:04 +0000 (22:51 +0200)
committerGitHub <noreply@github.com>
Mon, 13 May 2024 20:51:04 +0000 (22:51 +0200)
* Add null annotations

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
41 files changed:
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/DenonMarantzBindingConstants.java
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/DenonMarantzState.java
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/UnsupportedCommandTypeException.java
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/config/DenonMarantzConfiguration.java
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/connector/DenonMarantzConnector.java
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/connector/DenonMarantzConnectorFactory.java
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/connector/http/DenonMarantzHttpConnector.java
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/connector/telnet/DenonMarantzTelnetClientThread.java
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/connector/telnet/DenonMarantzTelnetConnector.java
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/connector/telnet/DenonMarantzTelnetListener.java
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/adapters/OnOffAdapter.java
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/adapters/StringAdapter.java
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/adapters/VolumeAdapter.java
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/Deviceinfo.java [new file with mode: 0644]
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/Main.java [new file with mode: 0644]
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/ZoneStatus.java [new file with mode: 0644]
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/ZoneStatusLite.java [new file with mode: 0644]
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/commands/AppCommandRequest.java [new file with mode: 0644]
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/commands/AppCommandResponse.java [new file with mode: 0644]
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/commands/CommandRx.java [new file with mode: 0644]
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/commands/CommandTx.java [new file with mode: 0644]
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/commands/DeletedSourceList.java [new file with mode: 0644]
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/commands/RenameSourceList.java [new file with mode: 0644]
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/commands/Text.java [new file with mode: 0644]
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/types/OnOffType.java [new file with mode: 0644]
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/types/StringType.java [new file with mode: 0644]
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/types/VolumeType.java [new file with mode: 0644]
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/Deviceinfo.java [deleted file]
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/Main.java [deleted file]
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/ZoneStatus.java [deleted file]
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/ZoneStatusLite.java [deleted file]
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/commands/AppCommandRequest.java [deleted file]
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/commands/AppCommandResponse.java [deleted file]
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/commands/CommandRx.java [deleted file]
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/commands/CommandTx.java [deleted file]
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/commands/DeletedSourceList.java [deleted file]
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/commands/RenameSourceList.java [deleted file]
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/commands/Text.java [deleted file]
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/types/OnOffType.java [deleted file]
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/types/StringType.java [deleted file]
bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/types/VolumeType.java [deleted file]

index 8da35e9163669f00237a25a840b977e87b921aba..ae29e8523c6e60e5decf2c552b285929932e5793 100644 (file)
@@ -17,6 +17,7 @@ import java.util.HashMap;
 import java.util.LinkedHashMap;
 import java.util.Map;
 
+import org.eclipse.jdt.annotation.NonNullByDefault;
 import org.openhab.core.thing.ThingTypeUID;
 import org.openhab.core.thing.type.ChannelTypeUID;
 
@@ -26,6 +27,7 @@ import org.openhab.core.thing.type.ChannelTypeUID;
  *
  * @author Jan-Willem Veldhuis - Initial contribution
  */
+@NonNullByDefault
 public class DenonMarantzBindingConstants {
 
     public static final String BINDING_ID = "denonmarantz";
index 63de251768cded54ab321f7ea74e64de1669e32a..d79e8e263cef31e3d5e32ec2461e55cef238c186 100644 (file)
@@ -14,6 +14,8 @@ package org.openhab.binding.denonmarantz.internal;
 
 import java.math.BigDecimal;
 
+import org.eclipse.jdt.annotation.NonNullByDefault;
+import org.eclipse.jdt.annotation.Nullable;
 import org.openhab.core.library.types.DecimalType;
 import org.openhab.core.library.types.OnOffType;
 import org.openhab.core.library.types.PercentType;
@@ -26,38 +28,39 @@ import org.openhab.core.types.State;
  * @author Jan-Willem Veldhuis - Initial contribution
  *
  */
+@NonNullByDefault
 public class DenonMarantzState {
 
-    private State power;
-    private State mainZonePower;
-    private State mute;
-    private State mainVolume;
-    private State mainVolumeDB;
-    private State input;
-    private State surroundProgram;
+    private @Nullable State power;
+    private @Nullable State mainZonePower;
+    private @Nullable State mute;
+    private @Nullable State mainVolume;
+    private @Nullable State mainVolumeDB;
+    private @Nullable State input;
+    private @Nullable State surroundProgram;
 
-    private State artist;
-    private State album;
-    private State track;
+    private @Nullable State artist;
+    private @Nullable State album;
+    private @Nullable State track;
 
     // ------ Zones ------
-    private State zone2Power;
-    private State zone2Volume;
-    private State zone2VolumeDB;
-    private State zone2Mute;
-    private State zone2Input;
-
-    private State zone3Power;
-    private State zone3Volume;
-    private State zone3VolumeDB;
-    private State zone3Mute;
-    private State zone3Input;
-
-    private State zone4Power;
-    private State zone4Volume;
-    private State zone4VolumeDB;
-    private State zone4Mute;
-    private State zone4Input;
+    private @Nullable State zone2Power;
+    private @Nullable State zone2Volume;
+    private @Nullable State zone2VolumeDB;
+    private @Nullable State zone2Mute;
+    private @Nullable State zone2Input;
+
+    private @Nullable State zone3Power;
+    private @Nullable State zone3Volume;
+    private @Nullable State zone3VolumeDB;
+    private @Nullable State zone3Mute;
+    private @Nullable State zone3Input;
+
+    private @Nullable State zone4Power;
+    private @Nullable State zone4Volume;
+    private @Nullable State zone4VolumeDB;
+    private @Nullable State zone4Mute;
+    private @Nullable State zone4Input;
 
     private DenonMarantzStateChangedListener handler;
 
@@ -69,7 +72,7 @@ public class DenonMarantzState {
         handler.connectionError(errorMessage);
     }
 
-    public State getStateForChannelID(String channelID) {
+    public @Nullable State getStateForChannelID(String channelID) {
         switch (channelID) {
             case DenonMarantzBindingConstants.CHANNEL_POWER:
                 return power;
@@ -135,7 +138,7 @@ public class DenonMarantzState {
         OnOffType newVal = OnOffType.from(power);
         if (newVal != this.power) {
             this.power = newVal;
-            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_POWER, this.power);
+            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_POWER, newVal);
         }
     }
 
@@ -143,7 +146,7 @@ public class DenonMarantzState {
         OnOffType newVal = OnOffType.from(mainPower);
         if (newVal != this.mainZonePower) {
             this.mainZonePower = newVal;
-            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_MAIN_ZONE_POWER, this.mainZonePower);
+            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_MAIN_ZONE_POWER, newVal);
         }
     }
 
@@ -151,7 +154,7 @@ public class DenonMarantzState {
         OnOffType newVal = OnOffType.from(mute);
         if (newVal != this.mute) {
             this.mute = newVal;
-            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_MUTE, this.mute);
+            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_MUTE, newVal);
         }
     }
 
@@ -159,10 +162,11 @@ public class DenonMarantzState {
         PercentType newVal = new PercentType(volume);
         if (!newVal.equals(this.mainVolume)) {
             this.mainVolume = newVal;
-            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_MAIN_VOLUME, this.mainVolume);
+            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_MAIN_VOLUME, newVal);
             // update the main volume in dB too
-            this.mainVolumeDB = DecimalType.valueOf(volume.subtract(DenonMarantzBindingConstants.DB_OFFSET).toString());
-            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_MAIN_VOLUME_DB, this.mainVolumeDB);
+            State mainVolumeDB = this.mainVolumeDB = DecimalType
+                    .valueOf(volume.subtract(DenonMarantzBindingConstants.DB_OFFSET).toString());
+            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_MAIN_VOLUME_DB, mainVolumeDB);
         }
     }
 
@@ -170,7 +174,7 @@ public class DenonMarantzState {
         StringType newVal = StringType.valueOf(input);
         if (!newVal.equals(this.input)) {
             this.input = newVal;
-            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_INPUT, this.input);
+            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_INPUT, newVal);
         }
     }
 
@@ -178,31 +182,31 @@ public class DenonMarantzState {
         StringType newVal = StringType.valueOf(surroundProgram);
         if (!newVal.equals(this.surroundProgram)) {
             this.surroundProgram = newVal;
-            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_SURROUND_PROGRAM, this.surroundProgram);
+            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_SURROUND_PROGRAM, newVal);
         }
     }
 
     public void setNowPlayingArtist(String artist) {
-        StringType newVal = artist == null || artist.isBlank() ? StringType.EMPTY : StringType.valueOf(artist);
+        StringType newVal = artist.isBlank() ? StringType.EMPTY : StringType.valueOf(artist);
         if (!newVal.equals(this.artist)) {
             this.artist = newVal;
-            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_NOW_PLAYING_ARTIST, this.artist);
+            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_NOW_PLAYING_ARTIST, newVal);
         }
     }
 
     public void setNowPlayingAlbum(String album) {
-        StringType newVal = album == null || album.isBlank() ? StringType.EMPTY : StringType.valueOf(album);
+        StringType newVal = album.isBlank() ? StringType.EMPTY : StringType.valueOf(album);
         if (!newVal.equals(this.album)) {
             this.album = newVal;
-            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_NOW_PLAYING_ALBUM, this.album);
+            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_NOW_PLAYING_ALBUM, newVal);
         }
     }
 
     public void setNowPlayingTrack(String track) {
-        StringType newVal = track == null || track.isBlank() ? StringType.EMPTY : StringType.valueOf(track);
+        StringType newVal = track.isBlank() ? StringType.EMPTY : StringType.valueOf(track);
         if (!newVal.equals(this.track)) {
             this.track = newVal;
-            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_NOW_PLAYING_TRACK, this.track);
+            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_NOW_PLAYING_TRACK, newVal);
         }
     }
 
@@ -210,7 +214,7 @@ public class DenonMarantzState {
         OnOffType newVal = OnOffType.from(power);
         if (newVal != this.zone2Power) {
             this.zone2Power = newVal;
-            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_ZONE2_POWER, this.zone2Power);
+            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_ZONE2_POWER, newVal);
         }
     }
 
@@ -218,11 +222,11 @@ public class DenonMarantzState {
         PercentType newVal = new PercentType(volume);
         if (!newVal.equals(this.zone2Volume)) {
             this.zone2Volume = newVal;
-            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_ZONE2_VOLUME, this.zone2Volume);
+            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_ZONE2_VOLUME, newVal);
             // update the volume in dB too
-            this.zone2VolumeDB = DecimalType
+            State zone2VolumeDB = this.zone2VolumeDB = DecimalType
                     .valueOf(volume.subtract(DenonMarantzBindingConstants.DB_OFFSET).toString());
-            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_ZONE2_VOLUME_DB, this.zone2VolumeDB);
+            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_ZONE2_VOLUME_DB, zone2VolumeDB);
         }
     }
 
@@ -230,7 +234,7 @@ public class DenonMarantzState {
         OnOffType newVal = OnOffType.from(mute);
         if (newVal != this.zone2Mute) {
             this.zone2Mute = newVal;
-            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_ZONE2_MUTE, this.zone2Mute);
+            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_ZONE2_MUTE, newVal);
         }
     }
 
@@ -238,7 +242,7 @@ public class DenonMarantzState {
         StringType newVal = StringType.valueOf(zone2Input);
         if (!newVal.equals(this.zone2Input)) {
             this.zone2Input = newVal;
-            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_ZONE2_INPUT, this.zone2Input);
+            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_ZONE2_INPUT, newVal);
         }
     }
 
@@ -246,7 +250,7 @@ public class DenonMarantzState {
         OnOffType newVal = OnOffType.from(power);
         if (newVal != this.zone3Power) {
             this.zone3Power = newVal;
-            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_ZONE3_POWER, this.zone3Power);
+            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_ZONE3_POWER, newVal);
         }
     }
 
@@ -254,11 +258,11 @@ public class DenonMarantzState {
         PercentType newVal = new PercentType(volume);
         if (!newVal.equals(this.zone3Volume)) {
             this.zone3Volume = newVal;
-            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_ZONE3_VOLUME, this.zone3Volume);
+            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_ZONE3_VOLUME, newVal);
             // update the volume in dB too
-            this.zone3VolumeDB = DecimalType
+            State zone3VolumeDB = this.zone3VolumeDB = DecimalType
                     .valueOf(volume.subtract(DenonMarantzBindingConstants.DB_OFFSET).toString());
-            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_ZONE3_VOLUME_DB, this.zone3VolumeDB);
+            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_ZONE3_VOLUME_DB, zone3VolumeDB);
         }
     }
 
@@ -266,7 +270,7 @@ public class DenonMarantzState {
         OnOffType newVal = OnOffType.from(mute);
         if (newVal != this.zone3Mute) {
             this.zone3Mute = newVal;
-            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_ZONE3_MUTE, this.zone3Mute);
+            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_ZONE3_MUTE, newVal);
         }
     }
 
@@ -274,7 +278,7 @@ public class DenonMarantzState {
         StringType newVal = StringType.valueOf(zone3Input);
         if (!newVal.equals(this.zone3Input)) {
             this.zone3Input = newVal;
-            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_ZONE2_INPUT, this.zone3Input);
+            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_ZONE2_INPUT, newVal);
         }
     }
 
@@ -282,7 +286,7 @@ public class DenonMarantzState {
         OnOffType newVal = OnOffType.from(power);
         if (newVal != this.zone4Power) {
             this.zone4Power = newVal;
-            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_ZONE4_POWER, this.zone4Power);
+            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_ZONE4_POWER, newVal);
         }
     }
 
@@ -290,11 +294,11 @@ public class DenonMarantzState {
         PercentType newVal = new PercentType(volume);
         if (!newVal.equals(this.zone4Volume)) {
             this.zone4Volume = newVal;
-            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_ZONE4_VOLUME, this.zone4Volume);
+            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_ZONE4_VOLUME, newVal);
             // update the volume in dB too
-            this.zone4VolumeDB = DecimalType
+            State zone4VolumeDB = this.zone4VolumeDB = DecimalType
                     .valueOf(volume.subtract(DenonMarantzBindingConstants.DB_OFFSET).toString());
-            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_ZONE4_VOLUME_DB, this.zone4VolumeDB);
+            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_ZONE4_VOLUME_DB, zone4VolumeDB);
         }
     }
 
@@ -302,7 +306,7 @@ public class DenonMarantzState {
         OnOffType newVal = OnOffType.from(mute);
         if (newVal != this.zone4Mute) {
             this.zone4Mute = newVal;
-            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_ZONE4_MUTE, this.zone4Mute);
+            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_ZONE4_MUTE, newVal);
         }
     }
 
@@ -310,7 +314,7 @@ public class DenonMarantzState {
         StringType newVal = StringType.valueOf(zone4Input);
         if (!newVal.equals(this.zone4Input)) {
             this.zone4Input = newVal;
-            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_ZONE4_INPUT, this.zone4Input);
+            handler.stateChanged(DenonMarantzBindingConstants.CHANNEL_ZONE4_INPUT, newVal);
         }
     }
 }
index c2a070d815beb00aebbf1e5b06f16dcb8b2bc176..c14130ba81669ec1f9b8869bc1dce70393400b96 100644 (file)
  */
 package org.openhab.binding.denonmarantz.internal;
 
+import org.eclipse.jdt.annotation.NonNullByDefault;
+
 /**
  * Exception thrown when an unsupported command type is sent to a channel.
  *
  * @author Jan-Willem Veldhuis - Initial contribution
  *
  */
+@NonNullByDefault
 public class UnsupportedCommandTypeException extends Exception {
 
     private static final long serialVersionUID = 42L;
index 2e86c789c0d9f21b4aaf2577658ddfa2a3be225d..6c2514d5168260274d06276e93ea9f5ccf83c314 100644 (file)
@@ -15,7 +15,8 @@ package org.openhab.binding.denonmarantz.internal.config;
 import java.math.BigDecimal;
 import java.util.List;
 
-import org.openhab.binding.denonmarantz.internal.connector.DenonMarantzConnector;
+import org.eclipse.jdt.annotation.NonNullByDefault;
+import org.eclipse.jdt.annotation.Nullable;
 
 /**
  * Configuration class for the Denon Marantz binding.
@@ -23,43 +24,42 @@ import org.openhab.binding.denonmarantz.internal.connector.DenonMarantzConnector
  * @author Jan-Willem Veldhuis - Initial contribution
  *
  */
+@NonNullByDefault
 public class DenonMarantzConfiguration {
 
     /**
      * The hostname (or IP Address) of the Denon Marantz AVR
      */
-    public String host;
+    public String host = "";
 
     /**
      * Whether Telnet communication is enabled
      */
-    public Boolean telnetEnabled;
+    public @Nullable Boolean telnetEnabled;
 
     /**
      * The telnet port
      */
-    public Integer telnetPort;
+    public Integer telnetPort = 23;
 
     /**
      * The HTTP port
      */
-    public Integer httpPort;
+    public Integer httpPort = 80;
 
     /**
      * The interval to poll the AVR over HTTP for changes
      */
-    public Integer httpPollingInterval;
+    public Integer httpPollingInterval = 5;
 
     // Default maximum volume
     public static final BigDecimal MAX_VOLUME = new BigDecimal("98");
 
-    private DenonMarantzConnector connector;
-
-    private Integer zoneCount;
+    private Integer zoneCount = 2;
 
     private BigDecimal mainVolumeMax = MAX_VOLUME;
 
-    public List<String> inputOptions;
+    public @Nullable List<String> inputOptions;
 
     public String getHost() {
         return host;
@@ -69,7 +69,7 @@ public class DenonMarantzConfiguration {
         this.host = host;
     }
 
-    public Boolean isTelnet() {
+    public @Nullable Boolean isTelnet() {
         return telnetEnabled;
     }
 
@@ -93,14 +93,6 @@ public class DenonMarantzConfiguration {
         this.httpPort = httpPort;
     }
 
-    public DenonMarantzConnector getConnector() {
-        return connector;
-    }
-
-    public void setConnector(DenonMarantzConnector connector) {
-        this.connector = connector;
-    }
-
     public BigDecimal getMainVolumeMax() {
         return mainVolumeMax;
     }
index d46bdea2d2bc8b7f05d465881a53281789aba050..c9d99c0d5917a4241bdbfae25eb88909d5de0cc1 100644 (file)
@@ -18,6 +18,7 @@ import java.math.BigDecimal;
 import java.math.RoundingMode;
 import java.util.concurrent.ScheduledExecutorService;
 
+import org.eclipse.jdt.annotation.NonNullByDefault;
 import org.openhab.binding.denonmarantz.internal.DenonMarantzState;
 import org.openhab.binding.denonmarantz.internal.UnsupportedCommandTypeException;
 import org.openhab.binding.denonmarantz.internal.config.DenonMarantzConfiguration;
@@ -34,6 +35,7 @@ import org.openhab.core.types.RefreshType;
  *
  * @author Jan-Willem Veldhuis - Initial contribution
  */
+@NonNullByDefault
 public abstract class DenonMarantzConnector {
 
     private static final BigDecimal POINTFIVE = new BigDecimal("0.5");
@@ -47,6 +49,13 @@ public abstract class DenonMarantzConnector {
 
     protected abstract void internalSendCommand(String command);
 
+    public DenonMarantzConnector(DenonMarantzConfiguration config, ScheduledExecutorService scheduler,
+            DenonMarantzState state) {
+        this.config = config;
+        this.scheduler = scheduler;
+        this.state = state;
+    }
+
     public void sendCustomCommand(Command command) throws UnsupportedCommandTypeException {
         String cmd;
         if (command instanceof StringType) {
index 403e97427ea6eb9e245a7d208a1ad45612f90b3b..8aaeefac8fee440e68aaaa59fd5654d9b59f56f2 100644 (file)
@@ -14,6 +14,7 @@ package org.openhab.binding.denonmarantz.internal.connector;
 
 import java.util.concurrent.ScheduledExecutorService;
 
+import org.eclipse.jdt.annotation.NonNullByDefault;
 import org.eclipse.jetty.client.HttpClient;
 import org.openhab.binding.denonmarantz.internal.DenonMarantzState;
 import org.openhab.binding.denonmarantz.internal.config.DenonMarantzConfiguration;
@@ -26,11 +27,13 @@ import org.openhab.binding.denonmarantz.internal.connector.telnet.DenonMarantzTe
  *
  * @author Jan-Willem Veldhuis - Initial contribution
  */
+@NonNullByDefault
 public class DenonMarantzConnectorFactory {
 
     public DenonMarantzConnector getConnector(DenonMarantzConfiguration config, DenonMarantzState state,
             ScheduledExecutorService scheduler, HttpClient httpClient, String thingUID) {
-        if (config.isTelnet()) {
+        Boolean isTelnet = config.isTelnet();
+        if (isTelnet != null && isTelnet) {
             return new DenonMarantzTelnetConnector(config, state, scheduler, thingUID);
         } else {
             return new DenonMarantzHttpConnector(config, state, scheduler, httpClient);
index 7a4a5ac079fe5df7b1750d82cf5753cc8459993f..37be5ec3073ce8260347aae1f2cbaf3e58707ea8 100644 (file)
@@ -32,6 +32,7 @@ import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.util.StreamReaderDelegate;
 
+import org.eclipse.jdt.annotation.NonNullByDefault;
 import org.eclipse.jdt.annotation.Nullable;
 import org.eclipse.jetty.client.HttpClient;
 import org.eclipse.jetty.client.api.Response;
@@ -39,14 +40,14 @@ import org.eclipse.jetty.client.api.Result;
 import org.openhab.binding.denonmarantz.internal.DenonMarantzState;
 import org.openhab.binding.denonmarantz.internal.config.DenonMarantzConfiguration;
 import org.openhab.binding.denonmarantz.internal.connector.DenonMarantzConnector;
-import org.openhab.binding.denonmarantz.internal.xml.entities.Deviceinfo;
-import org.openhab.binding.denonmarantz.internal.xml.entities.Main;
-import org.openhab.binding.denonmarantz.internal.xml.entities.ZoneStatus;
-import org.openhab.binding.denonmarantz.internal.xml.entities.ZoneStatusLite;
-import org.openhab.binding.denonmarantz.internal.xml.entities.commands.AppCommandRequest;
-import org.openhab.binding.denonmarantz.internal.xml.entities.commands.AppCommandResponse;
-import org.openhab.binding.denonmarantz.internal.xml.entities.commands.CommandRx;
-import org.openhab.binding.denonmarantz.internal.xml.entities.commands.CommandTx;
+import org.openhab.binding.denonmarantz.internal.xml.dto.Deviceinfo;
+import org.openhab.binding.denonmarantz.internal.xml.dto.Main;
+import org.openhab.binding.denonmarantz.internal.xml.dto.ZoneStatus;
+import org.openhab.binding.denonmarantz.internal.xml.dto.ZoneStatusLite;
+import org.openhab.binding.denonmarantz.internal.xml.dto.commands.AppCommandRequest;
+import org.openhab.binding.denonmarantz.internal.xml.dto.commands.AppCommandResponse;
+import org.openhab.binding.denonmarantz.internal.xml.dto.commands.CommandRx;
+import org.openhab.binding.denonmarantz.internal.xml.dto.commands.CommandTx;
 import org.openhab.core.io.net.http.HttpUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -59,6 +60,7 @@ import org.slf4j.LoggerFactory;
  * @author Jeroen Idserda - Initial Contribution (1.x Binding)
  * @author Jan-Willem Veldhuis - Refactored for 2.x
  */
+@NonNullByDefault
 public class DenonMarantzHttpConnector extends DenonMarantzConnector {
 
     private Logger logger = LoggerFactory.getLogger(DenonMarantzHttpConnector.class);
@@ -88,13 +90,11 @@ public class DenonMarantzHttpConnector extends DenonMarantzConnector {
 
     private final HttpClient httpClient;
 
-    private ScheduledFuture<?> pollingJob;
+    private @Nullable ScheduledFuture<?> pollingJob;
 
     public DenonMarantzHttpConnector(DenonMarantzConfiguration config, DenonMarantzState state,
             ScheduledExecutorService scheduler, HttpClient httpClient) {
-        this.config = config;
-        this.scheduler = scheduler;
-        this.state = state;
+        super(config, scheduler, state);
         this.cmdUrl = String.format("http://%s:%d/goform/formiPhoneAppDirect.xml?", config.getHost(),
                 config.getHttpPort());
         this.statusUrl = String.format("http://%s:%d/goform/", config.getHost(), config.getHttpPort());
@@ -143,11 +143,13 @@ public class DenonMarantzHttpConnector extends DenonMarantzConnector {
     }
 
     private boolean isPolling() {
+        ScheduledFuture<?> pollingJob = this.pollingJob;
         return pollingJob != null && !pollingJob.isCancelled();
     }
 
     private void stopPolling() {
-        if (isPolling()) {
+        ScheduledFuture<?> pollingJob = this.pollingJob;
+        if (pollingJob != null) {
             pollingJob.cancel(true);
             logger.debug("HTTP polling stopped.");
         }
@@ -166,7 +168,7 @@ public class DenonMarantzHttpConnector extends DenonMarantzConnector {
     @Override
     protected void internalSendCommand(String command) {
         logger.debug("Sending command '{}'", command);
-        if (command == null || command.isBlank()) {
+        if (command.isBlank()) {
             logger.warn("Trying to send empty command");
             return;
         }
@@ -176,8 +178,8 @@ public class DenonMarantzHttpConnector extends DenonMarantzConnector {
 
         httpClient.newRequest(url).timeout(5, TimeUnit.SECONDS).send(new Response.CompleteListener() {
             @Override
-            public void onComplete(Result result) {
-                if (result.getResponse().getStatus() != 200) {
+            public void onComplete(@Nullable Result result) {
+                if (result != null && result.getResponse().getStatus() != 200) {
                     logger.warn("Error {} while sending command", result.getResponse().getReason());
                 }
             }
@@ -255,11 +257,21 @@ public class DenonMarantzHttpConnector extends DenonMarantzConnector {
         AppCommandRequest request = AppCommandRequest.of(CommandTx.CMD_NET_STATUS);
         AppCommandResponse response = postDocument(url, AppCommandResponse.class, request);
 
-        if (response != null) {
-            CommandRx titleInfo = response.getCommands().get(0);
-            state.setNowPlayingArtist(titleInfo.getText("artist"));
-            state.setNowPlayingAlbum(titleInfo.getText("album"));
-            state.setNowPlayingTrack(titleInfo.getText("track"));
+        if (response == null) {
+            return;
+        }
+        CommandRx titleInfo = response.getCommands().get(0);
+        String artist = titleInfo.getText("artist");
+        if (artist != null) {
+            state.setNowPlayingArtist(artist);
+        }
+        String album = titleInfo.getText("album");
+        if (album != null) {
+            state.setNowPlayingAlbum(album);
+        }
+        String track = titleInfo.getText("track");
+        if (track != null) {
+            state.setNowPlayingTrack(track);
         }
     }
 
index bd705523d495da345b0bddac493eebd9df991f77..69ac85b926e7d1f175792f534ca67cb9b1969ffd 100644 (file)
@@ -20,6 +20,7 @@ import java.net.InetSocketAddress;
 import java.net.Socket;
 import java.net.SocketTimeoutException;
 
+import org.eclipse.jdt.annotation.NonNullByDefault;
 import org.eclipse.jdt.annotation.Nullable;
 import org.openhab.binding.denonmarantz.internal.config.DenonMarantzConfiguration;
 import org.slf4j.Logger;
@@ -31,6 +32,7 @@ import org.slf4j.LoggerFactory;
  * @author Jeroen Idserda - Initial contribution (1.x Binding)
  * @author Jan-Willem Veldhuis - Refactored for 2.x
  */
+@NonNullByDefault
 public class DenonMarantzTelnetClientThread extends Thread {
 
     private Logger logger = LoggerFactory.getLogger(DenonMarantzTelnetClientThread.class);
@@ -45,9 +47,9 @@ public class DenonMarantzTelnetClientThread extends Thread {
 
     private boolean connected = false;
 
-    private Socket socket;
+    private @Nullable Socket socket;
 
-    private OutputStreamWriter out;
+    private @Nullable OutputStreamWriter out;
 
     private @Nullable BufferedReader in;
 
@@ -84,12 +86,15 @@ public class DenonMarantzTelnetClientThread extends Thread {
                 } catch (SocketTimeoutException e) {
                     logger.trace("Socket timeout");
                     // Disconnects are not always detected unless you write to the socket.
-                    try {
-                        out.write('\r');
-                        out.flush();
-                    } catch (IOException e2) {
-                        logger.debug("Error writing to socket");
-                        connected = false;
+                    OutputStreamWriter out = this.out;
+                    if (out != null) {
+                        try {
+                            out.write('\r');
+                            out.flush();
+                        } catch (IOException e2) {
+                            logger.debug("Error writing to socket");
+                            connected = false;
+                        }
                     }
                 } catch (IOException e) {
                     if (!isInterrupted()) {
@@ -106,6 +111,7 @@ public class DenonMarantzTelnetClientThread extends Thread {
     }
 
     public void sendCommand(String command) {
+        OutputStreamWriter out = this.out;
         if (out != null) {
             try {
                 out.write(command + '\r');
@@ -126,6 +132,7 @@ public class DenonMarantzTelnetClientThread extends Thread {
         disconnect();
         int delay = 0;
 
+        Socket socket = this.socket;
         while (!isInterrupted() && (socket == null || !socket.isConnected())) {
             try {
                 Thread.sleep(delay);
@@ -134,7 +141,7 @@ public class DenonMarantzTelnetClientThread extends Thread {
                 // Use raw socket instead of TelnetClient here because TelnetClient sends an
                 // extra newline char after each write which causes the connection to become
                 // unresponsive.
-                socket = new Socket();
+                socket = this.socket = new Socket();
                 socket.connect(new InetSocketAddress(config.getHost(), config.getTelnetPort()), TIMEOUT);
                 socket.setKeepAlive(true);
                 socket.setSoTimeout(TIMEOUT);
@@ -161,6 +168,7 @@ public class DenonMarantzTelnetClientThread extends Thread {
     }
 
     private void disconnect() {
+        Socket socket = this.socket;
         if (socket != null) {
             logger.debug("Disconnecting socket");
             try {
@@ -168,7 +176,7 @@ public class DenonMarantzTelnetClientThread extends Thread {
             } catch (IOException e) {
                 logger.debug("Error while disconnecting telnet client", e);
             } finally {
-                socket = null;
+                this.socket = null;
                 out = null;
                 in = null;
                 listener.telnetClientConnected(false);
index c759a73710377b0acd10b06ad21fd89d0ed9ce02..562e1ce40f48beec1f3d3415a1cbac224095c20c 100644 (file)
@@ -20,6 +20,8 @@ import java.util.concurrent.Future;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.regex.Pattern;
 
+import org.eclipse.jdt.annotation.NonNullByDefault;
+import org.eclipse.jdt.annotation.Nullable;
 import org.openhab.binding.denonmarantz.internal.DenonMarantzState;
 import org.openhab.binding.denonmarantz.internal.config.DenonMarantzConfiguration;
 import org.openhab.binding.denonmarantz.internal.connector.DenonMarantzConnector;
@@ -33,6 +35,7 @@ import org.slf4j.LoggerFactory;
  * @author Jeroen Idserda - Initial Contribution (1.x Binding)
  * @author Jan-Willem Veldhuis - Refactored for 2.x
  */
+@NonNullByDefault
 public class DenonMarantzTelnetConnector extends DenonMarantzConnector implements DenonMarantzTelnetListener {
 
     private final Logger logger = LoggerFactory.getLogger(DenonMarantzTelnetConnector.class);
@@ -45,21 +48,19 @@ public class DenonMarantzTelnetConnector extends DenonMarantzConnector implement
 
     private static final BigDecimal NINETYNINE = new BigDecimal("99");
 
-    private DenonMarantzTelnetClientThread telnetClientThread;
+    private @Nullable DenonMarantzTelnetClientThread telnetClientThread;
 
     private boolean displayNowplaying = false;
 
     protected boolean disposing = false;
 
-    private Future<?> telnetStateRequest;
+    private @Nullable Future<?> telnetStateRequest;
 
     private String thingUID;
 
     public DenonMarantzTelnetConnector(DenonMarantzConfiguration config, DenonMarantzState state,
             ScheduledExecutorService scheduler, String thingUID) {
-        this.config = config;
-        this.scheduler = scheduler;
-        this.state = state;
+        super(config, scheduler, state);
         this.thingUID = thingUID;
     }
 
@@ -68,7 +69,8 @@ public class DenonMarantzTelnetConnector extends DenonMarantzConnector implement
      */
     @Override
     public void connect() {
-        telnetClientThread = new DenonMarantzTelnetClientThread(config, this);
+        DenonMarantzTelnetClientThread telnetClientThread = this.telnetClientThread = new DenonMarantzTelnetClientThread(
+                config, this);
         telnetClientThread.setName("OH-binding-" + thingUID);
         telnetClientThread.start();
     }
@@ -76,7 +78,8 @@ public class DenonMarantzTelnetConnector extends DenonMarantzConnector implement
     @Override
     public void telnetClientConnected(boolean connected) {
         if (!connected) {
-            if (config.isTelnet() && !disposing) {
+            Boolean isTelnet = config.isTelnet();
+            if (isTelnet != null && isTelnet && !disposing) {
                 logger.debug("Telnet client disconnected.");
                 state.connectionError(
                         "Error connecting to the telnet port. Consider disabling telnet in this Thing's configuration to use HTTP polling instead.");
@@ -94,17 +97,19 @@ public class DenonMarantzTelnetConnector extends DenonMarantzConnector implement
         logger.debug("disposing connector");
         disposing = true;
 
+        Future<?> telnetStateRequest = this.telnetStateRequest;
         if (telnetStateRequest != null) {
             telnetStateRequest.cancel(true);
-            telnetStateRequest = null;
+            this.telnetStateRequest = null;
         }
 
+        DenonMarantzTelnetClientThread telnetClientThread = this.telnetClientThread;
         if (telnetClientThread != null) {
             telnetClientThread.interrupt();
             // Invoke a shutdown after interrupting the thread to close the socket immediately,
             // otherwise the client keeps running until a line was received from the telnet connection
             telnetClientThread.shutdown();
-            telnetClientThread = null;
+            this.telnetClientThread = null;
         }
     }
 
@@ -263,11 +268,14 @@ public class DenonMarantzTelnetConnector extends DenonMarantzConnector implement
     @Override
     protected void internalSendCommand(String command) {
         logger.debug("Sending command '{}'", command);
-        if (command == null || command.isBlank()) {
+        if (command.isBlank()) {
             logger.warn("Trying to send empty command");
             return;
         }
-        telnetClientThread.sendCommand(command);
+        DenonMarantzTelnetClientThread telnetClientThread = this.telnetClientThread;
+        if (telnetClientThread != null) {
+            telnetClientThread.sendCommand(command);
+        }
     }
 
     /**
index 4b9ed7abdb8a1d8d3bf65680ea48e3eb6c32a712..ea1daae3a410fb01871df7bcf5f425508689fd2b 100644 (file)
@@ -12,6 +12,8 @@
  */
 package org.openhab.binding.denonmarantz.internal.connector.telnet;
 
+import org.eclipse.jdt.annotation.NonNullByDefault;
+
 /**
  * Listener interface used to notify the
  * {@link org.openhab.binding.denonmarantz.internal.connector.DenonMarantzConnector} about received messages over Telnet
@@ -19,6 +21,7 @@ package org.openhab.binding.denonmarantz.internal.connector.telnet;
  * @author Jan-Willem Veldhuis - Initial contribution
  *
  */
+@NonNullByDefault
 public interface DenonMarantzTelnetListener {
     /**
      * The telnet client has received a line.
index e5d26115ed81093baa20555827b6ccd8cabb43b3..857e0c4aee3158a428cf456dc24500539bda3f12 100644 (file)
@@ -14,15 +14,19 @@ package org.openhab.binding.denonmarantz.internal.xml.adapters;
 
 import javax.xml.bind.annotation.adapters.XmlAdapter;
 
+import org.eclipse.jdt.annotation.NonNullByDefault;
+import org.eclipse.jdt.annotation.Nullable;
+
 /**
  * Maps 'On' and 'Off' string values to a boolean
  *
  * @author Jeroen Idserda - Initial contribution
  */
-public class OnOffAdapter extends XmlAdapter<String, Boolean> {
+@NonNullByDefault
+public class OnOffAdapter extends XmlAdapter<@Nullable String, @Nullable Boolean> {
 
     @Override
-    public Boolean unmarshal(String v) throws Exception {
+    public @Nullable Boolean unmarshal(@Nullable String v) throws Exception {
         if (v != null) {
             return Boolean.valueOf("on".equals(v.toLowerCase()));
         }
@@ -31,7 +35,7 @@ public class OnOffAdapter extends XmlAdapter<String, Boolean> {
     }
 
     @Override
-    public String marshal(Boolean v) throws Exception {
+    public @Nullable String marshal(@Nullable Boolean v) throws Exception {
         return v ? "On" : "Off";
     }
 }
index 31cf15ecbd3160325930a165d18e9e8f7f620871..714933601aded14cd9256e90fe33b4f830f18109 100644 (file)
@@ -14,15 +14,19 @@ package org.openhab.binding.denonmarantz.internal.xml.adapters;
 
 import javax.xml.bind.annotation.adapters.XmlAdapter;
 
+import org.eclipse.jdt.annotation.NonNullByDefault;
+import org.eclipse.jdt.annotation.Nullable;
+
 /**
  * Adapter to clean up string values
  *
  * @author Jeroen Idserda - Initial contribution
  */
-public class StringAdapter extends XmlAdapter<String, String> {
+@NonNullByDefault
+public class StringAdapter extends XmlAdapter<@Nullable String, @Nullable String> {
 
     @Override
-    public String unmarshal(String v) throws Exception {
+    public @Nullable String unmarshal(@Nullable String v) throws Exception {
         String val = v;
         if (val != null) {
             return val.trim();
@@ -31,7 +35,7 @@ public class StringAdapter extends XmlAdapter<String, String> {
     }
 
     @Override
-    public String marshal(String v) throws Exception {
+    public @Nullable String marshal(@Nullable String v) throws Exception {
         return v;
     }
 }
index f1014c8d2afcc37658a2f8ff50f32b85c388d45a..d79bcc061f26dcbd658b8d8a7e68b43a47b8fd3e 100644 (file)
@@ -18,15 +18,19 @@ import java.math.BigDecimal;
 
 import javax.xml.bind.annotation.adapters.XmlAdapter;
 
+import org.eclipse.jdt.annotation.NonNullByDefault;
+import org.eclipse.jdt.annotation.Nullable;
+
 /**
  * Maps Denon volume values in db to percentage
  *
  * @author Jeroen Idserda - Initial contribution
  */
-public class VolumeAdapter extends XmlAdapter<String, BigDecimal> {
+@NonNullByDefault
+public class VolumeAdapter extends XmlAdapter<@Nullable String, BigDecimal> {
 
     @Override
-    public BigDecimal unmarshal(String v) throws Exception {
+    public BigDecimal unmarshal(@Nullable String v) throws Exception {
         if (v != null && !"--".equals(v.trim())) {
             return new BigDecimal(v.trim()).add(DB_OFFSET);
         }
@@ -35,7 +39,7 @@ public class VolumeAdapter extends XmlAdapter<String, BigDecimal> {
     }
 
     @Override
-    public String marshal(BigDecimal v) throws Exception {
+    public @Nullable String marshal(BigDecimal v) throws Exception {
         if (v.equals(BigDecimal.ZERO)) {
             return "--";
         }
diff --git a/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/Deviceinfo.java b/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/Deviceinfo.java
new file mode 100644 (file)
index 0000000..fab4765
--- /dev/null
@@ -0,0 +1,47 @@
+/**
+ * Copyright (c) 2010-2024 Contributors to the openHAB project
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ */
+package org.openhab.binding.denonmarantz.internal.xml.dto;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+
+/**
+ * Contains information about a Denon/Marantz receiver.
+ *
+ * @author Jeroen Idserda - Initial contribution
+ */
+@XmlRootElement(name = "device_Info")
+@XmlAccessorType(XmlAccessType.FIELD)
+public class Deviceinfo {
+
+    private Integer deviceZones;
+
+    private String modelName;
+
+    public Integer getDeviceZones() {
+        return deviceZones;
+    }
+
+    public void setDeviceZones(Integer deviceZones) {
+        this.deviceZones = deviceZones;
+    }
+
+    public String getModelName() {
+        return modelName;
+    }
+
+    public void setModelName(String modelName) {
+        this.modelName = modelName;
+    }
+}
diff --git a/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/Main.java b/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/Main.java
new file mode 100644 (file)
index 0000000..41f27e3
--- /dev/null
@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) 2010-2024 Contributors to the openHAB project
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ */
+package org.openhab.binding.denonmarantz.internal.xml.dto;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.openhab.binding.denonmarantz.internal.xml.dto.types.OnOffType;
+
+/**
+ * Holds information about the Main zone of the receiver
+ *
+ * @author Jeroen Idserda - Initial contribution
+ */
+@XmlRootElement(name = "item")
+@XmlAccessorType(XmlAccessType.FIELD)
+public class Main {
+
+    private OnOffType power;
+
+    public OnOffType getPower() {
+        return power;
+    }
+
+    public void setPower(OnOffType power) {
+        this.power = power;
+    }
+}
diff --git a/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/ZoneStatus.java b/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/ZoneStatus.java
new file mode 100644 (file)
index 0000000..5071787
--- /dev/null
@@ -0,0 +1,103 @@
+/**
+ * Copyright (c) 2010-2024 Contributors to the openHAB project
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ */
+package org.openhab.binding.denonmarantz.internal.xml.dto;
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.openhab.binding.denonmarantz.internal.xml.dto.types.OnOffType;
+import org.openhab.binding.denonmarantz.internal.xml.dto.types.StringType;
+import org.openhab.binding.denonmarantz.internal.xml.dto.types.VolumeType;
+
+/**
+ * Holds information about the secondary zones of the receiver
+ *
+ * @author Jeroen Idserda - Initial contribution
+ */
+@XmlRootElement(name = "item")
+@XmlAccessorType(XmlAccessType.FIELD)
+public class ZoneStatus {
+
+    private OnOffType power;
+
+    @XmlElementWrapper(name = "inputFuncList")
+    @XmlElement(name = "value")
+    private List<String> inputFunctions;
+
+    private StringType inputFuncSelect;
+
+    private StringType volumeDisplay;
+
+    private StringType surrMode;
+
+    private VolumeType masterVolume;
+
+    private OnOffType mute;
+
+    public OnOffType getPower() {
+        return power;
+    }
+
+    public void setPower(OnOffType power) {
+        this.power = power;
+    }
+
+    public StringType getInputFuncSelect() {
+        return inputFuncSelect;
+    }
+
+    public void setInputFuncSelect(StringType inputFuncSelect) {
+        this.inputFuncSelect = inputFuncSelect;
+    }
+
+    public StringType getVolumeDisplay() {
+        return volumeDisplay;
+    }
+
+    public void setVolumeDisplay(StringType volumeDisplay) {
+        this.volumeDisplay = volumeDisplay;
+    }
+
+    public StringType getSurrMode() {
+        return surrMode;
+    }
+
+    public void setSurrMode(StringType surrMode) {
+        this.surrMode = surrMode;
+    }
+
+    public VolumeType getMasterVolume() {
+        return masterVolume;
+    }
+
+    public void setMasterVolume(VolumeType masterVolume) {
+        this.masterVolume = masterVolume;
+    }
+
+    public OnOffType getMute() {
+        return mute;
+    }
+
+    public void setMute(OnOffType mute) {
+        this.mute = mute;
+    }
+
+    public List<String> getInputFuncList() {
+        return this.inputFunctions;
+    }
+}
diff --git a/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/ZoneStatusLite.java b/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/ZoneStatusLite.java
new file mode 100644 (file)
index 0000000..5d38979
--- /dev/null
@@ -0,0 +1,81 @@
+/**
+ * Copyright (c) 2010-2024 Contributors to the openHAB project
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ */
+package org.openhab.binding.denonmarantz.internal.xml.dto;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.openhab.binding.denonmarantz.internal.xml.dto.types.OnOffType;
+import org.openhab.binding.denonmarantz.internal.xml.dto.types.StringType;
+import org.openhab.binding.denonmarantz.internal.xml.dto.types.VolumeType;
+
+/**
+ * Holds limited information about the secondary zones of the receiver
+ *
+ * @author Jeroen Idserda - Initial contribution
+ */
+@XmlRootElement(name = "item")
+@XmlAccessorType(XmlAccessType.FIELD)
+public class ZoneStatusLite {
+
+    private OnOffType power;
+
+    private StringType inputFuncSelect;
+
+    private StringType volumeDisplay;
+
+    private VolumeType masterVolume;
+
+    private OnOffType mute;
+
+    public OnOffType getPower() {
+        return power;
+    }
+
+    public void setPower(OnOffType power) {
+        this.power = power;
+    }
+
+    public StringType getInputFuncSelect() {
+        return inputFuncSelect;
+    }
+
+    public void setInputFuncSelect(StringType inputFuncSelect) {
+        this.inputFuncSelect = inputFuncSelect;
+    }
+
+    public StringType getVolumeDisplay() {
+        return volumeDisplay;
+    }
+
+    public void setVolumeDisplay(StringType volumeDisplay) {
+        this.volumeDisplay = volumeDisplay;
+    }
+
+    public VolumeType getMasterVolume() {
+        return masterVolume;
+    }
+
+    public void setMasterVolume(VolumeType masterVolume) {
+        this.masterVolume = masterVolume;
+    }
+
+    public OnOffType getMute() {
+        return mute;
+    }
+
+    public void setMute(OnOffType mute) {
+        this.mute = mute;
+    }
+}
diff --git a/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/commands/AppCommandRequest.java b/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/commands/AppCommandRequest.java
new file mode 100644 (file)
index 0000000..03a7a9f
--- /dev/null
@@ -0,0 +1,58 @@
+/**
+ * Copyright (c) 2010-2024 Contributors to the openHAB project
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ */
+package org.openhab.binding.denonmarantz.internal.xml.dto.commands;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.eclipse.jdt.annotation.NonNullByDefault;
+
+/**
+ * Wrapper for a list of {@link CommandTx}
+ *
+ * @author Jeroen Idserda - Initial contribution
+ */
+@XmlRootElement(name = "tx")
+@XmlAccessorType(XmlAccessType.FIELD)
+@NonNullByDefault
+public class AppCommandRequest {
+
+    @XmlElement(name = "cmd")
+    private List<CommandTx> commands = new ArrayList<>();
+
+    public AppCommandRequest() {
+    }
+
+    public List<CommandTx> getCommands() {
+        return commands;
+    }
+
+    public void setCommands(List<CommandTx> commands) {
+        this.commands = commands;
+    }
+
+    public AppCommandRequest add(CommandTx command) {
+        commands.add(command);
+        return this;
+    }
+
+    public static AppCommandRequest of(CommandTx command) {
+        AppCommandRequest tx = new AppCommandRequest();
+        return tx.add(command);
+    }
+}
diff --git a/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/commands/AppCommandResponse.java b/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/commands/AppCommandResponse.java
new file mode 100644 (file)
index 0000000..9523331
--- /dev/null
@@ -0,0 +1,48 @@
+/**
+ * Copyright (c) 2010-2024 Contributors to the openHAB project
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ */
+package org.openhab.binding.denonmarantz.internal.xml.dto.commands;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.eclipse.jdt.annotation.NonNullByDefault;
+
+/**
+ * Response to an {@link AppCommandRequest}, wraps a list of {@link CommandRx}
+ *
+ * @author Jeroen Idserda - Initial contribution
+ */
+@XmlRootElement(name = "rx")
+@XmlAccessorType(XmlAccessType.FIELD)
+@NonNullByDefault
+public class AppCommandResponse {
+
+    @XmlElement(name = "cmd")
+    private List<CommandRx> commands = new ArrayList<>();
+
+    public AppCommandResponse() {
+    }
+
+    public List<CommandRx> getCommands() {
+        return commands;
+    }
+
+    public void setCommands(List<CommandRx> commands) {
+        this.commands = commands;
+    }
+}
diff --git a/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/commands/CommandRx.java b/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/commands/CommandRx.java
new file mode 100644 (file)
index 0000000..55531ce
--- /dev/null
@@ -0,0 +1,206 @@
+/**
+ * Copyright (c) 2010-2024 Contributors to the openHAB project
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ */
+package org.openhab.binding.denonmarantz.internal.xml.dto.commands;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
+
+/**
+ * Response to a {@link CommandTx}
+ *
+ * @author Jeroen Idserda - Initial contribution
+ */
+@XmlRootElement(name = "cmd")
+@XmlAccessorType(XmlAccessType.FIELD)
+public class CommandRx {
+
+    private String zone1;
+
+    private String zone2;
+
+    private String zone3;
+
+    private String zone4;
+
+    private String volume;
+
+    private String disptype;
+
+    private String dispvalue;
+
+    private String mute;
+
+    private String type;
+
+    @XmlElement(name = "text")
+    private List<Text> texts = new ArrayList<>();
+
+    @XmlElementWrapper(name = "functionrename")
+    @XmlElement(name = "list")
+    private List<RenameSourceList> renameSourceLists;
+
+    @XmlElementWrapper(name = "functiondelete")
+    @XmlElement(name = "list")
+    private List<DeletedSourceList> deletedSourceLists;
+
+    private String playstatus;
+
+    private String playcontents;
+
+    private String repeat;
+
+    private String shuffle;
+
+    private String source;
+
+    public CommandRx() {
+    }
+
+    public String getZone1() {
+        return zone1;
+    }
+
+    public void setZone1(String zone1) {
+        this.zone1 = zone1;
+    }
+
+    public String getZone2() {
+        return zone2;
+    }
+
+    public void setZone2(String zone2) {
+        this.zone2 = zone2;
+    }
+
+    public String getZone3() {
+        return zone3;
+    }
+
+    public void setZone3(String zone3) {
+        this.zone3 = zone3;
+    }
+
+    public String getZone4() {
+        return zone4;
+    }
+
+    public void setZone4(String zone4) {
+        this.zone4 = zone4;
+    }
+
+    public String getVolume() {
+        return volume;
+    }
+
+    public void setVolume(String volume) {
+        this.volume = volume;
+    }
+
+    public String getDisptype() {
+        return disptype;
+    }
+
+    public void setDisptype(String disptype) {
+        this.disptype = disptype;
+    }
+
+    public String getDispvalue() {
+        return dispvalue;
+    }
+
+    public void setDispvalue(String dispvalue) {
+        this.dispvalue = dispvalue;
+    }
+
+    public String getMute() {
+        return mute;
+    }
+
+    public void setMute(String mute) {
+        this.mute = mute;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getPlaystatus() {
+        return playstatus;
+    }
+
+    public void setPlaystatus(String playstatus) {
+        this.playstatus = playstatus;
+    }
+
+    public String getPlaycontents() {
+        return playcontents;
+    }
+
+    public void setPlaycontents(String playcontents) {
+        this.playcontents = playcontents;
+    }
+
+    public String getRepeat() {
+        return repeat;
+    }
+
+    public void setRepeat(String repeat) {
+        this.repeat = repeat;
+    }
+
+    public String getShuffle() {
+        return shuffle;
+    }
+
+    public void setShuffle(String shuffle) {
+        this.shuffle = shuffle;
+    }
+
+    public String getSource() {
+        return source;
+    }
+
+    public void setSource(String source) {
+        this.source = source;
+    }
+
+    public @Nullable String getText(@NonNull String key) {
+        for (Text text : texts) {
+            if (key.equals(text.getId())) {
+                return text.getValue();
+            }
+        }
+        return null;
+    }
+
+    public List<RenameSourceList> getRenameSourceLists() {
+        return renameSourceLists;
+    }
+
+    public List<DeletedSourceList> getDeletedSourceLists() {
+        return deletedSourceLists;
+    }
+}
diff --git a/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/commands/CommandTx.java b/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/commands/CommandTx.java
new file mode 100644 (file)
index 0000000..d01939f
--- /dev/null
@@ -0,0 +1,76 @@
+/**
+ * Copyright (c) 2010-2024 Contributors to the openHAB project
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ */
+package org.openhab.binding.denonmarantz.internal.xml.dto.commands;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlValue;
+
+/**
+ * Individual commands that can be sent to a Denon/Marantz receiver to request specific information.
+ *
+ * @author Jeroen Idserda - Initial contribution
+ */
+@XmlRootElement(name = "cmd")
+@XmlAccessorType(XmlAccessType.FIELD)
+public class CommandTx {
+
+    private static final String DEFAULT_ID = "1";
+
+    public static final CommandTx CMD_ALL_POWER = of("GetAllZonePowerStatus");
+
+    public static final CommandTx CMD_VOLUME_LEVEL = of("GetVolumeLevel");
+
+    public static final CommandTx CMD_MUTE_STATUS = of("GetMuteStatus");
+
+    public static final CommandTx CMD_SOURCE_STATUS = of("GetSourceStatus");
+
+    public static final CommandTx CMD_SURROUND_STATUS = of("GetSurroundModeStatus");
+
+    public static final CommandTx CMD_ZONE_NAME = of("GetZoneName");
+
+    public static final CommandTx CMD_NET_STATUS = of("GetNetAudioStatus");
+
+    public static final CommandTx CMD_RENAME_SOURCE = of("GetRenameSource");
+
+    public static final CommandTx CMD_DELETED_SOURCE = of("GetDeletedSource");
+
+    @XmlAttribute(name = "id")
+    private String id;
+
+    @XmlValue
+    private String value;
+
+    public CommandTx() {
+    }
+
+    public CommandTx(String value) {
+        this.value = value;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public static CommandTx of(String command) {
+        CommandTx cmdTx = new CommandTx(command);
+        cmdTx.setId(DEFAULT_ID);
+        return cmdTx;
+    }
+}
diff --git a/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/commands/DeletedSourceList.java b/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/commands/DeletedSourceList.java
new file mode 100644 (file)
index 0000000..0e16ff7
--- /dev/null
@@ -0,0 +1,45 @@
+/**
+ * Copyright (c) 2010-2024 Contributors to the openHAB project
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ */
+package org.openhab.binding.denonmarantz.internal.xml.dto.commands;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+
+/**
+ * Used to unmarshall {@code <list>} items of the {@code <functiondelete>} CommandRX.
+ *
+ * @author Jan-Willem Veldhuis - Initial contribution
+ */
+@XmlRootElement(name = "list")
+@XmlAccessorType(XmlAccessType.FIELD)
+public class DeletedSourceList {
+
+    private String name;
+
+    private String funcName;
+
+    private Integer use;
+
+    public String getName() {
+        return name;
+    }
+
+    public String getFuncName() {
+        return funcName;
+    }
+
+    public Integer getUse() {
+        return use;
+    }
+}
diff --git a/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/commands/RenameSourceList.java b/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/commands/RenameSourceList.java
new file mode 100644 (file)
index 0000000..352aad6
--- /dev/null
@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) 2010-2024 Contributors to the openHAB project
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ */
+package org.openhab.binding.denonmarantz.internal.xml.dto.commands;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+
+/**
+ * Used to unmarshall {@code <list>} items of the {@code <functionrename>} CommandRX.
+ *
+ * @author Jan-Willem Veldhuis - Initial contribution
+ */
+@XmlRootElement(name = "list")
+@XmlAccessorType(XmlAccessType.FIELD)
+public class RenameSourceList {
+
+    private String name;
+
+    private String rename;
+
+    public String getName() {
+        return name;
+    }
+
+    public String getRename() {
+        return rename;
+    }
+}
diff --git a/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/commands/Text.java b/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/commands/Text.java
new file mode 100644 (file)
index 0000000..67de71f
--- /dev/null
@@ -0,0 +1,54 @@
+/**
+ * Copyright (c) 2010-2024 Contributors to the openHAB project
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ */
+package org.openhab.binding.denonmarantz.internal.xml.dto.commands;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlValue;
+
+/**
+ * Holds text values with a certain id
+ *
+ * @author Jeroen Idserda - Initial contribution
+ */
+@XmlRootElement(name = "text")
+@XmlAccessorType(XmlAccessType.FIELD)
+public class Text {
+
+    @XmlAttribute(name = "id")
+    private String id;
+
+    @XmlValue
+    private String value;
+
+    public Text() {
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+}
diff --git a/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/types/OnOffType.java b/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/types/OnOffType.java
new file mode 100644 (file)
index 0000000..dc1a60c
--- /dev/null
@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) 2010-2024 Contributors to the openHAB project
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ */
+package org.openhab.binding.denonmarantz.internal.xml.dto.types;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.openhab.binding.denonmarantz.internal.xml.adapters.OnOffAdapter;
+
+/**
+ * Contains an On/Off value in the form of a boolean
+ *
+ * @author Jeroen Idserda - Initial contribution
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+public class OnOffType {
+
+    @XmlJavaTypeAdapter(OnOffAdapter.class)
+    private Boolean value;
+
+    public Boolean getValue() {
+        return value;
+    }
+
+    public void setValue(Boolean value) {
+        this.value = value;
+    }
+}
diff --git a/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/types/StringType.java b/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/types/StringType.java
new file mode 100644 (file)
index 0000000..3ac132a
--- /dev/null
@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) 2010-2024 Contributors to the openHAB project
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ */
+package org.openhab.binding.denonmarantz.internal.xml.dto.types;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.openhab.binding.denonmarantz.internal.xml.adapters.StringAdapter;
+
+/**
+ * Contains a string value
+ *
+ * @author Jeroen Idserda - Initial contribution
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+public class StringType {
+
+    @XmlJavaTypeAdapter(value = StringAdapter.class)
+    private String value;
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+}
diff --git a/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/types/VolumeType.java b/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/dto/types/VolumeType.java
new file mode 100644 (file)
index 0000000..73b5458
--- /dev/null
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) 2010-2024 Contributors to the openHAB project
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ */
+package org.openhab.binding.denonmarantz.internal.xml.dto.types;
+
+import java.math.BigDecimal;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.openhab.binding.denonmarantz.internal.xml.adapters.VolumeAdapter;
+
+/**
+ * Contains a volume value (percentage)
+ *
+ * @author Jeroen Idserda - Initial contribution
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+public class VolumeType {
+
+    @XmlJavaTypeAdapter(value = VolumeAdapter.class)
+    private BigDecimal value;
+
+    public BigDecimal getValue() {
+        return value;
+    }
+
+    public void setValue(BigDecimal value) {
+        this.value = value;
+    }
+}
diff --git a/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/Deviceinfo.java b/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/Deviceinfo.java
deleted file mode 100644 (file)
index 5491424..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * Copyright (c) 2010-2024 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.denonmarantz.internal.xml.entities;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-
-/**
- * Contains information about a Denon/Marantz receiver.
- *
- * @author Jeroen Idserda - Initial contribution
- */
-@XmlRootElement(name = "device_Info")
-@XmlAccessorType(XmlAccessType.FIELD)
-public class Deviceinfo {
-
-    private Integer deviceZones;
-
-    private String modelName;
-
-    public Integer getDeviceZones() {
-        return deviceZones;
-    }
-
-    public void setDeviceZones(Integer deviceZones) {
-        this.deviceZones = deviceZones;
-    }
-
-    public String getModelName() {
-        return modelName;
-    }
-
-    public void setModelName(String modelName) {
-        this.modelName = modelName;
-    }
-}
diff --git a/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/Main.java b/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/Main.java
deleted file mode 100644 (file)
index 0e74fbe..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Copyright (c) 2010-2024 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.denonmarantz.internal.xml.entities;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.openhab.binding.denonmarantz.internal.xml.entities.types.OnOffType;
-
-/**
- * Holds information about the Main zone of the receiver
- *
- * @author Jeroen Idserda - Initial contribution
- */
-@XmlRootElement(name = "item")
-@XmlAccessorType(XmlAccessType.FIELD)
-public class Main {
-
-    private OnOffType power;
-
-    public OnOffType getPower() {
-        return power;
-    }
-
-    public void setPower(OnOffType power) {
-        this.power = power;
-    }
-}
diff --git a/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/ZoneStatus.java b/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/ZoneStatus.java
deleted file mode 100644 (file)
index 6a2f6c6..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-/**
- * Copyright (c) 2010-2024 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.denonmarantz.internal.xml.entities;
-
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.openhab.binding.denonmarantz.internal.xml.entities.types.OnOffType;
-import org.openhab.binding.denonmarantz.internal.xml.entities.types.StringType;
-import org.openhab.binding.denonmarantz.internal.xml.entities.types.VolumeType;
-
-/**
- * Holds information about the secondary zones of the receiver
- *
- * @author Jeroen Idserda - Initial contribution
- */
-@XmlRootElement(name = "item")
-@XmlAccessorType(XmlAccessType.FIELD)
-public class ZoneStatus {
-
-    private OnOffType power;
-
-    @XmlElementWrapper(name = "inputFuncList")
-    @XmlElement(name = "value")
-    private List<String> inputFunctions;
-
-    private StringType inputFuncSelect;
-
-    private StringType volumeDisplay;
-
-    private StringType surrMode;
-
-    private VolumeType masterVolume;
-
-    private OnOffType mute;
-
-    public OnOffType getPower() {
-        return power;
-    }
-
-    public void setPower(OnOffType power) {
-        this.power = power;
-    }
-
-    public StringType getInputFuncSelect() {
-        return inputFuncSelect;
-    }
-
-    public void setInputFuncSelect(StringType inputFuncSelect) {
-        this.inputFuncSelect = inputFuncSelect;
-    }
-
-    public StringType getVolumeDisplay() {
-        return volumeDisplay;
-    }
-
-    public void setVolumeDisplay(StringType volumeDisplay) {
-        this.volumeDisplay = volumeDisplay;
-    }
-
-    public StringType getSurrMode() {
-        return surrMode;
-    }
-
-    public void setSurrMode(StringType surrMode) {
-        this.surrMode = surrMode;
-    }
-
-    public VolumeType getMasterVolume() {
-        return masterVolume;
-    }
-
-    public void setMasterVolume(VolumeType masterVolume) {
-        this.masterVolume = masterVolume;
-    }
-
-    public OnOffType getMute() {
-        return mute;
-    }
-
-    public void setMute(OnOffType mute) {
-        this.mute = mute;
-    }
-
-    public List<String> getInputFuncList() {
-        return this.inputFunctions;
-    }
-}
diff --git a/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/ZoneStatusLite.java b/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/ZoneStatusLite.java
deleted file mode 100644 (file)
index de75cda..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * Copyright (c) 2010-2024 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.denonmarantz.internal.xml.entities;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.openhab.binding.denonmarantz.internal.xml.entities.types.OnOffType;
-import org.openhab.binding.denonmarantz.internal.xml.entities.types.StringType;
-import org.openhab.binding.denonmarantz.internal.xml.entities.types.VolumeType;
-
-/**
- * Holds limited information about the secondary zones of the receiver
- *
- * @author Jeroen Idserda - Initial contribution
- */
-@XmlRootElement(name = "item")
-@XmlAccessorType(XmlAccessType.FIELD)
-public class ZoneStatusLite {
-
-    private OnOffType power;
-
-    private StringType inputFuncSelect;
-
-    private StringType volumeDisplay;
-
-    private VolumeType masterVolume;
-
-    private OnOffType mute;
-
-    public OnOffType getPower() {
-        return power;
-    }
-
-    public void setPower(OnOffType power) {
-        this.power = power;
-    }
-
-    public StringType getInputFuncSelect() {
-        return inputFuncSelect;
-    }
-
-    public void setInputFuncSelect(StringType inputFuncSelect) {
-        this.inputFuncSelect = inputFuncSelect;
-    }
-
-    public StringType getVolumeDisplay() {
-        return volumeDisplay;
-    }
-
-    public void setVolumeDisplay(StringType volumeDisplay) {
-        this.volumeDisplay = volumeDisplay;
-    }
-
-    public VolumeType getMasterVolume() {
-        return masterVolume;
-    }
-
-    public void setMasterVolume(VolumeType masterVolume) {
-        this.masterVolume = masterVolume;
-    }
-
-    public OnOffType getMute() {
-        return mute;
-    }
-
-    public void setMute(OnOffType mute) {
-        this.mute = mute;
-    }
-}
diff --git a/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/commands/AppCommandRequest.java b/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/commands/AppCommandRequest.java
deleted file mode 100644 (file)
index 54659fc..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (c) 2010-2024 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.denonmarantz.internal.xml.entities.commands;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-
-/**
- * Wrapper for a list of {@link CommandTx}
- *
- * @author Jeroen Idserda - Initial contribution
- */
-@XmlRootElement(name = "tx")
-@XmlAccessorType(XmlAccessType.FIELD)
-public class AppCommandRequest {
-
-    @XmlElement(name = "cmd")
-    private List<CommandTx> commands = new ArrayList<>();
-
-    public AppCommandRequest() {
-    }
-
-    public List<CommandTx> getCommands() {
-        return commands;
-    }
-
-    public void setCommands(List<CommandTx> commands) {
-        this.commands = commands;
-    }
-
-    public AppCommandRequest add(CommandTx command) {
-        commands.add(command);
-        return this;
-    }
-
-    public static AppCommandRequest of(CommandTx command) {
-        AppCommandRequest tx = new AppCommandRequest();
-        return tx.add(command);
-    }
-}
diff --git a/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/commands/AppCommandResponse.java b/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/commands/AppCommandResponse.java
deleted file mode 100644 (file)
index fc74fb9..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * Copyright (c) 2010-2024 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.denonmarantz.internal.xml.entities.commands;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-
-/**
- * Response to an {@link AppCommandRequest}, wraps a list of {@link CommandRx}
- *
- * @author Jeroen Idserda - Initial contribution
- */
-@XmlRootElement(name = "rx")
-@XmlAccessorType(XmlAccessType.FIELD)
-public class AppCommandResponse {
-
-    @XmlElement(name = "cmd")
-    private List<CommandRx> commands = new ArrayList<>();
-
-    public AppCommandResponse() {
-    }
-
-    public List<CommandRx> getCommands() {
-        return commands;
-    }
-
-    public void setCommands(List<CommandRx> commands) {
-        this.commands = commands;
-    }
-}
diff --git a/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/commands/CommandRx.java b/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/commands/CommandRx.java
deleted file mode 100644 (file)
index d9bb5d8..0000000
+++ /dev/null
@@ -1,203 +0,0 @@
-/**
- * Copyright (c) 2010-2024 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.denonmarantz.internal.xml.entities.commands;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlRootElement;
-
-/**
- * Response to a {@link CommandTx}
- *
- * @author Jeroen Idserda - Initial contribution
- */
-@XmlRootElement(name = "cmd")
-@XmlAccessorType(XmlAccessType.FIELD)
-public class CommandRx {
-
-    private String zone1;
-
-    private String zone2;
-
-    private String zone3;
-
-    private String zone4;
-
-    private String volume;
-
-    private String disptype;
-
-    private String dispvalue;
-
-    private String mute;
-
-    private String type;
-
-    @XmlElement(name = "text")
-    private List<Text> texts = new ArrayList<>();
-
-    @XmlElementWrapper(name = "functionrename")
-    @XmlElement(name = "list")
-    private List<RenameSourceList> renameSourceLists;
-
-    @XmlElementWrapper(name = "functiondelete")
-    @XmlElement(name = "list")
-    private List<DeletedSourceList> deletedSourceLists;
-
-    private String playstatus;
-
-    private String playcontents;
-
-    private String repeat;
-
-    private String shuffle;
-
-    private String source;
-
-    public CommandRx() {
-    }
-
-    public String getZone1() {
-        return zone1;
-    }
-
-    public void setZone1(String zone1) {
-        this.zone1 = zone1;
-    }
-
-    public String getZone2() {
-        return zone2;
-    }
-
-    public void setZone2(String zone2) {
-        this.zone2 = zone2;
-    }
-
-    public String getZone3() {
-        return zone3;
-    }
-
-    public void setZone3(String zone3) {
-        this.zone3 = zone3;
-    }
-
-    public String getZone4() {
-        return zone4;
-    }
-
-    public void setZone4(String zone4) {
-        this.zone4 = zone4;
-    }
-
-    public String getVolume() {
-        return volume;
-    }
-
-    public void setVolume(String volume) {
-        this.volume = volume;
-    }
-
-    public String getDisptype() {
-        return disptype;
-    }
-
-    public void setDisptype(String disptype) {
-        this.disptype = disptype;
-    }
-
-    public String getDispvalue() {
-        return dispvalue;
-    }
-
-    public void setDispvalue(String dispvalue) {
-        this.dispvalue = dispvalue;
-    }
-
-    public String getMute() {
-        return mute;
-    }
-
-    public void setMute(String mute) {
-        this.mute = mute;
-    }
-
-    public String getType() {
-        return type;
-    }
-
-    public void setType(String type) {
-        this.type = type;
-    }
-
-    public String getPlaystatus() {
-        return playstatus;
-    }
-
-    public void setPlaystatus(String playstatus) {
-        this.playstatus = playstatus;
-    }
-
-    public String getPlaycontents() {
-        return playcontents;
-    }
-
-    public void setPlaycontents(String playcontents) {
-        this.playcontents = playcontents;
-    }
-
-    public String getRepeat() {
-        return repeat;
-    }
-
-    public void setRepeat(String repeat) {
-        this.repeat = repeat;
-    }
-
-    public String getShuffle() {
-        return shuffle;
-    }
-
-    public void setShuffle(String shuffle) {
-        this.shuffle = shuffle;
-    }
-
-    public String getSource() {
-        return source;
-    }
-
-    public void setSource(String source) {
-        this.source = source;
-    }
-
-    public String getText(String key) {
-        for (Text text : texts) {
-            if (text.getId().equals(key)) {
-                return text.getValue();
-            }
-        }
-        return null;
-    }
-
-    public List<RenameSourceList> getRenameSourceLists() {
-        return renameSourceLists;
-    }
-
-    public List<DeletedSourceList> getDeletedSourceLists() {
-        return deletedSourceLists;
-    }
-}
diff --git a/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/commands/CommandTx.java b/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/commands/CommandTx.java
deleted file mode 100644 (file)
index 488d856..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * Copyright (c) 2010-2024 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.denonmarantz.internal.xml.entities.commands;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlValue;
-
-/**
- * Individual commands that can be sent to a Denon/Marantz receiver to request specific information.
- *
- * @author Jeroen Idserda - Initial contribution
- */
-@XmlRootElement(name = "cmd")
-@XmlAccessorType(XmlAccessType.FIELD)
-public class CommandTx {
-
-    private static final String DEFAULT_ID = "1";
-
-    public static final CommandTx CMD_ALL_POWER = of("GetAllZonePowerStatus");
-
-    public static final CommandTx CMD_VOLUME_LEVEL = of("GetVolumeLevel");
-
-    public static final CommandTx CMD_MUTE_STATUS = of("GetMuteStatus");
-
-    public static final CommandTx CMD_SOURCE_STATUS = of("GetSourceStatus");
-
-    public static final CommandTx CMD_SURROUND_STATUS = of("GetSurroundModeStatus");
-
-    public static final CommandTx CMD_ZONE_NAME = of("GetZoneName");
-
-    public static final CommandTx CMD_NET_STATUS = of("GetNetAudioStatus");
-
-    public static final CommandTx CMD_RENAME_SOURCE = of("GetRenameSource");
-
-    public static final CommandTx CMD_DELETED_SOURCE = of("GetDeletedSource");
-
-    @XmlAttribute(name = "id")
-    private String id;
-
-    @XmlValue
-    private String value;
-
-    public CommandTx() {
-    }
-
-    public CommandTx(String value) {
-        this.value = value;
-    }
-
-    public String getId() {
-        return id;
-    }
-
-    public void setId(String id) {
-        this.id = id;
-    }
-
-    public static CommandTx of(String command) {
-        CommandTx cmdTx = new CommandTx(command);
-        cmdTx.setId(DEFAULT_ID);
-        return cmdTx;
-    }
-}
diff --git a/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/commands/DeletedSourceList.java b/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/commands/DeletedSourceList.java
deleted file mode 100644 (file)
index 7c8fc91..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * Copyright (c) 2010-2024 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.denonmarantz.internal.xml.entities.commands;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-
-/**
- * Used to unmarshall {@code <list>} items of the {@code <functiondelete>} CommandRX.
- *
- * @author Jan-Willem Veldhuis - Initial contribution
- */
-@XmlRootElement(name = "list")
-@XmlAccessorType(XmlAccessType.FIELD)
-public class DeletedSourceList {
-
-    private String name;
-
-    private String funcName;
-
-    private Integer use;
-
-    public String getName() {
-        return name;
-    }
-
-    public String getFuncName() {
-        return funcName;
-    }
-
-    public Integer getUse() {
-        return use;
-    }
-}
diff --git a/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/commands/RenameSourceList.java b/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/commands/RenameSourceList.java
deleted file mode 100644 (file)
index 83201a8..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Copyright (c) 2010-2024 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.denonmarantz.internal.xml.entities.commands;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-
-/**
- * Used to unmarshall {@code <list>} items of the {@code <functionrename>} CommandRX.
- *
- * @author Jan-Willem Veldhuis - Initial contribution
- */
-@XmlRootElement(name = "list")
-@XmlAccessorType(XmlAccessType.FIELD)
-public class RenameSourceList {
-
-    private String name;
-
-    private String rename;
-
-    public String getName() {
-        return name;
-    }
-
-    public String getRename() {
-        return rename;
-    }
-}
diff --git a/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/commands/Text.java b/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/commands/Text.java
deleted file mode 100644 (file)
index 5c09eb1..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * Copyright (c) 2010-2024 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.denonmarantz.internal.xml.entities.commands;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlValue;
-
-/**
- * Holds text values with a certain id
- *
- * @author Jeroen Idserda - Initial contribution
- */
-@XmlRootElement(name = "text")
-@XmlAccessorType(XmlAccessType.FIELD)
-public class Text {
-
-    @XmlAttribute(name = "id")
-    private String id;
-
-    @XmlValue
-    private String value;
-
-    public Text() {
-    }
-
-    public String getId() {
-        return id;
-    }
-
-    public void setId(String id) {
-        this.id = id;
-    }
-
-    public String getValue() {
-        return value;
-    }
-
-    public void setValue(String value) {
-        this.value = value;
-    }
-}
diff --git a/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/types/OnOffType.java b/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/types/OnOffType.java
deleted file mode 100644 (file)
index a6df2bc..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Copyright (c) 2010-2024 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.denonmarantz.internal.xml.entities.types;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-
-import org.openhab.binding.denonmarantz.internal.xml.adapters.OnOffAdapter;
-
-/**
- * Contains an On/Off value in the form of a boolean
- *
- * @author Jeroen Idserda - Initial contribution
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-public class OnOffType {
-
-    @XmlJavaTypeAdapter(OnOffAdapter.class)
-    private Boolean value;
-
-    public Boolean getValue() {
-        return value;
-    }
-
-    public void setValue(Boolean value) {
-        this.value = value;
-    }
-}
diff --git a/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/types/StringType.java b/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/types/StringType.java
deleted file mode 100644 (file)
index 948d8d6..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Copyright (c) 2010-2024 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.denonmarantz.internal.xml.entities.types;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-
-import org.openhab.binding.denonmarantz.internal.xml.adapters.StringAdapter;
-
-/**
- * Contains a string value
- *
- * @author Jeroen Idserda - Initial contribution
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-public class StringType {
-
-    @XmlJavaTypeAdapter(value = StringAdapter.class)
-    private String value;
-
-    public String getValue() {
-        return value;
-    }
-
-    public void setValue(String value) {
-        this.value = value;
-    }
-}
diff --git a/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/types/VolumeType.java b/bundles/org.openhab.binding.denonmarantz/src/main/java/org/openhab/binding/denonmarantz/internal/xml/entities/types/VolumeType.java
deleted file mode 100644 (file)
index 3a61258..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * Copyright (c) 2010-2024 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.denonmarantz.internal.xml.entities.types;
-
-import java.math.BigDecimal;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-
-import org.openhab.binding.denonmarantz.internal.xml.adapters.VolumeAdapter;
-
-/**
- * Contains a volume value (percentage)
- *
- * @author Jeroen Idserda - Initial contribution
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-public class VolumeType {
-
-    @XmlJavaTypeAdapter(value = VolumeAdapter.class)
-    private BigDecimal value;
-
-    public BigDecimal getValue() {
-        return value;
-    }
-
-    public void setValue(BigDecimal value) {
-        this.value = value;
-    }
-}