本文整理汇总了Java中org.fourthline.cling.support.model.item.MusicTrack类的典型用法代码示例。如果您正苦于以下问题:Java MusicTrack类的具体用法?Java MusicTrack怎么用?Java MusicTrack使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
MusicTrack类属于org.fourthline.cling.support.model.item包,在下文中一共展示了MusicTrack类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createItem
import org.fourthline.cling.support.model.item.MusicTrack; //导入依赖的package包/类
public Item createItem(MediaFile song) throws Exception {
MediaFile parent = mediaFileService.getParentOf(song);
MusicTrack item = new MusicTrack();
item.setId(String.valueOf(song.getId()));
item.setParentID(String.valueOf(parent.getId()));
item.setTitle(song.getTitle());
item.setAlbum(song.getAlbumName());
if (song.getArtist() != null) {
item.setArtists(new PersonWithRole[]{new PersonWithRole(song.getArtist())});
}
Integer year = song.getYear();
if (year != null) {
item.setDate(year + "-01-01");
}
item.setOriginalTrackNumber(song.getTrackNumber());
if (song.getGenre() != null) {
item.setGenres(new String[]{song.getGenre()});
}
item.setResources(Arrays.asList(createResourceForSong(song)));
item.setDescription(song.getComment());
item.addProperty(new DIDLObject.Property.UPNP.ALBUM_ART_URI(getAlbumArtUrl(parent.getId())));
return item;
}
示例2: createItem
import org.fourthline.cling.support.model.item.MusicTrack; //导入依赖的package包/类
public Item createItem(MediaFile song) throws Exception {
MediaFile parent = getMediaFileService().getParentOf(song);
MusicTrack item = new MusicTrack();
item.setId(String.valueOf(song.getId()));
item.setParentID(String.valueOf(parent.getId()));
item.setTitle(song.getTitle());
item.setAlbum(song.getAlbumName());
if (song.getArtist() != null) {
item.setArtists(getDispatcher().getAlbumProcessor().getAlbumArtists(song.getArtist()));
}
Integer year = song.getYear();
if (year != null) {
item.setDate(year + "-01-01");
}
item.setOriginalTrackNumber(song.getTrackNumber());
if (song.getGenre() != null) {
item.setGenres(new String[]{song.getGenre()});
}
item.setResources(Arrays.asList(getDispatcher().createResourceForSong(song)));
item.setDescription(song.getComment());
item.addProperty(new DIDLObject.Property.UPNP.ALBUM_ART_URI(getDispatcher().getAlbumProcessor().getAlbumArtURI(parent.getId())));
return item;
}
示例3: createItem
import org.fourthline.cling.support.model.item.MusicTrack; //导入依赖的package包/类
private Item createItem(MediaFile song) throws Exception {
MediaFile parent = mediaFileService.getParentOf(song);
MusicTrack item = new MusicTrack();
item.setId(String.valueOf(song.getId()));
item.setParentID(String.valueOf(parent.getId()));
item.setTitle(song.getTitle());
item.setAlbum(song.getAlbumName());
if (song.getArtist() != null) {
item.setArtists(new PersonWithRole[]{new PersonWithRole(song.getArtist())});
}
Integer year = song.getYear();
if (year != null) {
item.setDate(year + "-01-01");
}
item.setOriginalTrackNumber(song.getTrackNumber());
if (song.getGenre() != null) {
item.setGenres(new String[]{song.getGenre()});
}
item.setResources(Arrays.asList(createResourceForSong(song)));
item.setDescription(song.getComment());
item.addProperty(new DIDLObject.Property.UPNP.ALBUM_ART_URI(getAlbumArtUrl(parent)));
return item;
}
示例4: ContentDirectory
import org.fourthline.cling.support.model.item.MusicTrack; //导入依赖的package包/类
public ContentDirectory(){
StorageFolder rootContainer = new StorageFolder("0","-1","Root","yaacc",2,907000l);
rootContainer.setSearchable(true);
rootContainer.setRestricted(false);
content.put(rootContainer.getId(),rootContainer);
List<MusicTrack> musicTracks = createMusicTracks("1");
MusicAlbum musicAlbum = new MusicAlbum("1", rootContainer, "Music", "yaacc",musicTracks.size(),musicTracks);
musicAlbum.setSearchable(true);
musicAlbum.setRestricted(false);
rootContainer.addContainer(musicAlbum);
content.put(musicAlbum.getId(),musicAlbum);
List<Photo> photos = createPhotos("2");
PhotoAlbum photoAlbum = new PhotoAlbum("2", rootContainer, "Photos", "yaacc", photos.size(),photos);
photoAlbum.setSearchable(true);
photoAlbum.setRestricted(false);
rootContainer.addContainer(photoAlbum);
content.put(photoAlbum.getId(),photoAlbum);
}
示例5: createTestContentDirectory
import org.fourthline.cling.support.model.item.MusicTrack; //导入依赖的package包/类
/**
*
*/
private void createTestContentDirectory() {
StorageFolder rootContainer = new StorageFolder("0", "-1", "root",
"yaacc", 2, 907000L);
rootContainer.setClazz(new DIDLObject.Class("object.container"));
rootContainer.setRestricted(true);
addContent(rootContainer.getId(), rootContainer);
List<MusicTrack> musicTracks = createMusicTracks("1");
MusicAlbum musicAlbum = new MusicAlbum("1", rootContainer, "Music",
null, musicTracks.size(), musicTracks);
musicAlbum.setClazz(new DIDLObject.Class("object.container"));
musicAlbum.setRestricted(true);
rootContainer.addContainer(musicAlbum);
addContent(musicAlbum.getId(), musicAlbum);
List<Photo> photos = createPhotos("2");
PhotoAlbum photoAlbum = new PhotoAlbum("2", rootContainer, "Photos",
null, photos.size(), photos);
photoAlbum.setClazz(new DIDLObject.Class("object.container"));
photoAlbum.setRestricted(true);
rootContainer.addContainer(photoAlbum);
addContent(photoAlbum.getId(), photoAlbum);
}
示例6: getAudioList
import org.fourthline.cling.support.model.item.MusicTrack; //导入依赖的package包/类
public static List<Item> getAudioList(String serverUrl, String parentId) {
List<Item> items = new ArrayList<>();
//Query all track,add to items
Cursor c = BeyondApplication.getApplication().getContentResolver()
.query(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI, null, null, null, MediaStore.Audio.Media.TITLE);
c.moveToFirst();
while (!c.isAfterLast()) {
long id = c.getLong(c.getColumnIndex(MediaStore.Audio.Media._ID));
String title = c.getString(c.getColumnIndexOrThrow(MediaStore.Audio.Media.TITLE));
String creator = c.getString(c.getColumnIndexOrThrow(MediaStore.Audio.Media.ARTIST));
String album = c.getString(c.getColumnIndexOrThrow(MediaStore.Audio.Media.ALBUM));
String data = c.getString(c.getColumnIndexOrThrow(MediaStore.Audio.Media.DATA));
//Remove SDCard path
data = data.replaceFirst(storageDir, "");
//Replace file name by "id.ext"
String fileName = data.substring(data.lastIndexOf(File.separator));
String ext = fileName.substring(fileName.lastIndexOf("."));
data = data.replace(fileName, File.separator + id + ext);
String mimeType = c.getString(c.getColumnIndexOrThrow(MediaStore.Audio.Media.MIME_TYPE));
long size = c.getLong(c.getColumnIndexOrThrow(MediaStore.Audio.Media.SIZE));
long duration = c.getLong(c.getColumnIndexOrThrow(MediaStore.Audio.Media.DURATION));
//Get duration string
String durationStr = ModelUtil.toTimeString(duration);
//Compose audio url
String url = serverUrl + File.separator + "audio" + File.separator + data;
Res res = new Res(mimeType, size, durationStr, null, url);
items.add(new MusicTrack(String.valueOf(id), parentId, title, creator, album, new PersonWithRole(creator), res));
c.moveToNext();
}
return items;
}
示例7: getMusicTracks
import org.fourthline.cling.support.model.item.MusicTrack; //导入依赖的package包/类
public MusicTrack[] getMusicTracks() {
List<MusicTrack> list = new ArrayList();
for (Item item : getItems()) {
if (item instanceof MusicTrack) list.add((MusicTrack)item);
}
return list.toArray(new MusicTrack[list.size()]);
}
示例8: addMusicTracks
import org.fourthline.cling.support.model.item.MusicTrack; //导入依赖的package包/类
public void addMusicTracks(MusicTrack[] musicTracks) {
if (musicTracks != null) {
for (MusicTrack musicTrack : musicTracks) {
musicTrack.setAlbum(getTitle());
addItem(musicTrack);
}
}
}
示例9: getDescription
import org.fourthline.cling.support.model.item.MusicTrack; //导入依赖的package包/类
@Override
public String getDescription()
{
if(item instanceof MusicTrack)
{
MusicTrack track = (MusicTrack) item;
return ( (track.getFirstArtist()!=null && track.getFirstArtist().getName()!=null) ? track.getFirstArtist().getName() : "") +
((track.getAlbum()!=null) ? (" - " + track.getAlbum()) : "");
}
return ((AudioItem) item).getDescription();
}
示例10: browseMeta
import org.fourthline.cling.support.model.item.MusicTrack; //导入依赖的package包/类
@Override
public DIDLObject browseMeta(YaaccContentDirectory contentDirectory,
String myId) {
Item result = null;
String[] projection = {MediaStore.Audio.Media._ID,
MediaStore.Audio.Media.DISPLAY_NAME,
MediaStore.Audio.Media.MIME_TYPE, MediaStore.Audio.Media.SIZE,
MediaStore.Audio.Media.ALBUM, MediaStore.Audio.Media.ALBUM_ID,
MediaStore.Audio.Media.TITLE, MediaStore.Audio.Media.ARTIST,
MediaStore.Audio.Media.DURATION};
String selection = MediaStore.Audio.Media._ID + "=?";
String[] selectionArgs = new String[]{myId
.substring(ContentDirectoryIDs.MUSIC_ALL_TITLES_ITEM_PREFIX
.getId().length())};
Cursor mediaCursor = contentDirectory
.getContext()
.getContentResolver()
.query(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI, projection,
selection, selectionArgs, null);
if (mediaCursor != null) {
mediaCursor.moveToFirst();
String id = mediaCursor.getString(mediaCursor
.getColumnIndex(MediaStore.Audio.Media._ID));
String name = mediaCursor.getString(mediaCursor
.getColumnIndex(MediaStore.Audio.Media.DISPLAY_NAME));
Long size = Long.valueOf(mediaCursor.getString(mediaCursor
.getColumnIndex(MediaStore.Audio.Media.SIZE)));
String album = mediaCursor.getString(mediaCursor
.getColumnIndex(MediaStore.Audio.Media.ALBUM));
String albumId = mediaCursor.getString(mediaCursor
.getColumnIndex(MediaStore.Audio.Media.ALBUM_ID));
String title = mediaCursor.getString(mediaCursor
.getColumnIndex(MediaStore.Audio.Media.TITLE));
String artist = mediaCursor.getString(mediaCursor
.getColumnIndex(MediaStore.Audio.Media.ARTIST));
String duration = mediaCursor.getString(mediaCursor
.getColumnIndex(MediaStore.Audio.Media.DURATION));
duration = contentDirectory.formatDuration(duration);
Log.d(getClass().getName(),
"Mimetype: "
+ mediaCursor.getString(mediaCursor
.getColumnIndex(MediaStore.Audio.Media.MIME_TYPE)));
MimeType mimeType = MimeType.valueOf(mediaCursor
.getString(mediaCursor
.getColumnIndex(MediaStore.Audio.Media.MIME_TYPE)));
// file parameter only needed for media players which decide
// the
// ability of playing a file by the file extension
String uri = getUriString(contentDirectory, id, mimeType);
URI albumArtUri = URI.create("http://"
+ contentDirectory.getIpAddress() + ":"
+ YaaccUpnpServerService.PORT + "/?album=" + albumId);
Res resource = new Res(mimeType, size, uri);
resource.setDuration(duration);
MusicTrack musicTrack = new MusicTrack(
ContentDirectoryIDs.MUSIC_ALL_TITLES_ITEM_PREFIX.getId()
+ id,
ContentDirectoryIDs.MUSIC_ALL_TITLES_FOLDER.getId(), title
+ "-(" + name + ")", "", album, artist, resource);
musicTrack
.replaceFirstProperty(new UPNP.ALBUM_ART_URI(albumArtUri));
result = musicTrack;
Log.d(getClass().getName(), "MusicTrack: " + id + " Name: " + name
+ " uri: " + uri);
mediaCursor.close();
} else {
Log.d(getClass().getName(), "Item " + myId + " not found.");
}
return result;
}
示例11: browseMeta
import org.fourthline.cling.support.model.item.MusicTrack; //导入依赖的package包/类
@Override
public DIDLObject browseMeta(YaaccContentDirectory contentDirectory,
String myId) {
Item result = null;
String[] projection = { MediaStore.Audio.Media._ID,
MediaStore.Audio.Media.DISPLAY_NAME,
MediaStore.Audio.Media.MIME_TYPE, MediaStore.Audio.Media.SIZE,
MediaStore.Audio.Media.ALBUM, MediaStore.Audio.Media.ALBUM_ID,
MediaStore.Audio.Media.ARTIST_ID, MediaStore.Audio.Media.TITLE,
MediaStore.Audio.Media.ARTIST, MediaStore.Audio.Media.DURATION };
String selection = MediaStore.Audio.Media._ID + "=?";
String[] selectionArgs = new String[] { myId
.substring(ContentDirectoryIDs.MUSIC_ARTIST_ITEM_PREFIX.getId()
.length()) };
Cursor mediaCursor = contentDirectory
.getContext()
.getContentResolver()
.query(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI, projection,
selection, selectionArgs, null);
if (mediaCursor != null) {
mediaCursor.moveToFirst();
String id = mediaCursor.getString(mediaCursor
.getColumnIndex(MediaStore.Audio.Media._ID));
String name = mediaCursor.getString(mediaCursor
.getColumnIndex(MediaStore.Audio.Media.DISPLAY_NAME));
Long size = Long.valueOf(mediaCursor.getString(mediaCursor
.getColumnIndex(MediaStore.Audio.Media.SIZE)));
String album = mediaCursor.getString(mediaCursor
.getColumnIndex(MediaStore.Audio.Media.ALBUM));
String albumId = mediaCursor.getString(mediaCursor
.getColumnIndex(MediaStore.Audio.Media.ALBUM));
String artistId = mediaCursor.getString(mediaCursor
.getColumnIndex(MediaStore.Audio.Media.ARTIST_ID));
String title = mediaCursor.getString(mediaCursor
.getColumnIndex(MediaStore.Audio.Media.TITLE));
String artist = mediaCursor.getString(mediaCursor
.getColumnIndex(MediaStore.Audio.Media.ARTIST));
String duration = mediaCursor.getString(mediaCursor
.getColumnIndex(MediaStore.Audio.Media.DURATION));
duration = contentDirectory.formatDuration(duration);
Log.d(getClass().getName(),
"Mimetype: "
+ mediaCursor.getString(mediaCursor
.getColumnIndex(MediaStore.Audio.Media.MIME_TYPE)));
MimeType mimeType = MimeType.valueOf(mediaCursor
.getString(mediaCursor
.getColumnIndex(MediaStore.Audio.Media.MIME_TYPE)));
// file parameter only needed for media players which decide
// the
// ability of playing a file by the file extension
String uri = getUriString(contentDirectory, id, mimeType);
URI albumArtUri = URI.create("http://"
+ contentDirectory.getIpAddress() + ":"
+ YaaccUpnpServerService.PORT + "/?album=" + albumId);
Res resource = new Res(mimeType, size, uri);
resource.setDuration(duration);
MusicTrack musicTrack = new MusicTrack(
ContentDirectoryIDs.MUSIC_ARTIST_ITEM_PREFIX.getId() + id,
ContentDirectoryIDs.MUSIC_ARTIST_PREFIX.getId() + artistId,
title + "-(" + name + ")", "", album, artist, resource);
musicTrack
.replaceFirstProperty(new UPNP.ALBUM_ART_URI(albumArtUri));
result = musicTrack;
Log.d(getClass().getName(), "MusicTrack: " + id + " Name: " + name
+ " uri: " + uri);
mediaCursor.close();
} else {
Log.d(getClass().getName(), "Item " + myId + " not found.");
}
return result;
}
示例12: browseMeta
import org.fourthline.cling.support.model.item.MusicTrack; //导入依赖的package包/类
@Override
public DIDLObject browseMeta(YaaccContentDirectory contentDirectory,
String myId) {
Item result = null;
String[] projection = {MediaStore.Audio.Media._ID,
MediaStore.Audio.Media.DISPLAY_NAME,
MediaStore.Audio.Media.MIME_TYPE, MediaStore.Audio.Media.SIZE,
MediaStore.Audio.Media.ALBUM, MediaStore.Audio.Media.ALBUM_ID,
MediaStore.Audio.Media.TITLE, MediaStore.Audio.Media.ARTIST,
MediaStore.Audio.Media.DURATION};
String selection = MediaStore.Audio.Media._ID + "=?";
String[] selectionArgs = new String[]{myId
.substring(ContentDirectoryIDs.MUSIC_ALBUM_ITEM_PREFIX.getId()
.length())};
Cursor mediaCursor = contentDirectory
.getContext()
.getContentResolver()
.query(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI, projection,
selection, selectionArgs, MediaStore.Audio.Media.DISPLAY_NAME + " ASC");
if (mediaCursor != null) {
mediaCursor.moveToFirst();
String id = mediaCursor.getString(mediaCursor
.getColumnIndex(MediaStore.Audio.Media._ID));
String name = mediaCursor.getString(mediaCursor
.getColumnIndex(MediaStore.Audio.Media.DISPLAY_NAME));
Long size = Long.valueOf(mediaCursor.getString(mediaCursor
.getColumnIndex(MediaStore.Audio.Media.SIZE)));
String album = mediaCursor.getString(mediaCursor
.getColumnIndex(MediaStore.Audio.Media.ALBUM));
String albumId = mediaCursor.getString(mediaCursor
.getColumnIndex(MediaStore.Audio.Media.ALBUM_ID));
String title = mediaCursor.getString(mediaCursor
.getColumnIndex(MediaStore.Audio.Media.TITLE));
String artist = mediaCursor.getString(mediaCursor
.getColumnIndex(MediaStore.Audio.Media.ARTIST));
String duration = mediaCursor.getString(mediaCursor
.getColumnIndex(MediaStore.Audio.Media.DURATION));
duration = contentDirectory.formatDuration(duration);
Log.d(getClass().getName(),
"Mimetype: "
+ mediaCursor.getString(mediaCursor
.getColumnIndex(MediaStore.Audio.Media.MIME_TYPE)));
MimeType mimeType = MimeType.valueOf(mediaCursor
.getString(mediaCursor
.getColumnIndex(MediaStore.Audio.Media.MIME_TYPE)));
// file parameter only needed for media players which decide
// the
// ability of playing a file by the file extension
String uri = getUriString(contentDirectory, id, mimeType);
URI albumArtUri = URI.create("http://"
+ contentDirectory.getIpAddress() + ":"
+ YaaccUpnpServerService.PORT + "/?album=" + albumId);
Res resource = new Res(mimeType, size, uri);
resource.setDuration(duration);
MusicTrack musicTrack = new MusicTrack(
ContentDirectoryIDs.MUSIC_ALBUM_ITEM_PREFIX.getId() + id,
ContentDirectoryIDs.MUSIC_ALBUM_PREFIX.getId() + albumId,
title + "-(" + name + ")", "", album, artist, resource);
musicTrack
.replaceFirstProperty(new UPNP.ALBUM_ART_URI(albumArtUri));
result = musicTrack;
Log.d(getClass().getName(), "MusicTrack: " + id + " Name: " + name
+ " uri: " + uri);
mediaCursor.close();
} else {
Log.d(getClass().getName(), "Item " + myId + " not found.");
}
return result;
}
示例13: addAudioContent
import org.fourthline.cling.support.model.item.MusicTrack; //导入依赖的package包/类
/**
* 添加音频
*/
private void addAudioContent(Context context, ContentNode rootNode) {
Container audioContainer = new Container(ContentTree.AUDIO_ID,
ContentTree.ROOT_ID, "Audios", "HPlayer MediaServer",
new DIDLObject.Class("object.container"), 0);
audioContainer.setRestricted(true);
audioContainer.setWriteStatus(WriteStatus.NOT_WRITABLE);
rootNode.getContainer().addContainer(audioContainer);
rootNode.getContainer().setChildCount(
rootNode.getContainer().getChildCount() + 1);
ContentTree.addNode(ContentTree.AUDIO_ID, new ContentNode(
ContentTree.AUDIO_ID, audioContainer));
Cursor cursor = context.getContentResolver()
.query(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI,
null, null, null, null);
if (cursor == null) {
return;
}
while (cursor.moveToNext()) {
String id = ContentTree.AUDIO_PREFIX
+ cursor.getInt(cursor.getColumnIndex(MediaStore.Audio.Media._ID));
String title = cursor.getString(cursor
.getColumnIndexOrThrow(MediaStore.Audio.Media.TITLE));
String creator = cursor.getString(cursor
.getColumnIndexOrThrow(MediaStore.Audio.Media.ARTIST));
String filePath = cursor.getString(cursor
.getColumnIndexOrThrow(MediaStore.Audio.Media.DATA));
String mimeType = cursor.getString(cursor
.getColumnIndexOrThrow(MediaStore.Audio.Media.MIME_TYPE));
long size = cursor.getLong(cursor
.getColumnIndexOrThrow(MediaStore.Audio.Media.SIZE));
long duration = cursor.getLong(cursor
.getColumnIndexOrThrow(MediaStore.Audio.Media.DURATION));
String album = cursor.getString(cursor
.getColumnIndexOrThrow(MediaStore.Audio.Media.ALBUM));
Res res = new Res(new MimeType(mimeType.substring(0, mimeType.indexOf('/')),
mimeType.substring(mimeType.indexOf('/') + 1)), size,
"http://" + address + "/" + id);
res.setDuration(duration / (1000 * 60 * 60) + ":"
+ (duration % (1000 * 60 * 60)) / (1000 * 60) + ":"
+ (duration % (1000 * 60)) / 1000);
// Music Track must have `artist' with role field, or
// DIDLParser().generate(didl) will throw nullpointException
MusicTrack musicTrack = new MusicTrack(id,
ContentTree.AUDIO_ID, title, creator, album,
new PersonWithRole(creator, "Performer"), res);
audioContainer.addItem(musicTrack);
audioContainer.setChildCount(audioContainer.getChildCount() + 1);
ContentTree.addNode(id, new ContentNode(id, musicTrack, filePath));
// Log.d(TAG, "added audio item " + title + "from " + filePath);
}
cursor.close();
}
示例14: replaceGenericItems
import org.fourthline.cling.support.model.item.MusicTrack; //导入依赖的package包/类
protected List<Item> replaceGenericItems(List<Item> genericItems) {
List<Item> specificItems = new ArrayList();
for (Item genericItem : genericItems) {
String genericType = genericItem.getClazz().getValue();
if (AudioItem.CLASS.getValue().equals(genericType)) {
specificItems.add(new AudioItem(genericItem));
} else if (MusicTrack.CLASS.getValue().equals(genericType)) {
specificItems.add(new MusicTrack(genericItem));
} else if (AudioBook.CLASS.getValue().equals(genericType)) {
specificItems.add(new AudioBook(genericItem));
} else if (AudioBroadcast.CLASS.getValue().equals(genericType)) {
specificItems.add(new AudioBroadcast(genericItem));
} else if (VideoItem.CLASS.getValue().equals(genericType)) {
specificItems.add(new VideoItem(genericItem));
} else if (Movie.CLASS.getValue().equals(genericType)) {
specificItems.add(new Movie(genericItem));
} else if (VideoBroadcast.CLASS.getValue().equals(genericType)) {
specificItems.add(new VideoBroadcast(genericItem));
} else if (MusicVideoClip.CLASS.getValue().equals(genericType)) {
specificItems.add(new MusicVideoClip(genericItem));
} else if (ImageItem.CLASS.getValue().equals(genericType)) {
specificItems.add(new ImageItem(genericItem));
} else if (Photo.CLASS.getValue().equals(genericType)) {
specificItems.add(new Photo(genericItem));
} else if (PlaylistItem.CLASS.getValue().equals(genericType)) {
specificItems.add(new PlaylistItem(genericItem));
} else if (TextItem.CLASS.getValue().equals(genericType)) {
specificItems.add(new TextItem(genericItem));
} else {
specificItems.add(genericItem);
}
}
return specificItems;
}
示例15: MusicAlbum
import org.fourthline.cling.support.model.item.MusicTrack; //导入依赖的package包/类
public MusicAlbum(String id, Container parent, String title, String creator, Integer childCount) {
this(id, parent.getId(), title, creator, childCount, new ArrayList<MusicTrack>());
}