~ubuntu-branches/ubuntu/utopic/libjaudiotagger-java/utopic

« back to all changes in this revision

Viewing changes to org/jaudiotagger/tag/id3/framebody/FrameBodyTIPL.java

  • Committer: Bazaar Package Importer
  • Author(s): Varun Hiremath, Damien Raude-Morvan, Varun Hiremath
  • Date: 2009-04-01 19:17:56 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090401191756-bygniim270guy7o1
Tags: 1.0.9-1
[ Damien Raude-Morvan ]
* New upstream release
* debian/watch: Use java.net repository (which contains new releases!)
* debian/control:
  - Build-Depends on default-jdk-builddep
  - Bump Standards-Version to 3.8.1 (no changes needed)
  - Change section to "java"
* debian/rules: use default-java as JAVA_HOME
* debina/orig-tar.{sh|excludes}: strip audio and others binary files from ZIP
* debian/build.xml:
  - compile with "nowarn" to keep build log readable
  - exclude LogFormatter from build (use com.sun classes)
* debian/ant.properties: new source directory is "src" in orig.tar.gz
* Add myself as Uploaders

[ Varun Hiremath ]
* Accept changes made by Damien Raude-Morvan (Closes: #522130)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/**
2
 
 *  @author : Paul Taylor
3
 
 *  @author : Eric Farng
4
 
 *
5
 
 *  Version @version:$Id: FrameBodyTIPL.java,v 1.10 2007/08/06 16:04:34 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
 
 * People List
23
 
 *
24
 
 */
25
 
package org.jaudiotagger.tag.id3.framebody;
26
 
 
27
 
import org.jaudiotagger.tag.InvalidTagException;
28
 
import org.jaudiotagger.tag.datatype.DataTypes;
29
 
import org.jaudiotagger.tag.datatype.PairedTextEncodedStringNullTerminated;
30
 
import org.jaudiotagger.tag.id3.ID3v24Frames;
31
 
 
32
 
import java.nio.ByteBuffer;
33
 
 
34
 
 
35
 
/**
36
 
 * The 'Involved people list' is intended as a mapping between functions like producer and names. Every odd field is a
37
 
 * function and every even is an name or a comma delimited list of names.
38
 
 *
39
 
 *  TODO currently just reads the first String when directly from file, this will be fixed when we add support for
40
 
 *  multiple Strings for all ID3v24Frames
41
 
 *
42
 
 *  TODO currently just reads all the values when converted from the corresponding ID3v23 Frame IPLS as a single value
43
 
 *  (the individual fields from the IPLS frame will be seperated by commas)
44
 
 *
45
 
 */
46
 
public class FrameBodyTIPL
47
 
    extends AbstractFrameBodyTextInfo implements ID3v24FrameBody
48
 
{
49
 
    /**
50
 
     * Creates a new FrameBodyTIPL datatype.
51
 
     */
52
 
    public FrameBodyTIPL()
53
 
    {
54
 
    }
55
 
 
56
 
    public FrameBodyTIPL(FrameBodyTIPL body)
57
 
    {
58
 
        super(body);
59
 
    }
60
 
 
61
 
    /**
62
 
     * Convert from V3 to V4 Frame
63
 
     */
64
 
    public FrameBodyTIPL(FrameBodyIPLS body)
65
 
    {
66
 
        setObjectValue(DataTypes.OBJ_TEXT_ENCODING, body.getTextEncoding());
67
 
 
68
 
        PairedTextEncodedStringNullTerminated.ValuePairs  value
69
 
            = (PairedTextEncodedStringNullTerminated.ValuePairs)body.getObjectValue(DataTypes.OBJ_TEXT);
70
 
        setObjectValue(DataTypes.OBJ_TEXT, value.toString());
71
 
    }
72
 
 
73
 
    /**
74
 
     * Creates a new FrameBodyTIPL datatype.
75
 
     *
76
 
     * @param textEncoding
77
 
     * @param text
78
 
     */
79
 
    public FrameBodyTIPL(byte textEncoding, String text)
80
 
    {
81
 
        super(textEncoding, text);
82
 
    }
83
 
 
84
 
    /**
85
 
     * Creates a new FrameBodyTIPL datatype.
86
 
     *
87
 
     * @throws InvalidTagException
88
 
     */
89
 
    public FrameBodyTIPL(ByteBuffer byteBuffer, int frameSize)
90
 
        throws InvalidTagException
91
 
    {
92
 
        super(byteBuffer, frameSize);
93
 
    }
94
 
 
95
 
       /**
96
 
      * The ID3v2 frame identifier
97
 
      *
98
 
      * @return the ID3v2 frame identifier  for this frame type
99
 
     */
100
 
    public String getIdentifier()
101
 
    {
102
 
        return ID3v24Frames.FRAME_ID_INVOLVED_PEOPLE;
103
 
    }
104
 
}