EMMA Coverage Report (generated Tue Mar 14 21:50:42 EST 2006)
[all classes][org.farng.mp3.id3]

COVERAGE SUMMARY FOR SOURCE FILE [FrameBodyLINK.java]

nameclass, %method, %block, %line, %
FrameBodyLINK.java0%   (0/1)0%   (0/10)0%   (0/83)0%   (0/23)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class FrameBodyLINK0%   (0/1)0%   (0/10)0%   (0/83)0%   (0/23)
FrameBodyLINK (): void 0%   (0/1)0%   (0/3)0%   (0/2)
FrameBodyLINK (FrameBodyLINK): void 0%   (0/1)0%   (0/4)0%   (0/2)
FrameBodyLINK (RandomAccessFile): void 0%   (0/1)0%   (0/6)0%   (0/3)
FrameBodyLINK (String, String, String): void 0%   (0/1)0%   (0/15)0%   (0/5)
getAdditionalData (): String 0%   (0/1)0%   (0/5)0%   (0/1)
getAdditionalData (String): void 0%   (0/1)0%   (0/5)0%   (0/2)
getFrameIdentifier (): String 0%   (0/1)0%   (0/5)0%   (0/1)
getFrameIdentifier (String): void 0%   (0/1)0%   (0/5)0%   (0/2)
getIdentifier (): String 0%   (0/1)0%   (0/15)0%   (0/1)
setupObjectList (): void 0%   (0/1)0%   (0/20)0%   (0/4)

1package org.farng.mp3.id3;
2 
3import org.farng.mp3.InvalidTagException;
4import org.farng.mp3.object.ObjectStringFixedLength;
5import org.farng.mp3.object.ObjectStringNullTerminated;
6import org.farng.mp3.object.ObjectStringSizeTerminated;
7 
8import java.io.IOException;
9import java.io.RandomAccessFile;
10 
11/**
12 * <h3>4.20.&nbsp;&nbsp; Linked information</h3>
13 * <p/>
14 * <p>&nbsp;&nbsp; To keep information duplication as low as possible this frame may be<br> &nbsp;&nbsp; used to link
15 * information from another ID3v2 tag that might reside in<br> &nbsp;&nbsp; another audio file or alone in a binary
16 * file. It is RECOMMENDED that<br>
17 * <p/>
18 * &nbsp;&nbsp; this method is only used when the files are stored on a CD-ROM or<br> &nbsp;&nbsp; other circumstances
19 * when the risk of file separation is low. The<br> &nbsp;&nbsp; frame contains a frame identifier, which is the frame
20 * that should be<br> &nbsp;&nbsp; linked into this tag, a URL [URL] field, where a reference to the<br> &nbsp;&nbsp;
21 * file where the frame is given, and additional ID data, if needed.<br>
22 * <p/>
23 * &nbsp;&nbsp; Data should be retrieved from the first tag found in the file to<br> &nbsp;&nbsp; which this link
24 * points. There may be more than one &quot;LINK&quot; frame in a<br> &nbsp;&nbsp; tag, but only one with the same
25 * contents. A linked frame is to be<br> &nbsp;&nbsp; considered as part of the tag and has the same restrictions as if
26 * it<br>
27 * <p/>
28 * &nbsp;&nbsp; was a physical part of the tag (i.e. only one &quot;RVRB&quot; frame allowed,<br> &nbsp;&nbsp; whether
29 * it's linked or not).</p>
30 * <p/>
31 * <p>&nbsp;&nbsp;&nbsp;&nbsp; &lt;Header for 'Linked information', ID: &quot;LINK&quot;&gt;<br>
32 * <p/>
33 * &nbsp;&nbsp;&nbsp;&nbsp; Frame identifier&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $xx xx xx xx<br>
34 * &nbsp;&nbsp;&nbsp;&nbsp; URL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
35 * &lt;text string&gt; $00<br> &nbsp;&nbsp;&nbsp;&nbsp; ID and additional data&nbsp; &lt;text string(s)&gt;</p>
36 * <p/>
37 * <p>&nbsp;&nbsp; Frames that may be linked and need no additional data are &quot;ASPI&quot;,<br> &nbsp;&nbsp;
38 * &quot;ETCO&quot;, &quot;EQU2&quot;, &quot;MCID&quot;, &quot;MLLT&quot;, &quot;OWNE&quot;, &quot;RVA2&quot;,
39 * &quot;RVRB&quot;, &quot;SYTC&quot;, the<br>
40 * <p/>
41 * &nbsp;&nbsp; text information frames and the URL link frames.</p>
42 * <p/>
43 * <p>&nbsp;&nbsp; The &quot;AENC&quot;, &quot;APIC&quot;, &quot;GEOB&quot; and &quot;TXXX&quot; frames may be linked
44 * with<br>
45 * <p/>
46 * &nbsp;&nbsp; the content descriptor as additional ID data.</p>
47 * <p/>
48 * <p>&nbsp;&nbsp; The &quot;USER&quot; frame may be linked with the language field as additional<br> &nbsp;&nbsp; ID
49 * data.<br> &nbsp;&nbsp; </p>
50 * <p/>
51 * <p>&nbsp;&nbsp; The &quot;PRIV&quot; frame may be linked with the owner identifier as<br> &nbsp;&nbsp; additional ID
52 * data.</p>
53 * <p/>
54 * <p>&nbsp;&nbsp; The &quot;COMM&quot;, &quot;SYLT&quot; and &quot;USLT&quot;
55 * <p/>
56 * frames may be linked with three bytes<br> &nbsp;&nbsp; of language descriptor directly followed by a content
57 * descriptor as<br> &nbsp;&nbsp; additional ID data.<br> </p>
58 *
59 * @author Eric Farng
60 * @version $Revision: 1.4 $
61 */
62public class FrameBodyLINK extends AbstractID3v2FrameBody {
63 
64    /**
65     * Creates a new FrameBodyLINK object.
66     */
67    public FrameBodyLINK() {
68        super();
69    }
70 
71    /**
72     * Creates a new FrameBodyLINK object.
73     */
74    public FrameBodyLINK(final FrameBodyLINK body) {
75        super(body);
76    }
77 
78    /**
79     * Creates a new FrameBodyLINK object.
80     */
81    public FrameBodyLINK(final String frameIdentifier, final String url, final String additionalData) {
82        setObject("Frame Identifier", frameIdentifier);
83        setObject("URL", url);
84        setObject("ID and Additional Data", additionalData);
85    }
86 
87    /**
88     * Creates a new FrameBodyLINK object.
89     */
90    public FrameBodyLINK(final RandomAccessFile file) throws IOException, InvalidTagException {
91        this.read(file);
92    }
93 
94    public String getAdditionalData() {
95        return (String) getObject("ID and Additional Data");
96    }
97 
98    public void getAdditionalData(final String additionalData) {
99        setObject("ID and Additional Data", additionalData);
100    }
101 
102    public String getFrameIdentifier() {
103        return (String) getObject("Frame Identifier");
104    }
105 
106    public void getFrameIdentifier(final String frameIdentifier) {
107        setObject("Frame Identifier", frameIdentifier);
108    }
109 
110    public String getIdentifier() {
111        return "LINK" + ((char) 0) + getFrameIdentifier() + ((char) 0) + getAdditionalData();
112    }
113 
114    protected void setupObjectList() {
115        appendToObjectList(new ObjectStringFixedLength("Frame Identifier", 4));
116        appendToObjectList(new ObjectStringNullTerminated("URL"));
117        appendToObjectList(new ObjectStringSizeTerminated("ID and Additional Data"));
118    }
119}

[all classes][org.farng.mp3.id3]
EMMA 2.0.5312 (C) Vladimir Roubtsov