|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface represents the basic data structure for the default
audiolibrary functionality.
Some audio file tagging systems allow to specify multiple values for one type
of information. The artist for example. Some songs may be a cooperation of
two or more artists. Sometimes a tagging user wants to specify them in the
tag without making one long text string.
For that kind of fields, the commonly used fields have adequate
methods for adding values. But it is possible the underlying implementation
does not support that kind of storing multiple values.
Code Examples:
AudioFile file = AudioFileIO.read(new File("C:\\test.mp3"));
Tag tag = file.getTag();
Field Summary | |
static java.lang.String[] |
DEFAULT_GENRES
This final field contains all the tags that id3v1 supports. |
Method Summary | |
void |
add(entagged.audioformats.generic.TagField field)
Adds a tagfield to the structure. It is not recommended to use this method for normal use of the audiolibrary. |
void |
addAlbum(java.lang.String album)
Adds an album to the tag. |
void |
addArtist(java.lang.String artist)
Adds an artist to the tag. |
void |
addComment(java.lang.String comment)
Adds a comment to the tag. |
void |
addGenre(java.lang.String genre)
Adds a genre to the tag. |
void |
addTitle(java.lang.String title)
Adds a title to the tag. |
void |
addTrack(java.lang.String track)
Adds a track to the tag. |
void |
addYear(java.lang.String year)
Adds a year to the Tag. |
java.util.List |
get(java.lang.String id)
Returns a list of TagField objects whose "id"
is the specified one. |
java.util.List |
getAlbum()
|
java.util.List |
getArtist()
|
java.util.List |
getComment()
|
java.util.Iterator |
getFields()
|
java.lang.String |
getFirstAlbum()
|
java.lang.String |
getFirstArtist()
|
java.lang.String |
getFirstComment()
|
java.lang.String |
getFirstGenre()
|
java.lang.String |
getFirstTitle()
|
java.lang.String |
getFirstTrack()
|
java.lang.String |
getFirstYear()
|
java.util.List |
getGenre()
|
java.util.List |
getTitle()
|
java.util.List |
getTrack()
|
java.util.List |
getYear()
|
boolean |
hasCommonFields()
Returns true , if at least one of the contained
fields is a common field (TagField.isCommon() ). |
boolean |
hasField(java.lang.String id)
Determines whether the tag has at least one field with the specified "id". |
boolean |
isEmpty()
Determines whether the tag has no fields specified. |
void |
merge(Tag tag)
|
void |
set(entagged.audioformats.generic.TagField field)
|
void |
setAlbum(java.lang.String s)
|
void |
setArtist(java.lang.String s)
|
void |
setComment(java.lang.String s)
|
boolean |
setEncoding(java.lang.String enc)
|
void |
setGenre(java.lang.String s)
|
void |
setTitle(java.lang.String s)
|
void |
setTrack(java.lang.String s)
|
void |
setYear(java.lang.String s)
|
java.lang.String |
toString()
|
Field Detail |
public static final java.lang.String[] DEFAULT_GENRES
Method Detail |
public void add(entagged.audioformats.generic.TagField field)
TagField
implementation does not return a text field compliant data with
TagField.getRawContent()
other software and the audio library
won't read the file correctly, if they do read it at all.
field
- The field to add.public void addAlbum(java.lang.String album)
album
- Album descriptionpublic void addArtist(java.lang.String artist)
artist
- Artist's namepublic void addComment(java.lang.String comment)
comment
- Comment.public void addGenre(java.lang.String genre)
genre
- Genrepublic void addTitle(java.lang.String title)
title
- Titlepublic void addTrack(java.lang.String track)
track
- Trackpublic void addYear(java.lang.String year)
year
- Yearpublic java.util.List get(java.lang.String id)
TagField
objects whose "id"
is the specified one.
id
- The field id.
TagField
objects with the given "id".public java.util.List getAlbum()
public java.util.List getArtist()
public java.util.List getComment()
public java.util.Iterator getFields()
public java.lang.String getFirstAlbum()
public java.lang.String getFirstArtist()
public java.lang.String getFirstComment()
public java.lang.String getFirstGenre()
public java.lang.String getFirstTitle()
public java.lang.String getFirstTrack()
public java.lang.String getFirstYear()
public java.util.List getGenre()
public java.util.List getTitle()
public java.util.List getTrack()
public java.util.List getYear()
public boolean hasCommonFields()
true
, if at least one of the contained
fields is a common field (TagField.isCommon()
).
true
if a common
field is present.public boolean hasField(java.lang.String id)
id
- The field id to look for.
true
if tag contains a TagField
with the
given id.public boolean isEmpty()
true
if tag contains no field.public void merge(Tag tag)
public void set(entagged.audioformats.generic.TagField field)
public void setAlbum(java.lang.String s)
public void setArtist(java.lang.String s)
public void setComment(java.lang.String s)
public boolean setEncoding(java.lang.String enc)
public void setGenre(java.lang.String s)
public void setTitle(java.lang.String s)
public void setTrack(java.lang.String s)
public void setYear(java.lang.String s)
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |