Methods Summary |
---|
public org.cmc.music.common.ID3FrameType | getID3FrameType(java.lang.Object key)
for (int i = 0; i < handlers.length; i++)
{
ID3v2TagHandler handler = handlers[i];
Object key = handler.getKey();
if (key != null)
keyToFrameTypeMap.put(key, handler.getFrameType());
else
ignoredFrameTypes.add(handler.getFrameType());
}
if (key.equals(KEY_PICTURES))
return ID3FrameType.PICTURE;
return (ID3FrameType) keyToFrameTypeMap.get(key);
|
public boolean | isIgnoredID3FrameType(org.cmc.music.common.ID3FrameType frame_type)
return ignoredFrameTypes.contains(frame_type);
|
private static boolean | isNumber(java.lang.String s)
boolean result = new RE("^-?[0-9]+$").match(s);
return result;
|
public org.cmc.music.metadata.MusicMetadata | process(java.util.Vector tags)
if (tags == null)
return null;
try
{
MusicMetadata result = new MusicMetadata("id3v2");
for (int i = 0; i < tags.size(); i++)
{
Object o = (Object) tags.get(i);
if (o instanceof MyID3v2FrameImage)
{
MyID3v2FrameImage imageFrame = (MyID3v2FrameImage) o;
ImageData imageData = imageFrame.getImageData();
result.addPicture(imageData);
continue;
}
if (!(o instanceof MyID3v2FrameText))
continue;
MyID3v2FrameText tag = (MyID3v2FrameText) tags.get(i);
// process(tag);
process(result, tag);
}
return result;
}
catch (Throwable e)
{
return null;
}
|
private void | process(org.cmc.music.metadata.MusicMetadata values, MyID3v2FrameText tag)
for (int i = 0; i < handlers.length; i++)
{
ID3v2TagHandler handler = handlers[i];
if (!handler.matches(tag.frame_id))
continue;
handler.process(values, tag);
return;
}
|