| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| AbstractID3Tag |
|
| 1.0;1 |
| 1 | /** | |
| 2 | * @author : Paul Taylor | |
| 3 | * @author : Eric Farng | |
| 4 | * | |
| 5 | * Version @version:$Id: AbstractID3Tag.java,v 1.9 2008/01/01 15:14:21 paultaylor Exp $ | |
| 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 | 52 | public static Logger logger = Logger.getLogger("org.jaudiotagger.tag.id3"); |
| 39 | ||
| 40 | public AbstractID3Tag() | |
| 41 | 2081 | { |
| 42 | 2081 | } |
| 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 | 2081 | 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 | */ | |
| 62 | public abstract byte getRelease(); | |
| 63 | ||
| 64 | ||
| 65 | /** | |
| 66 | * Retrieve the Major Version | |
| 67 | */ | |
| 68 | public abstract byte getMajorVersion(); | |
| 69 | ||
| 70 | /** | |
| 71 | * Retrieve the Revision | |
| 72 | */ | |
| 73 | public abstract byte getRevision(); | |
| 74 | ||
| 75 | ||
| 76 | public AbstractID3Tag(AbstractID3Tag copyObject) | |
| 77 | { | |
| 78 | 0 | super(copyObject); |
| 79 | 0 | } |
| 80 | ||
| 81 | public String toString() | |
| 82 | { | |
| 83 | 0 | return ""; |
| 84 | } | |
| 85 | ||
| 86 | /** | |
| 87 | * Retrieve the logging filename to be used in debugging | |
| 88 | * | |
| 89 | * @return logging filename to be used in debugging | |
| 90 | */ | |
| 91 | protected String getLoggingFilename() | |
| 92 | { | |
| 93 | 6317 | return loggingFilename; |
| 94 | } | |
| 95 | ||
| 96 | /** | |
| 97 | * Set logging filename when construct tag for read from file | |
| 98 | * | |
| 99 | * @param loggingFilename | |
| 100 | */ | |
| 101 | protected void setLoggingFilename(String loggingFilename) | |
| 102 | { | |
| 103 | 1387 | this.loggingFilename = loggingFilename; |
| 104 | 1387 | } |
| 105 | } |