Package org.apache.tika.parser.mp3
Class ID3v22Handler
- java.lang.Object
-
- org.apache.tika.parser.mp3.ID3v22Handler
-
- All Implemented Interfaces:
ID3Tags
public class ID3v22Handler extends Object implements ID3Tags
This is used to parse ID3 Version 2.2 Tag information from an MP3 file, if available.- See Also:
- MP3 ID3 Version 2.2 specification
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.tika.parser.mp3.ID3Tags
ID3Tags.ID3Comment
-
-
Constructor Summary
Constructors Constructor Description ID3v22Handler(ID3v2Frame frame)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static StringextractGenre(String rawGenre)StringgetAlbum()StringgetAlbumArtist()The Artist for the overall album / compilation of albumsStringgetArtist()The Artist for the trackList<ID3Tags.ID3Comment>getComments()Retrieves the comments, if any.StringgetCompilation()ID3v22 doesn't have compilations, so returns null;StringgetComposer()StringgetDisc()The number of the disc this belongs to, within the setStringgetGenre()booleangetTagsPresent()Does the file contain this kind of tags?StringgetTitle()StringgetTrackNumber()The number of the track within the album / recordingStringgetYear()
-
-
-
Constructor Detail
-
ID3v22Handler
public ID3v22Handler(ID3v2Frame frame) throws IOException, SAXException, TikaException
- Throws:
IOExceptionSAXExceptionTikaException
-
-
Method Detail
-
getTagsPresent
public boolean getTagsPresent()
Description copied from interface:ID3TagsDoes the file contain this kind of tags?- Specified by:
getTagsPresentin interfaceID3Tags
-
getArtist
public String getArtist()
Description copied from interface:ID3TagsThe Artist for the track
-
getComposer
public String getComposer()
- Specified by:
getComposerin interfaceID3Tags
-
getComments
public List<ID3Tags.ID3Comment> getComments()
Description copied from interface:ID3TagsRetrieves the comments, if any. Files may have more than one comment, but normally only one with any language/description pair.- Specified by:
getCommentsin interfaceID3Tags
-
getTrackNumber
public String getTrackNumber()
Description copied from interface:ID3TagsThe number of the track within the album / recording- Specified by:
getTrackNumberin interfaceID3Tags
-
getAlbumArtist
public String getAlbumArtist()
Description copied from interface:ID3TagsThe Artist for the overall album / compilation of albums- Specified by:
getAlbumArtistin interfaceID3Tags
-
getDisc
public String getDisc()
Description copied from interface:ID3TagsThe number of the disc this belongs to, within the set
-
getCompilation
public String getCompilation()
ID3v22 doesn't have compilations, so returns null;- Specified by:
getCompilationin interfaceID3Tags
-
-