FileDocCategorySizeDatePackage
MusicMetadataSet.javaAPI DocMyID3 for Android2648Tue Oct 07 11:15:24 BST 2008org.cmc.music.metadata

MusicMetadataSet

public class MusicMetadataSet extends Object

Fields Summary
public final org.cmc.music.myid3.ID3Tag
id3v1Raw
public final ID3Tag.V2
id3v2Raw
public final MusicMetadata
id3v1Clean
public final MusicMetadata
id3v2Clean
public final MusicMetadata
filename
public final MusicMetadata
merged
public static final String
newline
private static final org.cmc.music.myid3.TagFormat
utils
Constructors Summary
private MusicMetadataSet(org.cmc.music.myid3.ID3Tag id3_v1_raw, ID3Tag.V2 id3_v2_raw, MusicMetadata id3_v1_clean, MusicMetadata id3_v2_clean, String file_name, String folder_name)

		this.id3v1Raw = id3_v1_raw;
		this.id3v2Raw = id3_v2_raw;
		this.id3v1Clean = id3_v1_clean;
		this.id3v2Clean = id3_v2_clean;
		this.filename = FSParser.parseFilename(file_name, folder_name);
		this.merged = new MusicMetadata("merged");

		merge();
	
Methods Summary
public static final org.cmc.music.metadata.MusicMetadataSetfactoryMethod(org.cmc.music.myid3.ID3Tag id3_v1_raw, ID3Tag.V2 id3_v2_raw, java.lang.String filename, java.lang.String folder_name)


	     
			     
	
		MusicMetadata id3_v1_clean = id3_v1_raw == null ? null : utils
				.process(id3_v1_raw.values);
		MusicMetadata id3_v2_clean = id3_v2_raw == null ? null : utils
				.process(id3_v2_raw.values);

		return new MusicMetadataSet(id3_v1_raw, id3_v2_raw, id3_v1_clean,
				id3_v2_clean, filename, folder_name);
	
public IMusicMetadatagetSimplified()

		return new MusicMetadata(merged);
	
private final voidmerge(java.util.Map src)

		if (src == null)
			return;

		Vector keys = new Vector(src.keySet());
		for (int i = 0; i < keys.size(); i++)
		{
			Object key = keys.get(i);
			if (null != merged.get(key))
				continue;
			Object value = src.get(key);
			merged.put(key, value);
		}
	
private final voidmerge()

		if (id3v2Clean != null)
			merged.putAll(id3v2Clean);

		merge(id3v1Clean);
		merge(filename);
	
public java.lang.StringtoString()


	  
	
		StringBuffer result = new StringBuffer();

		result.append("{ID3TagSet. ");

		result.append(newline);
		result.append("v1_raw: " + id3v1Raw);
		result.append(newline);
		result.append("v2_raw: " + id3v2Raw);
		result.append(newline);
		result.append("v1: " + id3v1Clean);
		result.append(newline);
		result.append("v2: " + id3v2Clean);
		result.append(newline);
		result.append("filename: " + filename);
		result.append(newline);
		result.append("merged: " + merged);
		result.append(newline);

		result.append(" }");

		return result.toString();