FileDocCategorySizeDatePackage
FrameBodyGRID.javaAPI DocJaudiotagger 2.0.45698Wed Mar 30 16:12:04 BST 2011org.jaudiotagger.tag.id3.framebody

FrameBodyGRID

public class FrameBodyGRID extends AbstractID3v2FrameBody implements ID3v24FrameBody, ID3v23FrameBody
Group identification registration frame.

This frame enables grouping of otherwise unrelated frames. This can be used when some frames are to be signed. To identify which frames belongs to a set of frames a group identifier must be registered in the tag with this frame. The 'Owner identifier' is a null-terminated string with a URL containing an email address, or a link to a location where an email address can be found, that belongs to the organisation responsible for this grouping. Questions regarding the grouping should be sent to the indicated email address. The 'Group symbol' contains a value that associates the frame with this group throughout the whole tag. Values below $80 are reserved. The 'Group symbol' may optionally be followed by some group specific data, e.g. a digital signature. There may be several "GRID" frames in a tag but only one containing the same symbol and only one containing the same owner identifier. The group symbol must be used somewhere in the tag. See section 3.3.1, flag j for more information.

<Header for 'Group ID registration', ID: "GRID">
Owner identifier <text string> $00
Group symbol $xx
Group dependent data <binary data>

For more details, please refer to the ID3 specifications:

author
: Paul Taylor
author
: Eric Farng
version
$Id: FrameBodyGRID.java 832 2009-11-12 13:25:38Z paultaylor $

Fields Summary
Constructors Summary
public FrameBodyGRID()
Creates a new FrameBodyGRID datatype.

        //        this.setObject(ObjectTypes.OBJ_OWNER, "");
        //        this.setObject("Group Symbol", new Byte((byte) 0));
        //        this.setObject("Group Dependent Data", new byte[0]);
    
public FrameBodyGRID(FrameBodyGRID body)

        super(body);
    
public FrameBodyGRID(String owner, byte groupSymbol, byte[] data)
Creates a new FrameBodyGRID datatype.

param
owner
param
groupSymbol
param
data

        this.setObjectValue(DataTypes.OBJ_OWNER, owner);
        this.setObjectValue(DataTypes.OBJ_GROUP_SYMBOL, groupSymbol);
        this.setObjectValue(DataTypes.OBJ_GROUP_DATA, data);
    
public FrameBodyGRID(ByteBuffer byteBuffer, int frameSize)
Creates a new FrameBodyGRID datatype.

param
byteBuffer
param
frameSize
throws
InvalidTagException if unable to create framebody from buffer

        super(byteBuffer, frameSize);
    
Methods Summary
public bytegetGroupSymbol()

return

        if (getObjectValue(DataTypes.OBJ_GROUP_SYMBOL) != null)
        {
            return ((Long) getObjectValue(DataTypes.OBJ_GROUP_SYMBOL)).byteValue();
        }
        else
        {
            return (byte) 0;
        }
    
public java.lang.StringgetIdentifier()
The ID3v2 frame identifier

return
the ID3v2 frame identifier for this frame type

        return ID3v24Frames.FRAME_ID_GROUP_ID_REG;
    
public java.lang.StringgetOwner()

return

        return (String) getObjectValue(DataTypes.OBJ_OWNER);
    
public voidsetGroupSymbol(byte textEncoding)

param
textEncoding

        setObjectValue(DataTypes.OBJ_GROUP_SYMBOL, textEncoding);
    
public voidsetOwner(java.lang.String owner)

param
owner

        setObjectValue(DataTypes.OBJ_OWNER, owner);
    
protected voidsetupObjectList()

        objectList.add(new StringNullTerminated(DataTypes.OBJ_OWNER, this));
        objectList.add(new NumberFixedLength(DataTypes.OBJ_GROUP_SYMBOL, this, 1));
        objectList.add(new ByteArraySizeTerminated(DataTypes.OBJ_GROUP_DATA, this));