|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jaudiotagger.audio.generic.AbstractTag org.jaudiotagger.tag.vorbiscomment.VorbisCommentTag
public class VorbisCommentTag
This is the logical representation of Vorbis Comment Data
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_VENDOR
|
private static java.util.EnumMap<FieldKey,VorbisCommentFieldKey> |
tagFieldToOggField
|
Fields inherited from class org.jaudiotagger.audio.generic.AbstractTag |
---|
commonNumber, fields |
Constructor Summary | |
---|---|
VorbisCommentTag()
Only used within Package, hidden because it doesnt set Vendor which should be done when created by end user |
Method Summary | |
---|---|
void |
addField(TagField field)
Add Field |
TagField |
createField(Artwork artwork)
Create artwork field Not supported because reuire two fields to be created use |
TagField |
createField(FieldKey genericKey,
java.lang.String value)
Create Tag Field using generic key |
static VorbisCommentTag |
createNewTag()
Use to construct a new tag properly initialized |
TagField |
createTagField(java.lang.String vorbisCommentFieldKey,
java.lang.String value)
Create Tag Field using ogg key This method is provided to allow you to create key of any value because VorbisComment allows arbitary keys. |
TagField |
createTagField(VorbisCommentFieldKey vorbisCommentFieldKey,
java.lang.String value)
Create Tag Field using ogg key |
void |
deleteArtworkField()
Delete all instance of artwork Field |
void |
deleteField(FieldKey genericKey)
Delete fields with this generic key |
void |
deleteTagField(VorbisCommentFieldKey vorbisCommentFieldKey)
Delete fields with this vorbisCommentFieldKey |
java.util.List<TagField> |
get(VorbisCommentFieldKey vorbisCommentKey)
Retrieve the first value that exists for this vorbis comment key |
private java.lang.String |
getAlbumId()
|
byte[] |
getArtworkBinaryData()
Retrieve artwork raw data |
java.util.List<Artwork> |
getArtworkList()
|
java.lang.String |
getArtworkMimeType()
|
java.util.List<TagField> |
getFields(FieldKey genericKey)
Maps the generic key to the ogg key and return the list of values for this field |
java.lang.String |
getFirst(FieldKey genericKey)
Retrieve the first value that exists for this generic key |
java.lang.String |
getFirst(VorbisCommentFieldKey vorbisCommentKey)
Retrieve the first value that exists for this vorbis comment key |
TagField |
getFirstField(FieldKey genericKey)
|
java.lang.String |
getVendor()
|
protected boolean |
isAllowedEncoding(java.lang.String enc)
Determines whether the given charset encoding may be used for the represented tagging system. |
boolean |
isEmpty()
Is this tag empty |
void |
setArtworkField(byte[] data,
java.lang.String mimeType)
Create artwork field Actually create two fields , the data field and the mimetype |
void |
setField(Artwork artwork)
Create artwork field Actually sets two fields |
void |
setVendor(java.lang.String vendor)
Set the vendor, known as the encoder generally We dont want this to be blank, when written to file this field is written to a different location to all other fields but user of library can just reat it as another field |
java.lang.String |
toString()
(overridden) |
Methods inherited from class org.jaudiotagger.audio.generic.AbstractTag |
---|
addField, addField, deleteField, get, getFieldCount, getFields, getFirst, getFirstArtwork, getFirstField, hasCommonFields, hasField, setEncoding, setField, setField |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static java.util.EnumMap<FieldKey,VorbisCommentFieldKey> tagFieldToOggField
public static final java.lang.String DEFAULT_VENDOR
Constructor Detail |
---|
VorbisCommentTag()
Method Detail |
---|
public static VorbisCommentTag createNewTag()
private java.lang.String getAlbumId()
public java.lang.String getVendor()
public void setVendor(java.lang.String vendor)
vendor
- protected boolean isAllowedEncoding(java.lang.String enc)
AbstractTag
isAllowedEncoding
in class AbstractTag
enc
- charset encoding.
true
if the given encoding can be used.public java.lang.String toString()
AbstractTag
toString
in interface Tag
toString
in class AbstractTag
Object.toString()
public TagField createField(FieldKey genericKey, java.lang.String value) throws KeyNotFoundException, FieldDataInvalidException
createField
in interface Tag
createField
in class AbstractTag
genericKey
- is the generic keyvalue
- to store
KeyNotFoundException
FieldDataInvalidException
public TagField createTagField(VorbisCommentFieldKey vorbisCommentFieldKey, java.lang.String value) throws KeyNotFoundException, FieldDataInvalidException
vorbisCommentFieldKey
- value
-
KeyNotFoundException
FieldDataInvalidException
public TagField createTagField(java.lang.String vorbisCommentFieldKey, java.lang.String value)
vorbisCommentFieldKey
- value
-
public java.util.List<TagField> getFields(FieldKey genericKey) throws KeyNotFoundException
getFields
in interface Tag
getFields
in class AbstractTag
genericKey
-
TagField
objects with the given "id".
KeyNotFoundException
public java.util.List<TagField> get(VorbisCommentFieldKey vorbisCommentKey) throws KeyNotFoundException
vorbisCommentKey
-
KeyNotFoundException
public java.lang.String getFirst(FieldKey genericKey) throws KeyNotFoundException
getFirst
in interface Tag
getFirst
in class AbstractTag
genericKey
-
KeyNotFoundException
public java.lang.String getFirst(VorbisCommentFieldKey vorbisCommentKey) throws KeyNotFoundException
vorbisCommentKey
-
KeyNotFoundException
public void deleteField(FieldKey genericKey) throws KeyNotFoundException
deleteField
in interface Tag
deleteField
in class AbstractTag
genericKey
-
KeyNotFoundException
public void deleteTagField(VorbisCommentFieldKey vorbisCommentFieldKey) throws KeyNotFoundException
vorbisCommentFieldKey
-
KeyNotFoundException
public void setArtworkField(byte[] data, java.lang.String mimeType)
data
- raw image datamimeType
- mimeType of data
TODO could possibly work out mimetype from data, but unlike mp4 there is nothing to restrict to only png
or jpeg imagespublic byte[] getArtworkBinaryData()
public java.lang.String getArtworkMimeType()
public boolean isEmpty()
Overridden because check for size of one because there is always a vendor tag unless just created an empty vorbis tag as part of flac tag in which case size could be zero
isEmpty
in interface Tag
isEmpty
in class AbstractTag
true
if tag contains no field.Tag.isEmpty()
public void addField(TagField field)
Overidden because there can only be one vendor set
addField
in interface Tag
addField
in class AbstractTag
field
-
Changed so add empty fields
public TagField getFirstField(FieldKey genericKey) throws KeyNotFoundException
getFirstField
in interface Tag
getFirstField
in class AbstractTag
KeyNotFoundException
public java.util.List<Artwork> getArtworkList()
public TagField createField(Artwork artwork) throws FieldDataInvalidException
FieldDataInvalidException
public void setField(Artwork artwork) throws FieldDataInvalidException
setField
in interface Tag
setField
in class AbstractTag
FieldDataInvalidException
public void deleteArtworkField() throws KeyNotFoundException
deleteArtworkField
in interface Tag
deleteArtworkField
in class AbstractTag
KeyNotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |