Class ID3v22Handler

  • All Implemented Interfaces:
    ID3Tags

    public class ID3v22Handler
    extends java.lang.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
    • Field Summary

      • Fields inherited from interface org.apache.tika.parser.mp3.ID3Tags

        GENRES
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getAlbum()  
      java.lang.String getAlbumArtist()
      The Artist for the overall album / compilation of albums
      java.lang.String getArtist()
      The Artist for the track
      java.util.List<ID3Tags.ID3Comment> getComments()
      Retrieves the comments, if any.
      java.lang.String getCompilation()
      ID3v22 doesn't have compilations, so returns null;
      java.lang.String getComposer()  
      java.lang.String getDisc()
      The number of the disc this belongs to, within the set
      java.lang.String getGenre()  
      boolean getTagsPresent()
      Does the file contain this kind of tags?
      java.lang.String getTitle()  
      java.lang.String getTrackNumber()
      The number of the track within the album / recording
      java.lang.String getYear()  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ID3v22Handler

        public ID3v22Handler​(ID3v2Frame frame)
                      throws java.io.IOException,
                             org.xml.sax.SAXException,
                             TikaException
        Throws:
        java.io.IOException
        org.xml.sax.SAXException
        TikaException
    • Method Detail

      • getTagsPresent

        public boolean getTagsPresent()
        Description copied from interface: ID3Tags
        Does the file contain this kind of tags?
        Specified by:
        getTagsPresent in interface ID3Tags
      • getTitle

        public java.lang.String getTitle()
        Specified by:
        getTitle in interface ID3Tags
      • getArtist

        public java.lang.String getArtist()
        Description copied from interface: ID3Tags
        The Artist for the track
        Specified by:
        getArtist in interface ID3Tags
      • getAlbum

        public java.lang.String getAlbum()
        Specified by:
        getAlbum in interface ID3Tags
      • getYear

        public java.lang.String getYear()
        Specified by:
        getYear in interface ID3Tags
      • getComposer

        public java.lang.String getComposer()
        Specified by:
        getComposer in interface ID3Tags
      • getComments

        public java.util.List<ID3Tags.ID3Comment> getComments()
        Description copied from interface: ID3Tags
        Retrieves the comments, if any. Files may have more than one comment, but normally only one with any language/description pair.
        Specified by:
        getComments in interface ID3Tags
      • getGenre

        public java.lang.String getGenre()
        Specified by:
        getGenre in interface ID3Tags
      • getTrackNumber

        public java.lang.String getTrackNumber()
        Description copied from interface: ID3Tags
        The number of the track within the album / recording
        Specified by:
        getTrackNumber in interface ID3Tags
      • getAlbumArtist

        public java.lang.String getAlbumArtist()
        Description copied from interface: ID3Tags
        The Artist for the overall album / compilation of albums
        Specified by:
        getAlbumArtist in interface ID3Tags
      • getDisc

        public java.lang.String getDisc()
        Description copied from interface: ID3Tags
        The number of the disc this belongs to, within the set
        Specified by:
        getDisc in interface ID3Tags
      • getCompilation

        public java.lang.String getCompilation()
        ID3v22 doesn't have compilations, so returns null;
        Specified by:
        getCompilation in interface ID3Tags