* values. <br>
* <b>Warning: </b> the common values will be replaced.
*/
public static void assignCommonTagValues(Tag tag,
ExtendedContentDescription description) {
ContentDescriptor tmp = null;
if (tag.getFirstAlbum() != null && tag.getFirstAlbum().length() > 0) {
tmp = new ContentDescriptor(ContentDescriptor.ID_ALBUM,
ContentDescriptor.TYPE_STRING);
tmp.setStringValue(tag.getFirstAlbum());
description.addOrReplace(tmp);
} else {
description.remove(ContentDescriptor.ID_ALBUM);
}
if (tag.getFirstTrack() != null && tag.getFirstTrack().length() > 0) {
tmp = new ContentDescriptor(ContentDescriptor.ID_TRACKNUMBER,
ContentDescriptor.TYPE_STRING);
tmp.setStringValue(tag.getFirstTrack());
description.addOrReplace(tmp);
} else {
description.remove(ContentDescriptor.ID_TRACKNUMBER);
}
if (tag.getFirstYear() != null && tag.getFirstYear().length() > 0) {
tmp = new ContentDescriptor(ContentDescriptor.ID_YEAR,
ContentDescriptor.TYPE_STRING);
tmp.setStringValue(tag.getFirstYear());
description.addOrReplace(tmp);
} else {
description.remove(ContentDescriptor.ID_YEAR);
}
if (tag.getFirstGenre() != null && tag.getFirstGenre().length() > 0) {
tmp = new ContentDescriptor(ContentDescriptor.ID_GENRE,
ContentDescriptor.TYPE_STRING);
tmp.setStringValue(tag.getFirstGenre());
description.addOrReplace(tmp);
int index = Arrays.asList(Tag.DEFAULT_GENRES).indexOf(
tag.getFirstGenre());
if (index != -1) {
tmp = new ContentDescriptor(ContentDescriptor.ID_GENREID,
ContentDescriptor.TYPE_STRING);
tmp.setStringValue("(" + index + ")");
description.addOrReplace(tmp);
} else {
description.remove(ContentDescriptor.ID_GENREID);
}
} else {