]> git.basschouten.com Git - openhab-addons.git/blob
cce1ede0f37e202bccf86c6b5be34431071cad7a
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
7  * This program and the accompanying materials are made available under the
8  * terms of the Eclipse Public License 2.0 which is available at
9  * http://www.eclipse.org/legal/epl-2.0
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.sonos.internal;
14
15 import java.io.Serializable;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18
19 /**
20  * Contains the resource meta data within a browse response result
21  * "<r:resMD>..</r:resMD>". This is used for SONOS favorites.
22  *
23  * @author Dan Cunningham - Initial contribution
24  *
25  */
26 @NonNullByDefault
27 public class SonosResourceMetaData implements Serializable {
28
29     private static final long serialVersionUID = 7438424501599637712L;
30
31     String id;
32     String parentId;
33     String title;
34     String upnpClass;
35     String desc;
36
37     public SonosResourceMetaData(String id, String parentId, String title, String upnpClass, String desc) {
38         super();
39         this.id = id;
40         this.parentId = parentId;
41         this.title = title;
42         this.upnpClass = upnpClass;
43         this.desc = desc;
44     }
45
46     /**
47      * The parent id for the resource meta data
48      *
49      * @return
50      */
51     public String getId() {
52         return id;
53     }
54
55     /**
56      * The parent id for the resource meta data
57      *
58      * @return
59      */
60     public String getParentId() {
61         return parentId;
62     }
63
64     /**
65      * title from the resource meta data
66      *
67      * @return
68      */
69     public String getTitle() {
70         return title;
71     }
72
73     /**
74      * The upnp class for the resource meta data. This can be different from the
75      * parent meta data class and should be used to match the play type over the
76      * parent value.
77      *
78      * @return
79      */
80     public String getUpnpClass() {
81         return upnpClass;
82     }
83
84     /**
85      * The desc text for the resource meta data. This contains the service login
86      * id for streaming accounts (pandora, spotify, etc..)
87      *
88      * @return
89      */
90     public String getDesc() {
91         return desc;
92     }
93 }