Coverage Report - org.jaudiotagger.tag.id3.AbstractID3Tag
 
Classes in this File Line Coverage Branch Coverage Complexity
AbstractID3Tag
72%
8/11
N/A
1
 
 1  
 /**
 2  
  *  @author : Paul Taylor
 3  
  *  @author : Eric Farng
 4  
  *
 5  
  *  Version @version:$Id: AbstractID3Tag.java 836 2009-11-12 15:44:07Z paultaylor $
 6  
  *
 7  
  *  MusicTag Copyright (C)2003,2004
 8  
  *
 9  
  *  This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser
 10  
  *  General Public  License as published by the Free Software Foundation; either version 2.1 of the License,
 11  
  *  or (at your option) any later version.
 12  
  *
 13  
  *  This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
 14  
  *  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 15  
  *  See the GNU Lesser General Public License for more details.
 16  
  *
 17  
  *  You should have received a copy of the GNU Lesser General Public License along with this library; if not,
 18  
  *  you can get a copy from http://www.opensource.org/licenses/lgpl-license.php or write to the Free Software
 19  
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 20  
  *
 21  
  * Description:
 22  
  * Base class for all ID3 tags
 23  
  *
 24  
  */
 25  
 package org.jaudiotagger.tag.id3;
 26  
 
 27  
 import java.util.logging.Logger;
 28  
 
 29  
 /**
 30  
  * This is the abstract base class for all ID3 tags.
 31  
  *
 32  
  * @author : Eric Farng
 33  
  * @author : Paul Taylor
 34  
  */
 35  
 public abstract class AbstractID3Tag extends AbstractTag
 36  
 {
 37  
     //Logger
 38  4
     public static Logger logger = Logger.getLogger("org.jaudiotagger.tag.id3");
 39  
 
 40  
     public AbstractID3Tag()
 41  9700
     {
 42  9700
     }
 43  
 
 44  
     protected static final String TAG_RELEASE = "ID3v";
 45  
 
 46  
     //The purpose of this is to provide the filename that should be used when writing debug messages
 47  
     //when problems occur reading or writing to file, otherwise it is difficult to track down the error
 48  
     //when processing many files
 49  9700
     private String loggingFilename = "";
 50  
 
 51  
     /**
 52  
      * Get full version
 53  
      */
 54  
     public String getIdentifier()
 55  
     {
 56  0
         return TAG_RELEASE + getRelease() + "." + getMajorVersion() + "." + getRevision();
 57  
     }
 58  
 
 59  
     /**
 60  
      * Retrieve the Release
 61  
      * @return
 62  
      */
 63  
     public abstract byte getRelease();
 64  
 
 65  
 
 66  
     /**
 67  
      * Retrieve the Major Version
 68  
      * @return
 69  
      */
 70  
     public abstract byte getMajorVersion();
 71  
 
 72  
     /**
 73  
      * Retrieve the Revision
 74  
      * @return
 75  
      */
 76  
     public abstract byte getRevision();
 77  
 
 78  
 
 79  
     public AbstractID3Tag(AbstractID3Tag copyObject)
 80  
     {
 81  0
         super(copyObject);
 82  0
     }
 83  
 
 84  
     public String toString()
 85  
     {
 86  44
         return "";
 87  
     }
 88  
 
 89  
     /**
 90  
      * Retrieve the logging filename to be used in debugging
 91  
      *
 92  
      * @return logging filename to be used in debugging
 93  
      */
 94  
     protected String getLoggingFilename()
 95  
     {
 96  29297
         return loggingFilename;
 97  
     }
 98  
 
 99  
     /**
 100  
      * Set logging filename when construct tag for read from file
 101  
      *
 102  
      * @param loggingFilename
 103  
      */
 104  
     protected void setLoggingFilename(String loggingFilename)
 105  
     {
 106  6558
         this.loggingFilename = loggingFilename;
 107  6558
     }
 108  
 }