FileDocCategorySizeDatePackage
GenericTag.javaAPI DocJaudiotagger 2.0.47689Thu Apr 28 21:16:56 BST 2011org.jaudiotagger.audio.generic

GenericTag

public abstract class GenericTag extends AbstractTag
This is a complete example implementation of {@link AbstractTag} and it currenlty used to provide basic support to audio formats with only read tagging ability such as Real or Wav files
author
Raphaƫl Slinckx

Fields Summary
private static EnumSet
supportedKeys
Constructors Summary
Methods Summary
public TagFieldcreateField(FieldKey genericKey, java.lang.String value)

        if(supportedKeys.contains(genericKey))
        {
            return new GenericTagTextField(genericKey.name(),value);
        }
        else
        {
            throw new UnsupportedOperationException(ErrorMessage.GENERIC_NOT_SUPPORTED.getMsg());
        }
    
public TagFieldcreateField(org.jaudiotagger.tag.images.Artwork artwork)

        throw new UnsupportedOperationException(ErrorMessage.GENERIC_NOT_SUPPORTED.getMsg());
    
public voiddeleteField(FieldKey genericKey)

param
genericKey
throws
KeyNotFoundException

        if(supportedKeys.contains(genericKey))
        {
            deleteField(genericKey.name());
        }
        else
        {
            throw new UnsupportedOperationException(ErrorMessage.GENERIC_NOT_SUPPORTED.getMsg());
        }
    
public java.util.ListgetArtworkList()

        return Collections.emptyList();
    
public java.lang.StringgetFirst(FieldKey genericKey)

param
genericKey
return
throws
KeyNotFoundException

        return getValue(genericKey, 0);
    
public TagFieldgetFirstField(FieldKey genericKey)

param
genericKey
return
throws
KeyNotFoundException

        if(supportedKeys.contains(genericKey))
        {
            return getFirstField(genericKey.name());
        }
        else
        {
            throw new UnsupportedOperationException(ErrorMessage.GENERIC_NOT_SUPPORTED.getMsg());
        }
    
public java.lang.StringgetValue(FieldKey genericKey, int index)

        if(supportedKeys.contains(genericKey))
        {
            return getItem(genericKey.name(),index);
        }
        else
        {
            throw new UnsupportedOperationException(ErrorMessage.GENERIC_NOT_SUPPORTED.getMsg());
        }
    
protected booleanisAllowedEncoding(java.lang.String enc)
(overridden)

see
org.jaudiotagger.audio.generic.AbstractTag#isAllowedEncoding(java.lang.String)

        return true;