|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jaudiotagger.audio.generic.AbstractTag
org.jaudiotagger.tag.mp4.Mp4Tag
public class Mp4Tag
A Logical representation of Mp4Tag, i.e the meta information stored in an Mp4 file underneath the moov.udt.meta.ilst atom.
Constructor Summary | |
---|---|
Mp4Tag()
|
Method Summary | |
---|---|
TagField |
createAlbumField(java.lang.String content)
Creates a field which represents the "album". The field will already contain the given content. |
TagField |
createArtistField(java.lang.String content)
Creates a field which represents the "artist". The field will already contain the given content. |
TagField |
createArtworkField(byte[] data)
Create artwork field |
TagField |
createCommentField(java.lang.String content)
Creates a field which represents the "comment". The field will already contain the given content. |
TagField |
createDiscNoField(java.lang.String content)
Create discno field |
TagField |
createGenreField(java.lang.String content)
Create genre field |
TagField |
createTagField(Mp4FieldKey mp4FieldKey,
java.lang.String value)
Create Tag Field using mp4 key Uses the correct subclass for the key |
TagField |
createTagField(TagFieldKey genericKey,
java.lang.String value)
Create Tag Field using generic key This should use the correct subclass for the key |
TagField |
createTitleField(java.lang.String content)
Creates a field which represents the "title". The field will already contain the given content. |
TagField |
createTrackField(java.lang.String content)
Creates a field which represents the "track". The field will already contain the given content. |
TagField |
createYearField(java.lang.String content)
Creates a field which represents the "year". The field will already contain the given content. |
void |
deleteTagField(Mp4FieldKey mp4Key)
Delete fields with this mp4key |
void |
deleteTagField(TagFieldKey genericKey)
Delete fields with this generic key |
java.util.List<TagField> |
get(Mp4FieldKey mp4FieldKey)
Retrieve the values that exists for this mp4keyId (this is the internalid actually used) |
java.util.List<TagField> |
get(TagFieldKey genericKey)
Maps the generic key to the mp4 key and return the list of values for this field |
java.lang.String |
getFirst(Mp4FieldKey mp4Key)
Retrieve the first value that exists for this mp4key |
java.lang.String |
getFirst(TagFieldKey genericKey)
Retrieve the first value that exists for this generic key |
Mp4TagField |
getFirstField(Mp4FieldKey mp4Key)
|
java.util.List<TagField> |
getGenre()
There are two genres fields in mp4 files, but only one can be used at a time, so this method tries to make things easier by checking both and returning the populated one (if any) |
java.lang.String |
toString()
(overridden) |
Methods inherited from class org.jaudiotagger.audio.generic.AbstractTag |
---|
add, addAlbum, addArtist, addComment, addGenre, addTitle, addTrack, addYear, get, getAlbum, getArtist, getComment, getFieldCount, getFields, getFirst, getFirstAlbum, getFirstArtist, getFirstComment, getFirstField, getFirstGenre, getFirstTitle, getFirstTrack, getFirstYear, getTitle, getTrack, getYear, hasCommonFields, hasField, isEmpty, set, setAlbum, setArtist, setComment, setEncoding, setGenre, setTitle, setTrack, setYear |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Mp4Tag()
Method Detail |
---|
public java.util.List<TagField> getGenre()
getGenre
in interface Tag
getGenre
in class AbstractTag
Tag.getGenre()
public TagField createArtistField(java.lang.String content)
AbstractTag
createArtistField
in class AbstractTag
content
- The content of the created field.
public TagField createAlbumField(java.lang.String content)
AbstractTag
createAlbumField
in class AbstractTag
content
- The content of the created field.
public TagField createTitleField(java.lang.String content)
AbstractTag
createTitleField
in class AbstractTag
content
- The content of the created field.
public TagField createTrackField(java.lang.String content) throws FieldDataInvalidException
AbstractTag
createTrackField
in class AbstractTag
content
- The content of the created field.
FieldDataInvalidException
public TagField createYearField(java.lang.String content)
AbstractTag
createYearField
in class AbstractTag
content
- The content of the created field.
public TagField createCommentField(java.lang.String content)
AbstractTag
createCommentField
in class AbstractTag
content
- The content of the created field.
public TagField createGenreField(java.lang.String content)
If the content can be parsed to one of the known values use the genre field otherwise use the custom field.
createGenreField
in class AbstractTag
content
-
public java.lang.String toString()
AbstractTag
toString
in interface Tag
toString
in class AbstractTag
Object.toString()
public java.util.List<TagField> get(TagFieldKey genericKey) throws KeyNotFoundException
get
in interface Tag
get
in class AbstractTag
genericKey
-
TagField
objects with the given "id".
KeyNotFoundException
public java.util.List<TagField> get(Mp4FieldKey mp4FieldKey) throws KeyNotFoundException
mp4FieldKey
-
KeyNotFoundException
public java.lang.String getFirst(TagFieldKey genericKey) throws KeyNotFoundException
getFirst
in interface Tag
getFirst
in class AbstractTag
genericKey
-
KeyNotFoundException
public java.lang.String getFirst(Mp4FieldKey mp4Key) throws KeyNotFoundException
mp4Key
-
KeyNotFoundException
public Mp4TagField getFirstField(Mp4FieldKey mp4Key) throws KeyNotFoundException
KeyNotFoundException
public void deleteTagField(TagFieldKey genericKey) throws KeyNotFoundException
deleteTagField
in interface Tag
deleteTagField
in class AbstractTag
genericKey
-
KeyNotFoundException
public void deleteTagField(Mp4FieldKey mp4Key) throws KeyNotFoundException
mp4Key
-
KeyNotFoundException
public TagField createDiscNoField(java.lang.String content) throws FieldDataInvalidException
content
- can be any of the following
1
1/10
FieldDataInvalidException
public TagField createArtworkField(byte[] data) throws FieldDataInvalidException
data
- raw image data
FieldDataInvalidException
public TagField createTagField(TagFieldKey genericKey, java.lang.String value) throws KeyNotFoundException, FieldDataInvalidException
createTagField
in interface Tag
createTagField
in class AbstractTag
genericKey
- value
-
KeyNotFoundException
FieldDataInvalidException
public TagField createTagField(Mp4FieldKey mp4FieldKey, java.lang.String value) throws KeyNotFoundException, FieldDataInvalidException
mp4FieldKey
- value
-
KeyNotFoundException
FieldDataInvalidException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |