public String getAlbum() { return getFirstPropertyValue(UPNP.ALBUM.class); }
public Photo setAlbum(String album) { replaceFirstProperty(new UPNP.ALBUM(album)); return this; }
/******************************************************************************************************************* * * {@inheritDoc} * ******************************************************************************************************************/ @Override public DIDLObject toObject() { final ProtocolInfo protocolInfo = new DLNAProtocolInfo(Protocol.HTTP_GET, "*", "image/jpeg", "*"); final Res[] resources = SIZES.stream() .sorted(reverseOrder()) .map(size -> createResource(protocolInfo, size)) .collect(toList()) .toArray(new Res[0]); final Path parentPath = datum.getParent().map(e -> e.getPath()).orElseThrow(() -> new RuntimeException()); final String parentId = parentPath.toString(); final String photoId = parentPath.resolve(datum.getId()).toString(); final String title = datum.getId(); final Photo item = new Photo(photoId, parentId, title, creator, parentId, resources); item.setDescription(datum.getTitle()); item.setDate(dateFor(datum.getId())); return item; }
specificItems.add(new ImageItem(genericItem)); } else if (Photo.CLASS.getValue().equals(genericType)) { specificItems.add(new Photo(genericItem));
public void addPhotos(Photo[] photos) { if (photos != null) { for (Photo photo : photos) { photo.setAlbum(getTitle()); addItem(photo); } } }
public Photo() { setClazz(CLASS); }
specificItems.add(new ImageItem(genericItem)); } else if (Photo.CLASS.getValue().equals(genericType)) { specificItems.add(new Photo(genericItem));
public void addPhotos(Photo[] photos) { if (photos != null) { for (Photo photo : photos) { photo.setAlbum(getTitle()); addItem(photo); } } }
public Photo() { setClazz(CLASS); }
specificItems.add(new ImageItem(genericItem)); } else if (Photo.CLASS.getValue().equals(genericType)) { specificItems.add(new Photo(genericItem));
public void addPhotos(Photo[] photos) { if (photos != null) { for (Photo photo : photos) { photo.setAlbum(getTitle()); addItem(photo); } } }
public String getAlbum() { return getFirstPropertyValue(UPNP.ALBUM.class); }
public Photo setAlbum(String album) { replaceFirstProperty(new UPNP.ALBUM(album)); return this; }
public Photo() { setClazz(CLASS); }
public String getAlbum() { return getFirstPropertyValue(UPNP.ALBUM.class); }
public Photo setAlbum(String album) { replaceFirstProperty(new UPNP.ALBUM(album)); return this; }