1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.fourthline.cling.support.model.item;
17
18 import org.fourthline.cling.support.model.Res;
19 import org.fourthline.cling.support.model.container.Container;
20
21 import static org.fourthline.cling.support.model.DIDLObject.Property.UPNP;
22
23
24
25
26 public class Photo extends ImageItem {
27
28 public static final Class CLASS = new Class("object.item.imageItem.photo");
29
30 public Photo() {
31 setClazz(CLASS);
32 }
33
34 public Photo(Item other) {
35 super(other);
36 }
37
38 public Photo(String id, Container parent, String title, String creator, String album, Res... resource) {
39 this(id, parent.getId(), title, creator, album, resource);
40 }
41
42 public Photo(String id, String parentID, String title, String creator, String album, Res... resource) {
43 super(id, parentID, title, creator, resource);
44 setClazz(CLASS);
45 if (album != null)
46 setAlbum(album);
47 }
48
49 public String getAlbum() {
50 return getFirstPropertyValue(UPNP.ALBUM.class);
51 }
52
53 public Photo setAlbum(String album) {
54 replaceFirstProperty(new UPNP.ALBUM(album));
55 return this;
56 }
57
58
59 }