2 * Copyright (c) 2010-2022 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.upnpcontrol.internal.queue;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
20 * @author Mark Herwege - Initial contribution
23 public class UpnpEntryRes {
25 private String protocolInfo;
26 private @Nullable Long size;
27 private String duration;
28 private String importUri;
29 private String res = "";
31 public UpnpEntryRes(String protocolInfo, @Nullable Long size, @Nullable String duration,
32 @Nullable String importUri) {
33 this.protocolInfo = protocolInfo.trim();
35 this.duration = (duration == null) ? "" : duration.trim();
36 this.importUri = (importUri == null) ? "" : importUri.trim();
42 public String getRes() {
47 * @param res the res to set
49 public void setRes(String res) {
50 this.res = res.trim();
53 public String getProtocolInfo() {
60 public @Nullable Long getSize() {
65 * @return the duration
67 public String getDuration() {
72 * @return the importUri
74 public String getImportUri() {
79 * @return true if this resource defines a thumbnail as specified in the DLNA specs
81 public boolean isThumbnailRes() {
82 return getProtocolInfo().toLowerCase().contains("dlna.org_pn=jpeg_tn");