|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object entagged.audioformats.generic.AbstractTag
public abstract class AbstractTag
This class is the default implementation for
Tag
and introduces some more useful
functionality to be implemented.
Field Summary | |
---|---|
protected int |
commonNumber
Stores the amount of TagField with TagField.isCommon()
true . |
protected HashMap |
fields
This map stores the ids of the stored fields to the fields themselves. |
Fields inherited from interface entagged.audioformats.Tag |
---|
DEFAULT_GENRES |
Constructor Summary | |
---|---|
AbstractTag()
|
Method Summary | |
---|---|
void |
add(TagField field)
(overridden) |
void |
addAlbum(String s)
(overridden) |
void |
addArtist(String s)
(overridden) |
void |
addComment(String s)
(overridden) |
void |
addGenre(String s)
(overridden) |
void |
addTitle(String s)
(overridden) |
void |
addTrack(String s)
(overridden) |
void |
addYear(String s)
(overridden) |
protected abstract TagField |
createAlbumField(String content)
Creates a field which represents the "album". The field will already contain the given content. |
protected abstract TagField |
createArtistField(String content)
Creates a field which represents the "artist". The field will already contain the given content. |
protected abstract TagField |
createCommentField(String content)
Creates a field which represents the "comment". The field will already contain the given content. |
protected abstract TagField |
createGenreField(String content)
Creates a field which represents the "genre". The field will already contain the given content. |
protected abstract TagField |
createTitleField(String content)
Creates a field which represents the "title". The field will already contain the given content. |
protected abstract TagField |
createTrackField(String content)
Creates a field which represents the "track". The field will already contain the given content. |
protected abstract TagField |
createYearField(String content)
Creates a field which represents the "year". The field will already contain the given content. |
List |
get(String id)
(overridden) |
List |
getAlbum()
(overridden) |
protected abstract String |
getAlbumId()
Returns the identifier for a field representing the "album" |
List |
getArtist()
(overridden) |
protected abstract String |
getArtistId()
Returns the identifier for a field representing the "artist" |
List |
getComment()
(overridden) |
protected abstract String |
getCommentId()
Returns the identifier for a field representing the "comment" |
Iterator |
getFields()
(overridden) |
String |
getFirstAlbum()
(overridden) |
String |
getFirstArtist()
(overridden) |
String |
getFirstComment()
(overridden) |
String |
getFirstGenre()
(overridden) |
String |
getFirstTitle()
(overridden) |
String |
getFirstTrack()
(overridden) |
String |
getFirstYear()
(overridden) |
List |
getGenre()
(overridden) |
protected abstract String |
getGenreId()
Returns the identifier for a field representing the "genre" |
List |
getTitle()
(overridden) |
protected abstract String |
getTitleId()
Returns the identifier for a field representing the "title" |
List |
getTrack()
(overridden) |
protected abstract String |
getTrackId()
Returns the identifier for a field representing the "track" |
List |
getYear()
(overridden) |
protected abstract String |
getYearId()
Returns the identifier for a field representing the "year" |
boolean |
hasCommonFields()
(overridden) |
boolean |
hasField(String id)
(overridden) |
protected abstract boolean |
isAllowedEncoding(String enc)
Determines whether the given charset encoding may be used for the represented tagging system. |
boolean |
isEmpty()
(overridden) |
void |
merge(Tag tag)
(overridden) |
void |
set(TagField field)
(overridden) |
void |
setAlbum(String s)
(overridden) |
void |
setArtist(String s)
(overridden) |
void |
setComment(String s)
(overridden) |
boolean |
setEncoding(String enc)
(overridden) |
void |
setGenre(String s)
(overridden) |
void |
setTitle(String s)
(overridden) |
void |
setTrack(String s)
(overridden) |
void |
setYear(String s)
(overridden) |
String |
toString()
(overridden) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int commonNumber
TagField
with TagField.isCommon()
true
.
protected HashMap fields
Constructor Detail |
---|
public AbstractTag()
Method Detail |
---|
public void add(TagField field)
add
in interface Tag
field
- The field to add.Tag.add(entagged.audioformats.generic.TagField)
public void addAlbum(String s)
addAlbum
in interface Tag
s
- Album descriptionTag.addAlbum(java.lang.String)
public void addArtist(String s)
addArtist
in interface Tag
s
- Artist's nameTag.addArtist(java.lang.String)
public void addComment(String s)
addComment
in interface Tag
s
- Comment.Tag.addComment(java.lang.String)
public void addGenre(String s)
addGenre
in interface Tag
s
- GenreTag.addGenre(java.lang.String)
public void addTitle(String s)
addTitle
in interface Tag
s
- TitleTag.addTitle(java.lang.String)
public void addTrack(String s)
addTrack
in interface Tag
s
- TrackTag.addTrack(java.lang.String)
public void addYear(String s)
addYear
in interface Tag
s
- YearTag.addYear(java.lang.String)
protected abstract TagField createAlbumField(String content)
content
- The content of the created field.
protected abstract TagField createArtistField(String content)
content
- The content of the created field.
protected abstract TagField createCommentField(String content)
content
- The content of the created field.
protected abstract TagField createGenreField(String content)
content
- The content of the created field.
protected abstract TagField createTitleField(String content)
content
- The content of the created field.
protected abstract TagField createTrackField(String content)
content
- The content of the created field.
protected abstract TagField createYearField(String content)
content
- The content of the created field.
public List get(String id)
get
in interface Tag
id
- The field id.
TagField
objects with the given "id".Tag.get(java.lang.String)
public List getAlbum()
getAlbum
in interface Tag
Tag.getAlbum()
protected abstract String getAlbumId()
TagField.getId()
public List getArtist()
getArtist
in interface Tag
Tag.getArtist()
protected abstract String getArtistId()
TagField.getId()
public List getComment()
getComment
in interface Tag
Tag.getComment()
protected abstract String getCommentId()
TagField.getId()
public Iterator getFields()
getFields
in interface Tag
Tag.getFields()
public String getFirstAlbum()
getFirstAlbum
in interface Tag
Tag.getFirstAlbum()
public String getFirstArtist()
getFirstArtist
in interface Tag
Tag.getFirstArtist()
public String getFirstComment()
getFirstComment
in interface Tag
Tag.getFirstComment()
public String getFirstGenre()
getFirstGenre
in interface Tag
Tag.getFirstGenre()
public String getFirstTitle()
getFirstTitle
in interface Tag
Tag.getFirstTitle()
public String getFirstTrack()
getFirstTrack
in interface Tag
Tag.getFirstTrack()
public String getFirstYear()
getFirstYear
in interface Tag
Tag.getFirstYear()
public List getGenre()
getGenre
in interface Tag
Tag.getGenre()
protected abstract String getGenreId()
TagField.getId()
public List getTitle()
getTitle
in interface Tag
Tag.getTitle()
protected abstract String getTitleId()
TagField.getId()
public List getTrack()
getTrack
in interface Tag
Tag.getTrack()
protected abstract String getTrackId()
TagField.getId()
public List getYear()
getYear
in interface Tag
Tag.getYear()
protected abstract String getYearId()
TagField.getId()
public boolean hasCommonFields()
hasCommonFields
in interface Tag
true
if a common
field is present.Tag.hasCommonFields()
public boolean hasField(String id)
hasField
in interface Tag
id
- The field id to look for.
true
if tag contains a TagField
with the
given id.Tag.hasField(java.lang.String)
protected abstract boolean isAllowedEncoding(String enc)
enc
- charset encoding.
true
if the given encoding can be used.public boolean isEmpty()
isEmpty
in interface Tag
true
if tag contains no field.Tag.isEmpty()
public void merge(Tag tag)
merge
in interface Tag
Tag.merge(entagged.audioformats.Tag)
public void set(TagField field)
set
in interface Tag
Tag.set(entagged.audioformats.generic.TagField)
public void setAlbum(String s)
setAlbum
in interface Tag
Tag.setAlbum(java.lang.String)
public void setArtist(String s)
setArtist
in interface Tag
Tag.setArtist(java.lang.String)
public void setComment(String s)
setComment
in interface Tag
Tag.setComment(java.lang.String)
public boolean setEncoding(String enc)
setEncoding
in interface Tag
Tag.setEncoding(java.lang.String)
public void setGenre(String s)
setGenre
in interface Tag
Tag.setGenre(java.lang.String)
public void setTitle(String s)
setTitle
in interface Tag
Tag.setTitle(java.lang.String)
public void setTrack(String s)
setTrack
in interface Tag
Tag.setTrack(java.lang.String)
public void setYear(String s)
setYear
in interface Tag
Tag.setYear(java.lang.String)
public String toString()
toString
in interface Tag
toString
in class Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |